Yesterday I shared a blog post where I discussed how to list all the users with the System Admin (sysadmin) rights. I have received a quite a few emails and comments on this subject. The comment which got the most attention is from SQL Expert Chris Mangrum. He has shared a very interesting script with modification from the original script where he has also included additional permission of Control Server.
What are Forwarded Records in SQL Server? – Interview Question of the Week #145
Question: What are Forwarded Records in SQL Server?
Answer: It is interesting to see this question keeps on coming up in the interview questions. Even though this is very old concept, I hardly see new DBAs know about this subject.
Let us see the answer the question about the forwarded records.
SQL SERVER – Alternative to DBCC INPUTBUFFER – sys.dm_exec_input_buffer
DBCC INPUTBUFFER has been one of the most popular commands to display the last statement sent from a client to an instance of Microsoft SQL Server. We all have been using it for quite a while. However, this DBCC command showed very little information and DBA always wanted to see more details. In SQL Server 2016 we have a new Dynamic Management Function (DMV) sys.dm_exec_input_buffer which provides many additional details as well.
SQL SERVER – Get Wait Stats Related to Specific Session ID With sys.dm_exec_session_wait_stats
First thing first, this feature of getting wait stats related to Specific Session ID with sys.dm_exec_session_wait_stats will only work with SQL Server 2016 or later version of SQL Server. If you attempt to run this on earlier versions of SQL Server, you will for sure get an error.
SQL SERVER – Difference Between spid, kpid and ecid in sysprocesses
Question: What is the difference between spid, kpid and ecid in sysprocesses?
SQL SERVER – Observation – Adding a NULL Column and Table Space
It is always fun to receive a follow up comments when I write a blog post. Yesterday I wrote about SQL SERVER – Simple Query to List Size of the Table with Row Counts and here is the follow up question which I received about adding a NULL column.
SQL SERVER – How to Find Row Count of Every Table in Database Efficiently?
Question: How to Find Row Count of Every Table in Database Efficiently?