• 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
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...