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

SQL Anywhere 10.0.1 » SQL Anywhere 10 - Changes and Upgrading » Upgrading to SQL Anywhere 10 » Upgrading SQL Anywhere

Rebuilding version 10.0.0 databases Next Page

Upgrading SQL Anywhere software and databases in a database mirroring system


When you are using database mirroring, extra steps are required to apply a SQL Anywhere maintenance release or EBF, or upgrade the database file.

Installing SQL Anywhere maintenance releases in a database mirroring system

All servers in a database mirroring system must be using the same maintenance release of SQL Anywhere. If you use the following procedure to apply a SQL Anywhere maintenance release, the only time the database is not available is during steps 3 and 4.

To apply a SQL Anywhere maintenance release to a database mirroring system
  1. Shut down the mirror server by issuing a dbstop command.

  2. Install the new version of SQL Anywhere on the mirror server.

  3. Shut down the primary and arbiter servers by issuing a dbstop command for each server.

  4. Install the new version of SQL Anywhere on the primary server.

  5. Restart the primary and mirror servers.

  6. Install the new version of the software on the arbiter.

  7. Restart the arbiter.

Applying SQL Anywhere EBFs in a database mirroring system

To install an EBF, you must do the following for each database server in the mirroring system (primary, mirror, and arbiter servers):

  1. Stop the database server by issuing a dbstop command.

  2. Install the EBF.

  3. Restart the server.

The only downtime occurs during the failover caused by shutting down the primary server.

See also
Upgrading databases in a database mirroring system

There are two procedures you can use to upgrade or rebuild a database that is participating in a database mirroring system. The first process is simpler, but it has a longer database downtime than the second procedure.

To upgrade or rebuild a database in a database mirroring system
  1. Shut down the mirror server.

  2. Shut down the primary server.

  3. Upgrade or rebuild the database using the copy on the primary server. See Upgrading version 10.0.0 databases or Rebuilding version 10.0.0 databases.

  4. Copy the upgraded or rebuilt database and transaction log to the mirror server.

  5. Restart the primary server.

  6. Restart the mirror server.

    Note

    Any renamed transaction log files should be moved because they are incompatible with the new database. An initial transaction log file is required on both servers for mirroring to start. You can create a transaction log file by executing a dbping command against the database.

To minimize downtime while upgrading or rebuilding a database in a database mirroring system
  1. Make a backup of the database and rename the transaction log.

  2. Run the dbtran utility to display the starting offset and ending offset of the database's current transaction log file.

    For information about using dbtran to obtain transaction log offsets, see Rebuilding databases involved in synchronization or replication.

    You need to save and reset the transaction log offsets so you can apply any transactions that occur during Steps 2 through 6 to the upgraded or rebuilt database.

  3. Upgrade or rebuild the backup copy of the database on a different computer. See Upgrading version 10.0.0 databases, or Rebuilding version 10.0.0 databases.

  4. Use the dblog utility to reset the log offset information to correspond to the settings obtained in Step 2. For example:

    dblog -x 0 -z 137829 database-name.db

    For more information about using dblog to reset transaction log offsets, see Rebuilding databases involved in synchronization or replication.

  5. The following steps are optional:

    1. Back up and rename the transaction log on the primary server.

    2. Apply the transaction log obtained in Step 5.a to the rebuilt database using dbeng10 -a.

  6. Shut down both the primary and mirror servers.

  7. Save the current copy of the transaction log on the primary database.

  8. Copy the upgraded or rebuilt database to the primary and mirror servers.

  9. Copy the transaction log from Step 7 to both the primary and mirror server.

  10. Start the primary server.

  11. Start the mirror server.