Sybase DC38133-01-0902-01 manual Managing old transaction logs

Models: DC38133-01-0902-01

1 485
Download 485 pages 33.95 Kb
Page 271
Image 271

Chapter 11. Administering SQL Remote for Adaptive Server

Anywhere

Old log names different before 8.0.1

Prior to release 8.0.1 of Adaptive Server Anywhere, the old log files were named yymmdd01.log, yymmdd02.log, and so on. The name change was introduced to allow more old logs to be stored. As the Message Agent scans all the files in the specified directory, regardless of their names, the name change should not affect existing applications.

Managing old transaction logs

Using the

Delete_old_logs option

Example

All transaction logs must be guaranteed available until they are no longer needed by the replication system: at that point, they can be discarded.

The replication system no longer needs the logs when all remote databases have received and successfully applied the messages contained in the log files. Remote databases confirm the successful receipt of messages from the consolidated database, and the confirmation sets a value in the consolidated database SQL Remote tables (see “The message tracking system” on page 237). The old transaction logs at the consolidated database are no longer needed by SQL Remote when this receipt confirmation has been received from all remote databases.

You can use the Delete_old_logs database option at the consolidated database to manage old transaction logs automatically.

The DELETE_OLD_LOGS database option is set by default to OFF. If it is set to ON, then the old transaction logs are deleted automatically by the Message Agent when they are no longer needed. A log is no longer needed when all subscribers have confirmed receiving all changes recorded in that log file.

You can set the DELETE_OLD_LOGS option either for the PUBLIC group or just for the user contained in the Message Agent connection string.

The following statement sets the public DELETE_OLD_LOGS:

SET OPTION PUBLIC.DELETE_OLD_LOGS = ’ON’

Recovery from database media failure for consolidated databases

This section describes how to recover from a media failure on the database device at the consolidated database.

The procedures to follow are easiest to describe if there is only one transaction log file. While this might not be common for consolidated databases, it is described first, followed by a more common but complicated situation with a set of transaction log files.

253

Page 271
Image 271
Sybase DC38133-01-0902-01 manual Managing old transaction logs