You can manually rebuild a database involved in synchronization or replication.
You must have the SELECT ANY TABLE and SERVER OPERATOR system privileges to rebuild the database.
All subscriptions must be synchronized before rebuilding a database participating in MobiLink synchronization.
Contexte et remarques
This section applies to SQL Anywhere MobiLink clients (clients using dbmlsync) and SQL Remote.
Synchronization and replication are based on the offsets in the transaction log. When you rebuild a database, the offsets in the old transaction log are different than the offsets in the new log, making the old log unavailable. For this reason, good backup practices are especially important for databases participating in synchronization or replication.
Shut down the database.
Perform a full offline backup by copying the database and transaction log files to a secure location.
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 use in Step 8.
Rename the current transaction log file so that it is not modified during the unload process, and place this file in the dbremote offline logs directory.
Rebuild the database.
Shut down the new database.
Erase the current transaction log file for the new database.
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 0000698242 -ir -is database-name.db
When you run the Message Agent, provide it with the location of the original offline directory on its command line.
Start the database. You can now allow user access to the reloaded database.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|