Wednesday, March 7, 2012

Free/Used space of a transaction log file

Hello,
I am looking for a sp or view which shows the size of used/free space of a transaction log file
in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
How can I get this logfile information?
Thank You
Joachim1. This example summarizes space used in the current database and uses the
optional parameter @.updateusage.
USE pubs
sp_spaceused @.updateusage = 'TRUE'
2. sp_tempdbspace
This stored procedure can be used to get the total size and the space used
by the tempdb database. It is used without parameters.
3. Further you can use the following queries :-
Select * from master..sysaltfiles
Select * from sysfiles
Let me know if it served your purpose.
"Joachim Hofmann" wrote:
> Hello,
> I am looking for a sp or view which shows the size of used/free space of a transaction log file
> in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
>|||Joachim Hofmann wrote:
> Hello,
> I am looking for a sp or view which shows the size of used/free space
> of a transaction log file in SQL Server (2k), like the view 'Taskpad'
> in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
I used profiler to trace what EM does:
DBCC sqlperf(logspace)
DBCC showfilestats
--
remove RmEaMkOnViEoTHvIoS from my email
svi komentari i razmisljanja su moja kao pojedinca i nikako se ne smiju
povezivati sa tvrtkom u kojoj radim|||Yes, DBCC SQLPERF(LOGSPACE) shows what I wanted to know.
The other sp's / tables only show the database files, objects like tables or only the absolute
sizes.
Thank You
Joachim

No comments:

Post a Comment