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 Remote » Managing SQL Remote systems » SQL Remote system backups

 

Maintaining transaction logs for remote databases

Maintain remote database transaction logs when you are relying on replication to the consolidated database to back up your remote databases. That is, you are not running the Backup utility (dbbackup) on the remote databases and transaction logs.

Prerequisites

There are no prerequisites for this task.

Context and remarks

Caution

Do not run the SQL Remote Message Agent (dbremote) with the -x option on a database that is being backed up.

 Task
  1. On the remote database, run the SQL Remote Message Agent (dbremote) with the -x option and specify a size for the transaction log. This option causes the SQL Remote Message Agent (dbremote) to rename and restart the transaction log when the transaction log exceeds the specified size.

    The following command deletes the transaction log when it is larger than 1 MB:

    dbremote -x 1M  -c "UID=ManagerSteve;PWD=sql;DBF=c:\mydata.db" 
  2. On the remote database, set the delete_old_logs option to On. Setting the delete_old_logs_option causes the old transaction log files to be deleted automatically by dbremote when they are no longer needed for replication.

    A transaction log is no longer needed when all subscribers have confirmed that they have received and successfully applied all the changes recorded in that transaction log file. You can set the delete_old_logs option either for the PUBLIC role or just for the user contained in the dbremote connection string.

    The following statement sets the public delete_old_logs option to delete transaction logs that were created more than 10 days ago:

    SET OPTION PUBLIC.delete_old_logs = '10 days';

Results

The database transaction logs are deleted according to the specified rules.

 See also

Backing up a remote database