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
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.
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.