I came across a fantastic T-SQL script that offers an additional feature for changing the recovery mode while enabling and disabling indexes.
Reviewing a Table Change Script Before It Locks Production
Review a table change script for schema locks, data rewrites, supported online options, backfill batches, and a tested rollback.
SQL SERVER – Find Current Location of Data and Log File of All the Database
A one line query on sys.master_files that shows the current data and log file location for all databases, handy when cleaning up old .mdf and .ldf files.
SQL SERVER – List All Server Wide Configurations Values
I forgot the syntax to check the two digit year cutoff, so I listed all Server Wide Configurations with sys.configurations. A small script worth saving.
SQL SERVER – Reasons to Backup Master Database – Why Should Master Database Backedup
Why should you backup master database? It holds all logins, system configuration and the details SQL Server needs to reach every other database.
SQL SERVER – Restore Master Database – An Easy Solution
A two step easy way to restore master database: start SQL Server in single user mode, then restore from a full backup of master. No full backup, no restore.
SQL SERVER – Simple Example of Reading XML File Using T-SQL
A simple example of reading XML file content using T-SQL: load the XML into a variable and pull out elements and attributes with value() in a SELECT.







