Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    14

    Unanswered: mirroring woes...

    Ok, I think I may have messed this up. The good news is this is our sandbox server, so no one is gonna kill me yet...

    The quick background was that I didn't setup a maintenance plan setup and the principal server ran out of disk space. I couldn't even start SS MGT studio. So I stopped the SS service on both the principal and mirror, and moved off the disk the largest mdf and ldf, so I could have room to backup/shrink the other dbs. Ok, so that being done...

    Now I want to reattach/restore the db that was moved off. I couldn't do it. When I tried to reattach the DB on the principal it went into recovery (perhaps because it was a really bloated log file) and wouldn't stop even after three days... Then I got impatient...

    So I dropped the mirroring, and made a backup from the mirror side since that DB was then acting as a principal. I shrunk it down, and *thought* I could just restore it to the principal, delete the db files in the mirror, and then restore to the mirror from the backups I copied to the principal, and setup the mirroring again.

    Should be easy right?

    Ugh...

    I can't seem to get the backups I made from the mirror to restore on the principal to restore and *not* sit in restore mode. It *seems* like the db still thinks it is the acting mirror... I can't see any properties because it states it is in restore.

    Heck, I am just confused now. How can I make the db that I restore on the principal just relax enough so I can then restore on the mirror, and then redo the mirroring partnership.

    Is there a 'restore but stop being a part of a mirroring notion' command?

    I need a magic wand (or more experience).

    Thanks.

    -Matt G.

  2. #2
    Join Date
    Jul 2009
    Posts
    14
    So, on the principal, when I run the following against a 5GB mdf and a 500K ldf (which were backups from the mirror when acting as principal)

    Code:
    RESTORE DATABASE WSS_Content_Staffsbx
        FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\WSS_Content_Staffsbx.bak' 
        WITH NORECOVERY
    GO
    RESTORE log WSS_Content_Staffsbx
    FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\WSS_Content_Staffsbx.ldf' 
    WITH NORECOVERY
    GO
    ...what is created in the data folder is a 5GB mdf, and a 14GB log file (hence why I had the problem - stop laughing! )

    Then it just sits there "restoring" and I can't do anything to it.

    Any thoughts?

  3. #3
    Join Date
    Jul 2009
    Posts
    14
    I ended up finding another site that suggested:

    Code:
    RESTORE DATABASE WSS_Content_Staffsbx
        FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\WSS_Content_Staffsbx.bak' 
        WITH RECOVERY
    GO
    ...and that allowed the DB to get its act together.

    Thanks anyway.

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    "RESTORE DATABASE WSS_Content_Staffsbx with recovery" would have done the trick for you. Sorry didn't see your post earlier.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Jul 2009
    Posts
    14
    That's ok, rdjabarov. Thanks for looking.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •