Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The failover server has status (Mirror, Disconnected, In recovery) and principal server has status (Principal, Disconnected).

What is the process to reconnect these servers?

share|improve this question

migrated from serverfault.com Jan 3 '12 at 16:14

This question came from our site for system and network administrators.

    
Here's a related question that looks very similar to this one. Give it a look and see if it helps: Breaking and Restoring a mirror Here's are some quick steps on how to Pause or Resume Database Mirroring If you're still having trouble after reading through those, update your post with what you've all tried and we'll go from there. – Aaron Jan 3 '12 at 17:16

Sometimes restarting the mirroring endpoint on the principal server will resolve this.

To do this use the following T-SQL.

ALTER ENDPOINT Endpoint_Name STATE = STOPPED

ALTER ENDPOINT Endpoint_Name STATE = STARTED

To get the name of the endpoint.

SELECT * FROM sys.endpoints
WHERE type = 4

See KB 2490051 for more details.

share|improve this answer
1  
I had to restart the endpoint on mirror server as KB suggest as 2nd option. – Jan Zahradník Dec 4 '15 at 21:26

First, try to get them to reconnect with this T-SQL command on the principal:

ALTER DATABASE AdventureWorks2012 SET PARTNER RESUME;

If that fails, you've got a communications issue between the principal and the mirror, and that's where the fun begins. It can be anything from IP connectivity to security on the mirroring endpoints to different encryption methods. I'd recommend Robert Davis's book Pro SQL Server 2008 Mirroring if you need to get into deep troubleshooting.

share|improve this answer

In our case we're using certificate authentication for connecting mirroring endpoints, and the issue was because one of the certificates that the mirroring endpoints were using had expired.

You can check the expiration date of the certificate involved in endpoint authentication by doing a

SELECT * FROM sys.certificates  

If this is the case, you'll need to create new certificates for whatever expired, then do ALTER ENDPOINT after they have been been imported.

share|improve this answer

Case:

When you run below command on Principal server:

alter database  'Database_Name' set partner off

After running above command your DB goes in [mirror, disconnected] State on mirror server.

Resolution:

Step 1:Run below query on mirror

exec sp_resetstatus 'Database_Name'

Step 2: After running below command your DB will be available.

restore database 'Database_Name' with recovery

Note: Step 2 will take some time to recover.

share|improve this answer
    
This makes mirror totally disconnected and you have to establish mirroring again – Alexey F Aug 5 '15 at 15:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.