Check Log Space - DBCC SQLPERF(LOGSPACE) :: SQL Server
There are two ways to check how much space your log files are taking up.
TSQL:
DBCC
Notes:
DBCC SQLPERF(logspace) is ok if you are only interested in consumption of your database log files. It shows the cumulative size of each log file for each database on the SQL Server instance. DBCC SQLPERF(logspace) also displays the amount of space consumed (as a percentage of total log file size).
n.b. Results from DBCC SQLPERF(logspace) only show an aggregate for the database.
Other useful DBCC values that can replace 'logspace' include:
( e.g. DBCC SQLPERF(IOSTATS))
LRUSTATS - LRU-MRU chain statistics (Free page scans always return zero).
NETSTATS - Statistics about ODS.
RASTATS - Read ahead activity (always returns zeros).
SPINLOCKSTATS - Statistics about spinlocks.
THREADS - I/O | CPU - memory usage per thread.
UMSSTATS - SQL thread management.
UMSSPINSTATS - Statistics about UMS.
WAITSTATS - Resources, wait types.
Useful Links:
http://msdn.microsoft.com/en-us/library/ms189768.aspx
http://www.sql-server-performance.com/2006/dbcc-commands/4/
IOSTATS - Outstanding reads & writes (always returns zeros). SQLPERF(LOGSPACE);
GO
Note: This way will show all the log files for every database.
SQL Server Management Studio:
1. Select a node for one of your databases within SQL Server Management Studio
2. Right Click and select Reports > Standard Reports > 'Disk Usage'
A report will open showing Disk Usage for this database including log space usage. SQLPERF(LOGSPACE);
There are two ways to check how much space your log files are taking up.
TSQL:
DBCC
Notes:
DBCC SQLPERF(logspace) is ok if you are only interested in consumption of your database log files. It shows the cumulative size of each log file for each database on the SQL Server instance. DBCC SQLPERF(logspace) also displays the amount of space consumed (as a percentage of total log file size).
n.b. Results from DBCC SQLPERF(logspace) only show an aggregate for the database.
Other useful DBCC values that can replace 'logspace' include:
( e.g. DBCC SQLPERF(IOSTATS))
LRUSTATS - LRU-MRU chain statistics (Free page scans always return zero).
NETSTATS - Statistics about ODS.
RASTATS - Read ahead activity (always returns zeros).
SPINLOCKSTATS - Statistics about spinlocks.
THREADS - I/O | CPU - memory usage per thread.
UMSSTATS - SQL thread management.
UMSSPINSTATS - Statistics about UMS.
WAITSTATS - Resources, wait types.
Useful Links:
http://msdn.microsoft.com/en-us/library/ms189768.aspx
http://www.sql-server-performance.com/2006/dbcc-commands/4/
IOSTATS - Outstanding reads & writes (always returns zeros). SQLPERF(LOGSPACE);
GO
Note: This way will show all the log files for every database.
SQL Server Management Studio:
1. Select a node for one of your databases within SQL Server Management Studio
2. Right Click and select Reports > Standard Reports > 'Disk Usage'
A report will open showing Disk Usage for this database including log space usage. SQLPERF(LOGSPACE);
No comments:
Post a Comment