|
|
-
|
|
When a database is dropped, the jobs remain active in the SQL Server Agent and if a schedule is associated to the job, failures would be reported whenever the jobs are automatically executed. As part of the standard process that I follow whenever I drop a database, I run the following script to identify SQL Server Agent jobs which are no longer targeted to any database....
|
|
-
|
|
updated version of CompareXml...
|
|
-
|
|
This script is use for filter records in dataset using LINQ ...
|
|
-
|
|
It finds the Indexes on Database which need to be De-fragmented.
You just need to replace 'database_name' with your database name.
Include this Stored Procedure in to your Scheduled JOB, schedule it whenever you want.
...
|
|
-
|
|
While inserting multiple rows into a database table, smartest approach is to use bulk copy mechanism. .NET framework has SqlBulkCopy class to copy the rows in bulk to a sql server database table. Following script will be useful in the scenario....
|
|
-
|
|
using this script we can read XMl using LINQ...
|
|
-
1 Liked
|
0 Production
|
5 Comments
|
|
We recently ran into this interesting problem, to verify whether the IP Address of the user is between the range of IP Addresses or not. Below script will return 1, If IP Address is between the range, otherwise it return 0;...
|
|
-
|
|
Often in reporting applications, its required to write data to excel files. By using Excel interops, we can create excel files with various charts,pivot tables etc. Below script can be used to write a dataset to excel file from specific location.
...
|
|
-
|
|
Many IT departments use pre-created ghost images to quickly setup development and quality assurance environments. When they change the name of the server after restoring the image, the SQL Server instance name remains unchanged. Here's a script to change the SQL Server local instance name....
|
|
-
|
|
Have you ever wondered when your index was last rebuilt/reorganized? Here are two versions - using the Catalog view sys.indexes that would help you to identify the last date/time when the index statistics were updated, the number & percentage of rows changed during the last operation and the associated index name....
|
|