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.
Author: Brahmanand Shukla
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.
Book Launch: Learn T-SQL from Scratch
A lot of my colleagues and people in my network reached out to me to train them on the SQL Server and T-SQL. They think that my style of teaching and explaining the topic is unique and helps them understand the topic quickly. This really motivated me to take up a project of writing a … Continue reading Book Launch: Learn T-SQL from Scratch
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