Contents Index Upgrading consolidated databases Using passthrough mode

SQL Remote User's Guide
  Administering SQL Remote for Adaptive Server Anywhere
    Transaction log and backup management

Unloading and reloading a database participating in replication


If a database is participating in replication, particular care needs to be taken if you wish to unload and reload the databases.

For instructions for unloading and reloading a database in Upgrading the database file format. The instructions in that section apply to databases involved in SQL Remote replication.

This section describes a manual way of unloading and reloading a database, and is provided in case there are special circumstances that make the use of the more automated procedure referenced above impossible, such as a schema or other significant database change.

Replication is based on the transaction log. When a database is unloaded and reloaded, the old transaction log is no longer available. For this reason, good backup practices are especially important when participating in replication.

To unload and reload a consolidated database (manual)

  1. Shut down the existing database.

  2. Perform a full off-line backup by copying the database and transaction log files to a secure location.

  3. Run the dbtran utility to display the starting offset and ending offset of the database's current transaction log file. Note the ending offset for later use.

  4. Rename the current transaction log file so that it is not modified during the unload process, and place this file in the off-line directory.

  5. Start the existing database.

  6. Unload the database.

  7. Shut down the existing database. This database and any log file created in this and the previous step is no longer needed.

  8. Initialize a new database.

  9. Reload the data into the new database.

  10. Shut down the new database.

  11. Erase the current transaction log file for the new database.

  12. Use dblog on the new database with the ending offset noted in step 3 as the -z option, and also set the relative offset to zero.

    dblog -x 0 -z 137829 database-name.db
  13. When you run the Message Agent, provide it with the location of the original off-line directory on its command line.


Contents Index Upgrading consolidated databases Using passthrough mode