database files

Moving Database Files to Another Location

March 19, 2016 | 0 Comments

Although moving database files around is simple, it is a still big deal.  When you do this, you are moving the entire database contents to another location.  If you [...]

Database File Space and Free Space

March 19, 2016 | 0 Comments

/* Author: Ben Farnsworth Date: 1/7/14 Get info on Data files */ IF OBJECT_ID('tempdb..#space') IS NOT NULL DROP TABLE #space create table #space( name varchar(100) ,filename [...]

SQL Server – Get Size of Database Files

March 19, 2016 | 0 Comments

This script gets the size of each database file, not including backups. Essentially, you’ll see .MDF, .NDF, and .LDF files. SELECT DISTINCT bus.database_name , [...]