Force the mirror server to take over as the primary server in situations where all other attempts have failed. This method uses the ALTER DATABASE statement with the FORCE START clause and can result in losing committed transactions.
You must have the privileges specified by the -gd database server option (SERVER OPERATOR system privilege, by default).
The partner servers must have been started with the -su database option, so that you can connect to the utility database on the mirror server.
You have already tried manually stopping the primary server and restarting it and executing an ALTER DATABASE statement with the SET PARTNER FAILOVER clause.
Context and remarks
You can only use the ALTER DATABASE FORCE START statement when the following conditions apply:
Using the FORCE START clause can result in the loss of transactions if the primary server contains transactions that the mirror server does not have.
It is recommended that you restart the primary and execute ALTER DATABASE with the SET PARTNER FAILOVER clause to force a failure without lost transactions. The FORCE START clause should only be used when the primary cannot be restarted as a last resort.
Stop the mirror database, and if possible the mirror server.
If the database and transaction log files from the primary server are available, back them up and validate the backed up copies. Otherwise back up and validate the transaction log.
If the database file and the transaction log file from the primary server are valid, then copy both files to the mirror server.
If the database file from the primary is invalid, but the primary transaction log file is valid, then:
Apply the primary log file to a backup of the mirror database and validate the database.
Copy the database and transaction log file to the mirror server.
Start the database on the mirror server (or restart the mirror server) with mirroring enabled. If you are restarting the mirror server, specify the -su database option, so that you can connect to the utility database.
Connect to the utility database, utility_db, on the mirror server.
Execute an ALTER DATABASE FORCE START statement to force the mirror server to become the primary server.
The following statement forces the mirror server for the database mymirroreddb.db to become the primary server.
ALTER DATABASE mymirroreddb FORCE START;
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|