Reattaching a database error

  • Hello

    After problems on OS in my server with Small buisiness server sql server return to me this error.

    "Error 9003 : the LSN(234503:16:12) passed to log scan in database 'Planitoi' is invalid

    Note : my server configuration before the crash was 2 partitions , one just for Operating system, an the other one for only data where i keeping in one directory named BDSQL all my sql databases

    Please give me your helps because in this moment i can´t reattached my database.

    Many thanks

    Luis Santos

     

     

  • How are you attaching your database? That type of error usually means that the LOG file (.ldf) doesn't match the DATA file (.mdf).

    You could try just attaching the .mdf and ignoring the .ldf.

    If you want to try that, move or rename the .ldf file. Then attach just the .mdf. If you use Enterprise Manager, just select the .mdf. If you use Query Analyzer, use sp_attach_single_db_file. Look in the Books OnLine for the full syntax.

    -SQLBill

  • Thanks for your reply, but the problem is on my MDF file (error 9004) because i have tried your suggestion without success.

    In fact when we tried to re-attach the database it was not attached and we suspect that the MDF file is corrupt.

    The computer had to be formatted only on system drive c: because like i said all my databases were on drive F:

    I dont´know if it exists software tools to repair MDF files.

    I hope anyone can give me a hint

    Many thanks

    Luis Santos

     

  • Did you have to reload SQL Server? If so, did you use all the same settings? And apply all the same Service Packs?

    If the Version and Service pack aren't the same as when the original MDF, it won't reattach.

    If the settings (collations) aren't the same, again it won't attach correctly.

    If you had to reinstall SQL Server, the MASTER database probably got reinstalled. It won't have any 'knowledge' of that database. Try moving the .mdf file or temporary renaming it. Create a new database with the name of the one you are trying to restore. Detach the database. Delete the .mdf and .ldf files. Move or rename the original .mdf/.ldf files back to where/what they where and then try to attach them.

    -SQLBill

  • Hello

    We had trying your suggestion , but the problem is always the same because the MDF is corrupted.

    The configuration of SQL SERVER is exactly equal of the original installation.

    Also the service pack is the same.

    In this moment , i think just in one product solution to repair yhe MDF but i can´t try it on some sites .

    I don´t know if you know any one to solve the problem.

    Thanks again

    Luis Santos

     

     

  • If the .mdf is truly corrupted, I don't know of anything that wil fix/repair it.

    Do you have backups?

    -SQLBill

  • Yes , i had jobs to makes backups on every day of the week, but also this backups (.BAK) failed wehn i try to restore the database.

    This is an invulgar problem like you could see.

    i´am very surprised and disappointed that SQL SERVER don´t have any tool to repair an MDF file that was or wasn´t attach to them, or to repair simply the .BAK file

    we ask for aid to Microsoft Portugal sending to them the database, i hope that they can recover the database, this is maybe the last chance.

    I´m sincerely greatful for all yours replies to try to help me and if they will be capable , i´m sending you the solution.

    Best regards

    Luis Santos

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

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