I often get asked a question about how actually Session ID of SQL Server is mapped to Operating System’s’ Thread ID. Well, the answer is very simple, here is the script which provides us three important details – SQL Session ID, OS Thread ID and OS Scheduler ID along with the state of the task.
SQL SERVER – DMV to Get Host Information – sys.dm_os_host_info
There was a time when SQL Server used to run on only Microsoft Windows. However, the time has changed and SQL Server now runs on Linux as well. This is indeed a great move as I believe database such as SQL Server should be running on multiple platforms. This is indeed a very interesting but it ads one more additional check before I jump into Comprehensive Database Performance Health Check. In this blog post, we will learn about how to get host information from OS.
SQL SERVER – How to Rename Extention of MDF File? – A Simple Tutorial
The other day while working with a customer during SQL Server Performance Tuning Practical Workshop, I noticed an MDF file with very strange extensions. When I asked the DBA why they have such a large data file with extension PDF (instead of common MDF file extension), he replied that honestly they have no idea who to rename a data file extension. They had once tried earlier, but that has sent their database into recovery and they had to revert that back immediately.