Suspect Database Issue

  • Environment: SQL Server 2000 Standard (SP3) on Windows 2000 Server (SP3).

    During Recovery of a database I get the following error:

    "LogWriter: Operating system error 33(The process cannot access the file because another process has locked a portion of the file.) encountered."

    this is followed by "Write error during log flush. Shutting down server"...

    and eventually the Database Log file is unavailable and the database is marked as suspect. I have rebooted a couple of times, but has not helped. All drives have at least 15 GB of space free. (System drive, Data drive, Log drive). There are numerous other databases on this SQL Server which are working normally.

    Has anyone seen this error before? How do I figure out what "other" process has a portion of the log file locked? Any help would be appreciated. I am hoping not to have to restore an older version of this database if possible...

    Thanks,

    Mike

  • i think u can recover database using

    this procedure

    first use "sp_resetstatus<DbName>" system proc to resetstatus

    after that use dbcc dbrecover<Dbname>

    than restart u r server .

  • Do you have any kind of backup application running in this server to try to backup database files? What about anti-virus application?

  • I have tried running sp_resetstatus(DBNAME) and then restarting SQL Server...did not help. I have also tried running sp_resetstatus(DBNAME) and then DBCC DBRECOVER(DBNAME) and I get the same error as before.

    Mike

  • We do not have a Backup Application running on this server that looks at the database files. Also, we have disabled the Anti-Virus program, but we are still getting the errors.

    Mike

  • Check your machine application/system logs for any related errors.

    Do you mind post the result of srvinfo \\yourmachinename?

  • This is an error message reported when the automatic recovery of the database fails. The only way which i can suggest is go to the sysdatabase in the master database change the status of your database as -32768 and restart the server. You would now be see the table contents of the database , Use the Export / Import option and copy the tables to another system. I am sure it would work ...

  • Sounds like your log file may be corrupted, have you tried sp_detach_db, then completly delete the log file, and run sp_attach_single_file_db?

    jimmY

    Work like you don't need the money.

    Love like you've never been hurt.

    And Dance like no one is watching.


    Work like you don't need the money.
    Love like you've never been hurt.
    And Dance like no one is watching.

  • Thanks for all the feedback.

    I could not do a database detach because the database is setup for replication.

    I ended up restoring an older version of the database and all is fine now. Still not sure what actually locked a portion of that particular log file. When the SQL Server services were shut down...I was able to rename the log file, move it, etc. so something inside SQL Server was locking it while trying to recover the database during startup.

    Mike

Viewing 9 posts - 1 through 8 (of 8 total)

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