Manually fail over or fail back a Lync SQL mirrored database

In several cases you need to manually organize or switch databases on your mirror database/ SQL Server. Either after a reboot or simply some other issues.

The SQL queries are the most efficient solution and can be scheduled as well. But you need access to the SQL database. You can do this from remote, if you have the SQL Management Console installed

You need to execute a SQL QUERY as following:



You have to use and execute a SQL Query:

USE master;
ALTER DATABASE database_name SET PARTNER FAILOVER

database_name: name of the DB to fail over
Server where to execute: MUST be the primary database owner server, where the database is actually active

What I personally do is, I save SQLQuery on my Primary SQL and run this script every time I need to fail back the databases.

For those who think well, I could do this with Lync Management Shell. Sure you can do to.

Invoke-CsDatabaseFailover -PoolFQDN POOLFQDN -Databasetype "TYPE" -NewPrincipal "PRIMARY"

Where NewPrincipal is the Primary SQL (PRIMARY) or the Mirror SQL (MIRROR).

The Databasetype is the installed database associated with this SQL setup:
* Application
* Archiving
* CentralAdmin
* CentralMgmt
* Cls
* Edge
* Lyss
* Monitoring
* PersistentChat
* PersistentChatCompliance
* Provision
* Registrar
* User 


Comments

Popular posts from this blog

How to hide users from GAL if they are AD Connect synchronized

Cannot join external Lync Meeting: Lync Edge Server Single IP Address (Lync Edge Server Single IP Web Conferenceing Problem)

MFA with Guest Access and different tenants settings