Which tables does a procedure use, and which procedures use a table? sys.sql_expression_dependencies answers both, with referenced and referencing objects.
SQL SERVER – 2012 – List All The Column With Specific Data Types in Database
An updated SQL Server 2012 script to list every column with specific data types in a database, including user data types, schema and table names.
SQL SERVER – Columnstore Index and sys.dm_db_index_usage_stats
My Columnstore index DMV script failed on SQL Server 2012 RTM because sys.column_store_index_stats was gone. What I found next, with sys.dm_db_index_usage_stats.
Tuning Step One: Capture a Wait Stats Baseline Before Changing Anything
Capture a wait stats baseline, compare two saved snapshots, reject reset intervals, and rank meaningful waits before changing settings.
SQL SERVER – DMV sys.dm_exec_describe_first_result_set_for_object – Describes the First Result Metadata for the Module
The SQL Server 2012 DMV sys.dm_exec_describe_first_result_set_for_object describes the result columns of a stored procedure.
SQL SERVER – Finding Count of Logical CPU using T-SQL Script – Identify Virtual Processors
A friend needed to count Virtual Processors available to SQL Server 2000. Scripts for 2000 with xp_msver, and for 2005 to 2012 with sys.dm_os_sys_info.
Diagnosing Connection Pool Exhaustion From the SQL Server Side
Diagnose connection pool exhaustion by grouping SQL Server sessions, finding sleeping open transactions, and reading their last command.





