Maintaining transaction logs for remote databases

Use the following procedure to maintain your 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.

Caution

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

 To maintain remote database transaction logs
  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 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 the SQL Remote Message Agent (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 group or just for the user contained in the SQL Remote Message Agent (dbremote) connection string.

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

    SET OPTION PUBLIC.delete_old_logs = '10 days';

Back up remote databases