devxlogo

February 25, 2020

Find error log location

It is quite easy to find the error log location through a quick query such as : SELECT SERVERPROPERTY(‘ErrorLogFileName’) AS ‘Error log file location’   This shows where your Error log file is stored

DBCC SHRINKDATABASE

DBCC SHRINKDATABASE The command shrinks the size of the data and log files in a database. Here is a small example: DBCC SHRINKDATABASE (Database_Name, 10);  –This allows for 10 percent free space in the database.

Monitor Log space in SQL Server quickly

You can use the following command to monitor all your databases’ log file’s free space DBCC SQLPERF (‘LOGSPACE’)