Tuesday, June 29, 2010

How to remove SQL Mirroring from MOSS 2007

So mirroring technology with SharePoint 2007 does not seem to be working as expected. As a consequence, the decision to remove it from our production servers was made.

I have been trying to remove the mirroring from the SQL Serve 2008 R2, and it still shows the Mirror Databases on the secondary server.  Worse, the status does not change, it is still showing as (Restoring).


from the MSDN, this is supposed to be an easy step: ms189112 but it is not.!

As you can see, my SQL1 server has the actual databases, while SQL2 is supposed to have the mirrors of SQL1.

A quick search on the internet turned nothing to the (Restoring…) status message.  Connecting to the second SQL Server and trying to delete the database were encountered with failure.

TITLE: Microsoft SQL Server Management Studio

Alter failed for Database 'SPSProd_Main_Search'.  (Microsoft.SqlServer.Smo)

For help, click: Some useless article on MSDN


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


ALTER DATABASE is not permitted while a database is in the Restoring state.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5052)

  Then I went into the query editor and ran the

DROP DATABASE <databasename> from the master databases. It worked.!


Command(s) completed successfully.!  :)