Suspect Database deleted automaticaly after cancelled restore

  • Hi there!

    Something strange happend today whith Enterprise Manager.

    I was trying to move the published database to another hard drive (without dropping the publications), so I did as usual:

    1.I made a full backup.

    2. Stoped the SQL Server service.

    3. Renamed the .mdf so the database should go into "suspect"

    4. Started the SQL Server service.

    5. My database goes in "suspect" (as I intended)

    6. With EM I started a restore from the backup I made earlier specifying another drive letter for .mdf and .ldf

    Here is the interesting part:

    I cancelled the restore process (don't ask me why)

    I look in EM for my suspect database and it WASN'T THERE. EM deleted it and the phisical ldf too.

    I had a backup of my system databases. I restored them and my database was again suspect.

  • Just curious ... couldn't you just:

    1) stop replication

    2) detach the database

    3) move the mdf/ldf files

    4) attach the database

    5) restart reoplication ?

    I'm no replication expert but it seems that you've taken the hard way on this one.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • How can I just stop replication? Disable publishing?

    When I have 130 subscribers this is not a solution!

    I'm interested although in your method.

  • You will have a brief outage. For example:

    --> 2-3 minutes - Stop replication (I'll cover that last)

    --> 1 minute - sp_detachdb

    --> 12 minute - copy database (10 Gb mdf & 2 Gb ldf)

        (I just did a test on a production SQL Server with 600+ active users and got 1 Gb/Minute copy throughput)

    --> 1 minute - sp_attachdb

    --> 2-3 minutes Start replication

    So all in all 20 minutes downtime.

    I'm not a replication expert (very 'rusty' - my last repl was NT4 and SQL v7.0 SP1 !!!) but a little digging turned up this procedure for stopping replicarion for a database:

    --> Go to Replication Monitor in Enterprise Manager locate your publication

    --> Right click the Log Reader Agent and click Stop Agent

    --> Then click the Distribution Agent and click Stop Synchronizing

    You might not want to discount this method as a solution.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • You simply can not detach a database if it is published.

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

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