cancel
Showing results for 
Search instead for 
Did you mean: 

DBREMOTE and Log files

Former Member
2,242

Version 8.0.3

I can you identify the log files that are safe to delete that are on the consolidated database? I have a backlog of log files that will not get auto deleted after the backups are being made.

Would it be a safe assumtion knowing that all my remotes have replciated in within the last 30 days to delete all the log files that are greater than 30 days old?

Thanks....

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor

IMHO, that task should be left to the SQL Remote system itself, by using the DELETE_OLD_LOGS option and setting it to something different than its default value OFF:

When it is set to On, each old transaction log is deleted when all the changes it contains have been replicated or synchronized successfully. When it is set to DELAY, each old transaction log with a file name indicating that it was created on the current day is not deleted, even if all changes have been sent and confirmed.

Note that the possibility to set it to n days was introduced with 10.0.1, however "ON" and "DELAY" can be used with v8 as well, such as:

set option PUBLIC.delete_old_logs = 'delay';

I would recommend that for both the cons and the remotes.

Knowing that all remotes have replicated in the last n days is not really enough to know, methinks - a remote may have missed a message and asked the cons for a re-send, so not all operations from older logs are necessarily confirmed. However, querying the SYSREMOTEUSER system table will tell you which is the largest offset confirmed by all remotes.

Former Member
0 Kudos

The delete old logs option is active. Looking at the sysremoteusers table the oldest recieved date is 2011-09-09. However looking at the log files they date back to 2008-05-07 there are 1000's of these.

When I ran the replication manually I see it deleting log files at the end.

VolkerBarth
Contributor
0 Kudos

Do you run DBREMOTE with the same user id when running it "normally" (whatever this means - as a service? in continuous mode?) and "manually"?

Is the option set for PUBLIC or for any particular user? What does the following display?

select * from sysoptions where "option" = 'delete_old_logs'