Question: How to List All ColumnStore Indexes with Table Name in SQL Server? As ColumnStore Indexes are getting more and more popular.
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.
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.
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.
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.
Question: What is the difference between spid, kpid and ecid in sysprocesses?
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.