Manually fail over or fail back a Lync SQL mirrored database
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:
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: