Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » High availability and read-only scale-out systems » Database mirroring » Maintaining a database mirroring system


Moving a partner server

To move a server in a database mirroring system to a different server without stopping the system, delete the mirror definitions of the current mirror server, create a new server, and add the new server to the mirroring system.


You must have the MANAGE ANY MIRROR SERVER privilege.

This task involves backing up a copy of the database. Depending upon the backup method you choose, see the appropriate privileges for that method.

Context and remarks

Examples in this topic reference localhost in the connection strings. Replace these references with the actual computer names.

  1. Connect to the partner server that you want to move and ensure that it has the mirror role. You can only move the partner with the mirror role. If the server you want to move to is the primary server, you must initiate a failover so that the primary and mirror servers switch roles

  2. Create a new directory for the new partner server.

  3. Connect to the primary server.

  4. Drop the partner definition for the server being moved by executing a DROP MIRROR SERVER statement.

    The mirror database stops. If the mirror database is the only database running on the server, then the server also stops.

  5. Create a new partner definition for the server to become the new partner. For example, execute the following statement:

  6. Update the primary and mirror definitions. For example, execute the following statements:

    ALTER MIRROR SERVER mirror_demo_primary AS PRIMARY 
    ALTER MIRROR SERVER mirror_demo_mirror AS MIRROR
  7. Make copies of the primary database file and transaction log and add them to the new partner server directory. For example, run the following command:

    dbbackup -c "UID=DBA;PWD=sql;SERVER=mirror_server1;DBN=mirror_demo" server3
  8. Start the new partner server with the -xp on option so that the new partner can join the mirroring system. For example, run the following command:

    dbsrv16 -n mirror_server3 -x "tcpip(PORT=6874)" -su sql "c:\server3\mirror_demo.db" -xp on
  9. Connect to the new partner server and verify that it is the mirror server.


The mirror system is running with the new partner server.


Ensure that clients connecting to the primary server or mirror server have their connection strings updated to specify the addresses of both partners in the Host connection parameter.

 See also