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_name SET PARTNER FAILOVER
database: name of the DB to fail over
Server where to execute: the primary server, where the database is 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 -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:
Author: Thomas Pött Managing Consultant Microsoft UC