The job of a consultant is always interesting – sometimes one becomes very busy and at times, over busy. I have been overwhelmed with recent performance tuning engagements. In one of the recent engagements, a large number of errors were found in the server. I noticed that their error log filled up very quickly. I also noticed a very interesting action by their DBA. I observed that after we make some changes in the server to avoid the errors, the DBA restarted the server. I asked him the reason for doing so. He explained every time that when he restarts the server, a new error log file is created. The current log file is renamed as errorlog.1; errorlog.1 becomes errorlog.2, and in a similar way, it continues. This way, after making some change, we can watch the error file from the beginning.
SQL SERVER – Finding Last Backup Time for All Database
Here is the quick script I use find last backup time for all the database in my server instance.
SQL SERVER – List of all the Views from Database
My earlier article SQL SERVER – The Limitations of the Views – Eleven and more… has lots of popularity and I have been asked many questions on the view. Many emails I received suggesting that they have hundreds of the view and now have no clue what is going on and how many of them have indexes and how many does not have an index. Some even asked me if there is any way they can get a list of the views with the property of Index along with it.
SQL SERVER – Change Column DataTypes
There are times when I feel like writing that I am a day older in SQL Server. In fact, there are many who are looking for a solution that is simple enough. Have you ever searched online for something very simple. I often do and enjoy doing things which are straight forward and easy for change.
In this blog post, we will see to Change Column DataTypes
SQL SERVER – StreamInsight and SQL Server 2008 R2
I was recently called into create POC (Proof of Concept) for a project which was being planned for use StreamInsight. When I was there, I was also asked to give overview of the this feature to their CTO (who had only 15 minutes to spare). Usually I do not like sudden change of plans but the dynamic nature of consultation always gives me motivation to work more. I quickly talked few things in the session. In the evening, I had received the minutes of the meeting and had brief note regarding my discussion on StreamInsight. I am copy pasting the same brief note over here.
SQL SERVER – Encrypted Stored Procedure and Activity Monitor
I recently had received question if any stored procedure is encrypted can we see its definition in Activity Monitor.
SQL SERVER – Find Total Number of Transactions on Interval
In one of my recent Performance Tuning assignment I was asked how do someone know how many transactions are happening on server during certain interval. I had handy script for the same. Following script displays transactions happened on server at the interval of one minute. You can change the WAITFOR DELAY to any other interval and it should work.