orphaned LDF file

  • Hello. I see a strange thing with one of our databases (SQL Server 2000).

    When I do sp_helpdb it shows that this db has only one log file log01.ldf. But in the folder there is also log02.ldf that seems to be active. It is backed up when we run backup of this db, dbcc sqlperf(logspace) shows the total amount of log01 and log02. I also just in case checked other databases to see if it is attached to them but it isn't. Next week I will need to shrink log files and detach/reattach this db. I don't know if I need to add this log02 to attach script or not. Thank you in advance for your help.

  • I did some more queries in master.dbo.sysaltfiles and found this file there. how come it doesn't show up in db properties?

  • you are running which build of SQL ? SP4 or higher ?

  • What do you see in output when you run the following query under the same database:

    Select * From dbo.sysfiles

    HTH!

    MJ

  • Sql 2000, SP4

  • Hi, MJ.

    When I run select * from sysfiles I see only one log file log01.

    when I query sysaltfiles select * from master..sysaltfiles i see log02 file that belongs to this db.

    Thank you,

    LL

  • Then you dont need that second log file for this database.

    MJ

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

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