A PowerShell way to get a list of fixed hard drives and free space on server: MVP Ravikanth’s short script with Get-WmiObject and Win32_LogicalDisk.
SQL SERVER – Get Directory Structure using Extended Stored Procedure xp_dirtree
Need to list a directory structure from T-SQL? The undocumented xp_dirtree procedure does it, and here is how to save its output in a temp table.
Temp Table Caching: Why Some Temp Tables Get Reused
Understand temp table caching in stored procedures, avoid cache blockers, inspect creation counters, and review retained statistics.
SQL SERVER – Question to You – When to use Function and When to use Stored Procedure
Deciding when to use functions or stored procedures depends on the caller and required work. I want examples behind that choice.
SQL SERVER – 2012 – Executing Stored Procedure with Result Sets
Denali lets you execute a stored procedure with result sets and rename its columns at run time, with no temp table needed. Here is a quick script.
Finding the Slowest Stored Procedures With sys.dm_exec_procedure_stats
Find the slowest stored procedures with cache statistics, compare CPU and reads, and use two snapshots to isolate one busy hour.
SQL SERVER – System Stored Procedure sys.sp_tables
Most people run SELECT * FROM sys.tables to list tables. If you do not need all those details, sys.sp_tables returns tables and views with schema names.







