This procedure can get you the list of queries being executed frequently and for duration greater/less than a particular time. You may also find it very useful if you are doing multiple things to optimize the database (such as server or database setting changes, indexing, stats or code changes etc.) and you would like to track the duration to see if you are really making progress. You can create a job with this procedure and dump the output in some table. Job can be scheduled to run in certain frequency. Later, you can plot trend out of the data tracked.
Category: Queries
usp_SQLServerCarpenter_Tools_Get_Objects_Performing_Committed_Read
This procedure will get all the objects performing committed reads. It will fetch all the objects (Procedures, Functions, Triggers, View etc.) that doesn't uses the NOLOCK and SET ISOLATION LEVEL READ UNCOMMITTED. It may be helpful in performance tuning assignments and to resolve / minimize the frequent blockage and deadlock issues.
usp_SQLServerCarpenter_Tools_Get_Procedures_Triggers_Missing_SET_NOCOUNT_ON
This procedure will get all the stored procedures and triggers missing the use of SET NOCOUNT ON. It may be helpful in performance tuning assignments.
Script to create copies of the existing object
Many a time we need copies of an object but with different names. I also got a requirement to process the files in parallel using SSIS. We had already implemented the parallelism, but at the entity level. For example, if there are 5 entities such as Customer, Product, Order, Transaction, Balance etc. then we had … Continue reading Script to create copies of the existing object
Divide the rows of a column in equals batches in grid format
I published an article Divide the rows in equals batches few days ago. One of my reader requested me to help him with a requirement to divide a column's data in equal groups and batches in grid format. I came up with a script which accepts the dynamic group size and divides the column data … Continue reading Divide the rows of a column in equals batches in grid format