• subscribe
January 25, 2006 12:00 AM

Finding an Individual Log File

SQL Server Pro
InstantDoc ID #48845

I want to find an individual database log file. Besides dbcc sqlperf(logspace), is there any T-SQL command that will provide this file?

From the user database context in SQL Server 2000, use the following statement:

SELECT * FROM sysfiles    WHERE (status & 0x40 = 0x40) 

This statement also works in SQL Server 2005, but a better alternative would be:

SELECT * FROM sys.database_files     WHERE type = 1 

—Gert Drapers
Development Manager
Visual Studio Team System

 



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here