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 – 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 – Start SQL Server Instance in Single User Mode
How to start a SQL Server instance in single user mode: add the -m; startup parameter in SQL Server Configuration Manager and restart the service.
Contained Databases and Contained Users
Understand contained users in SQL Server databases, how they travel with a database, and the security trade-offs of partial containment.
SQL SERVER – Shrinking NDF and MDF Files – A Safe Operation
Is shrinking NDF and MDF files safe? A reader asked if it causes data loss. It does not, but I explain why shrinking them is often not a good idea.
Connecting Excel to SQL Server Safely
Connecting Excel to SQL Server safely means a narrow read-only view, a scoped login, controlled refresh load, and no saved password in the workbook.







