How to get the actual log file space used

  • Azzam I hope u didn't got my problem.

    sysfiles never gives actual transaction log file used, it only gives allocated log file size and maximum log file size.

     

  • I recently spent a considerable amount of time trying to do just that.  What I discovered is that SQL considers multiple transaction log files to be a single container.  You can get space information about all the log files together, but not individually. Perhaps someone has figured out a way, but I was unable.

    Steve

  • How about select * from sysfiles, this will show the database physical files and their sizes. You may want to insert the result into a table and format output as you wish.

  • select [name],cast(FILEPROPERTY(name,'SpaceUsed') as int)*8 as SpaceUsedKB

    from sysfiles

     

  • Try: dbcc sqlperf(logspace)

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Mr Pavan Mr.Rudy komacsar

    may correct

    DBCC SQLPERF(LOGSPACE)

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply