Transaction log file space usage check | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Transaction log file space usage check

Hi Freinds,
Is there any query that can retrieve the current usage by transaction log file. Please, help.
Thanks,
Rabani

SELECT name, physical_name, size, max_size, growth FROM sys.master_files
WHERE name = ‘templog’
Change "tempdb" to the logical name of the transaction log file you are interested in.
Size and Max_size, are returned in 8-KB pages. Divide by 128 to convert to MB
Documentation for this system table is here:
http://msdn.microsoft.com/en-us/library/ms186782(SQL.90).aspx

HI Rabani,
Can you check this? I think this will be helpful to you.
http://support.microsoft.com/kb/281879
Regards
-Johnson

dbcc sqlperf(logspace)

Pavel
SQLPERF(LOGSPACE) will get you % of space used by the log, however the OP asks about actual physical file usage in terms of MB or GB.

[quote user="satya"]
Pavel
SQLPERF(LOGSPACE) will get you % of space used by the log, however the OP asks about actual physical file usage in terms of MB or GB.
[/quote]Besides that, the question was posted in 2009. [:)]
Did you try this query?
dbcc sqlperf(logspace)
Db name Log_Size(MB) Log space Used%
master .4921875 84.12698 0
tempdb 26.17969 36.64578 0
model 0.4921875 80.95238 0
msdb 1.992188 43.33333 0
I ans this questing knowing the fact that, it is an old question. However, I felt the ans should be dbcc sqlperf(logspace). In case any one still look for something like this today.

Appreciate your concern, but your response is for inside the transaction log usage and OP has specifically asked about Tlog file space usage, which means on the operating system.
Anyhow please share your knowledge that can help the users here [:)], don’t think that I’m picking you on this one.

T-Log Size? Or log size? Because Log size can be determined by dbcc sqlperf(logspace)

Yes, the logical size and returns the current size of the transaction log and the percentage of log space used for each database. You can use this information to monitor the amount of space used in a transaction log.

]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |