Initiate failover. You can do this by stopping the primary server (currently mirror_server1) in one of the following ways:
Click Shut Down on the database server messages window.
Use the Windows Task Manager to end its task.
Run the following command:
dbstop -y -c "UID=DBA;PWD=sql;SERVER=mirror_demo_primary" |
If a warning message appears indicating that the database server still has one connection, click Yes to shut it down.
The arbiter database server messages window displays a message indicating that the primary server is disconnected.
The database server messages window for mirror_server2 displays a message indicating that it is the new primary server:
Close Interactive SQL. If you receive an error message, click OK.
Restart Interactive SQL by running the following command:
dbisql -c "UID=DBA;PWD=sql;SERVER=mirror_demo_primary;HOST=localhost:6871,localhost:6872" |
Execute the following statement to verify that the server that was previously acting as the mirror server (mirror_server2) is now acting as the primary server:
SELECT PROPERTY ( 'ServerName' ); |
Execute the following statement to verify that all transactions were mirrored to the mirror database:
SELECT * FROM test; |
Disconnect from Interactive SQL.
Proceed to Lesson 3: Monitoring a database mirroring system.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |