Corrupt mirror database

  • I have a database in recovery mode that was part of a mirroring test. I dropped the mirror on the principal and deleted the mirroring endpoints.

    The db still exist in the SQL studio manager but when I run, select * from select * from sys.databases it does not exist. The db does show up in the restore db options.

    When I right click on the database and click delete it says:

    The database 'Replication_Test' is enabled for database mirroring. Database mirroring must be removed before you drop the database. (Microsoft SQL Server, Error: 3743)

    I tried to restore the database with recovery and overwrite enabled and it says:

    System.Data.SqlClient.SqlError: RESTORE cannot operate on database 'Replication_Test' because it is configured for database mirroring. Use ALTER DATABASE to remove mirroring if you intend to restore the database. (Microsoft.SqlServer.Smo)

    So I run the following command "ALTER DATABASE Replication_Test SET PARTNER OFF" and it says:

    Msg 911, Level 16, State 1, Line 1

    Database 'Replication_Test' does not exist. Make sure that the name is entered correctly.

    Any ideas?

  • smitty-1088185 (1/3/2012)


    I have a database in recovery mode that was part of a mirroring test. I dropped the mirror on the principal and deleted the mirroring endpoints.

    The db still exist in the SQL studio manager but when I run, select * from select * from sys.databases it does not exist. The db does show up in the restore db options.

    When I right click on the database and click delete it says:

    The database 'Replication_Test' is enabled for database mirroring. Database mirroring must be removed before you drop the database. (Microsoft SQL Server, Error: 3743)

    I tried to restore the database with recovery and overwrite enabled and it says:

    System.Data.SqlClient.SqlError: RESTORE cannot operate on database 'Replication_Test' because it is configured for database mirroring. Use ALTER DATABASE to remove mirroring if you intend to restore the database. (Microsoft.SqlServer.Smo)

    So I run the following command "ALTER DATABASE Replication_Test SET PARTNER OFF" and it says:

    Msg 911, Level 16, State 1, Line 1

    Database 'Replication_Test' does not exist. Make sure that the name is entered correctly.

    Any ideas?

    Did you disable mirroring on the principle or just on the standby? I think you need to disable both.

  • :hehe:

    Please check the below link

  • I was able to successfully delete the mirror database but not the principal. I ran a restore with recovery and deleted the endpoints. The database deleted without errors.

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

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