Reducing CXPACKET wait stats on a high transactional database: what CXPACKET means, and when lowering the degree of parallelism really helps.
SQL SERVER – Get All the Information of Database using sys.databases
A handy script from Matteo that uses sys.databases to show plenty of database information, like status, data and log file counts and their sizes in MB.
SQL SERVER – Get Database Backup History for a Single Database
A reader script by aasim abdullah to get database backup history for a single database: backup file, size, time taken, LSNs and the type of each backup.
A Bill of Materials With a Recursive CTE
Expand a bill of materials with a recursive CTE, multiply quantities across levels, trace component paths, and guard against cycles.
Schema-Bound Views: Protect Referenced Columns
Schema-bound views protect referenced columns during table changes. Compare blocked DDL with compatible additions, and check how an ordinary view can retain stale metadata until it is refreshed.
Leap Years in T-SQL: February 29 and Date Math
Handle leap years in T-SQL with date functions, test February boundaries, and choose a clear anniversary rule for February 29 births.






