How is a SQL Server Session ID mapped to an OS Thread ID? Here is a simple script to match Session ID to OS Thread ID, with the scheduler and task state.
SQL SERVER – DMV to Get Host Information – sys.dm_os_host_info
SQL Server now runs on Linux too, so I check the host first in health checks. Here is how the DMV sys.dm_os_host_info returns Host Information about the OS.
Rename MDF File Extension in SQL Server, Step by Step
To rename MDF file extension values safely, take the database offline, tell SQL Server the new file name, rename the file on disk, and bring the database online. This post walks through the four steps on a demo database. It also explains the RECOVERY_PENDING state you see when the two names don’t match.






