Transaction log problems with Attach

  • Please could anyone help with this minor crisis:

    Running SQL Server 2000 with NT Server:

    - Message that transaction was full so that new data could not be entered

    - We backed up the log twice but still got the transaction log full message

    - Attempted to detatch the database, delete the transaction log and reattatch it. Error message that detatch was impossible as log full, but it appeared to detatch

    - Deleted the log file but when we attempted to reattach got message 'Attatch fails, physical file name (.ldf file) may be incorrect'

    - Tried copying the mdf file to another server in order to reattatch but get the same message about the physical transaction log.

    At the same time a full server backup failed as did the backup to tape. Fortunately a local backup to the server was OK but it was two days old and we need to get the data out of that mdf file as well as finding out why the problem happened.

    Many thanks

    Claire

  • You probably need to use sp_attach_single_file_db. If you use sp_attach_db it expects the information about the TL to be included, the other will build a new TL for the db.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Thankyou. I tried sp_attach_single_file_db but got the same message: physical file name (of log file) may be incorrect. Could it be because we got an error when we detached?

    Claire

  • Could be but I have not run into this so cannot confirm. I will check around if anyone here has any ideas.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Do you have space free on the server? Are you replicating the db? If you are and the log reader fails you wont be able to clear transactions from the log.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

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

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