Browse by Tags

TSQL to get default location of database data and log files?
08 January 08 05:37 AM | SQL Master | 2 Comments   
By default the SQL Server database data & log files are created on the default data directory which is Program Files or based on where SQL binary files are installed. In order to find what is the default location you can run following TSQL: declare Read More...
TSQL to compare log file to data file in a database
01 August 07 02:07 AM | SQL Master | 1 Comments   
SELECT @@servername as ServerName , db_name ( database_id ) as DatabaseName , Name as LogiCalFileName , Physical_Name [Physical file] , ( size * 8 )/ 1024 [Size_MB] FROM sys.master_files Read More...
Filed under: , ,