How to recover databases which are in Restore status on SQL Server Instance -...
Scenario:Think about a scenario when you were restoring bunch of databases and by mistake you has with NORecovery in script or You were restoring a database and you thought that you have to restore...
View ArticleC# - How to Import multiple text files to SQL Server Table by using C Sharp
Scenario: Download ScriptYou are working as C# developer and you need to write a program that should be able to read text files from a folder and load to SQL Server Table. How to load multiple text...
View ArticleHow to Import or load all the picture/image files from a folder to SQL Server...
Scenario:You are working as SQL Server Developer for Insurance Company. They get the claimed signed letters and scan and place in a folder. You need to write the SQL Script that should be able to read...
View ArticleHow to Import or load Multiple XML files to SQL Server Table - SQL Server...
Scenario:You are working as SQL Server Developer or ETL developer or DBA and you need to load multiple xml files from a folder to SQL Server Table. There are multiple ways to achieve thisYou can use...
View ArticleC# Scripts
C# ScriptsC# - How to get file Properties and insert into SQL Server table by using C SharpC# - Delete files from a folder those are older than some number of days by using C SharpC# - Why console...
View ArticleC# - Importing Files to SQL Server Table with Dynamic Columns by using C Sharp
Scenario : Download ScriptYou are working as C# developer, you get multiple text of csv files from different clients those you need to load to dbo.Customer table. But there is little problem. Each...
View ArticleC# - How to create SQL Server Table dynamically from Flat file and Load data...
Scenario : Download ScriptYou are working as C# developer, You received flat files or text files or csv files in one of the source folder. You need to write C# program that should read the file columns...
View ArticleC# - How to Load data to SQL Server Tables from flat files according to file...
Scenario : Download ScriptYou are working as C# developer for insurance company. You get multiple files on daily basis in your Source folder. The files comes with date and some of them comes with date...
View ArticleC# - How to Export Data from SQL Server Table or View to Text File in C Sharp
Scenario: Download ScriptYou are working as C# developer. You are asked to write a program that should read the data from a table, view or function and write the results to flat file. Each time you run...
View ArticleC# - How to Export Stored Procedure Results to Text File in C Sharp
Scenario : Download ScriptYou are working as C# developer, You need to developer a program that should export the results of a Stored Procedure to Text file. Every time the program executes, it should...
View ArticleC# - How to Import Multiple CSV Files to SQL Server from a Folder in C Sharp
Scenario : Download ScriptYou are working as C# developer, You get tons of files in a folder. All the files has the same definition.You need to load all the files to SQL server Table. Let's say here is...
View ArticleC# - How to write multiple CSV files to Single CVS File in C Sharp
Scenario: Download ScriptYou are working as C# developer, you need to write a program that should read multiple csv files from a folder and write to single csv file. All the input files has the same...
View ArticleC# - How to Export all the tables from a database to flat files by using C Sharp
Scenario : Download ScriptYou are working as C# developer, You need to create an C# program that should create flat files for all the tables from a database dynamically. There should be one file for...
View ArticleC# - How to read Excel Cell Value in C#
Scenario: Download ScriptYou are working as C# developer, You need to write a program that should be able to read Excel Cell value and save into variable. Once saved into a variable then you can use...
View ArticleC# - How to Export All tables of a database to Excel Files with Date-time in C#
Scenario : Download ScriptYou are working as C# developer, you need to write a program that should export all the tables to Excel files. Each Table should be export to separate Excel file and Excel...
View ArticleC# - How to Export large table data to multiple Excel Sheets on Single Excel...
Scenario: Download ScriptYou are working as C# developer, You need to create a C# program that should read a large table from SQL Server database and export to multiple Excel Sheets on Single Excel...
View ArticleC# - How to save SQL Query Results to variable in C# ( Scalar value returned...
Scenario: Download ScriptYou are working as C# developer, You are writing C# Program in which you need to execute SQL Query that returns you single value, you need to execute query and save the result...
View ArticleHow to get Record Count for all the tables in SQL Server Instance in SQL...
Scenario:You are working as SQL Server DBA or Developer, You need to write script that should get you record count for all the tables in all the database in SQL Server Instances.Solution:As we have to...
View ArticleC# - How to use Variables into SqlCommand Statement & Insert into database...
Scenario: Download ScriptYou are working as C# developer, you need to write a program that should write the variable values to SQL Server Table. Let's create the sample test table first and then we...
View ArticleHow to Change Recovery Model to Full for all User Databases in SQL Server -...
Scenario:You are working as SQL Server DBA or developer, You need to prepare some script that should change the recovery model for all the user databases to Full recovery model.The below script can be...
View Article