Today we will go over very simple but to the point comparison of two SQL Server utilities or SQL Server tools. This comes often to users which one to use sqlcmd or osql, when in need of running SQL Server queries from command prompt. Answer to this is very simple…
Read MoreSQL SERVER – Time Delay While Running T-SQL Query – WAITFOR Introduction
Today we will look at one very small but interesting feature of SQL Server. Please note that this is not much known feature of SQL Server. In SQL Server sometime there are requirement when T-SQL script has to wait for some time before executing next statement. It is quite common…
Read MoreSQL SERVER – 2008 – 2005 – Find Longest Running Query – TSQL
UPDATE : Updated this query with bug fixed with one more enhancement SERVER – 2008 – 2005 – Find Longest Running Query – TSQL – Part 2.
Recently my company owner asked me to find which query is running longest. It was very interesting that I was not able to find any T-SQL script online which can give me this data directly. Finally, I wrote down very quick script which gives me T-SQL which has ran on server along with average time and maximum time of that T-SQL execution. As I keep on writing I needed to know when exactly logging was started for the same T-SQL so I had added Logging start time in the query as well.
SQLAuthority News – Happy New Year – 5 SQL New Year Resolutions
Happy New Year to All of YOU! Let us start year 2009 with word of wisdom from Albert Einstein. I feel that you are justified in looking into the future with true assurance, because you have a mode of living in which we find the joy of life and the…
Read More