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....

asked 27 Dec '11, 18:38

TPS's gravatar image

TPS
196131320
accept rate: 0%


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.

permanent link

answered 28 Dec '11, 05:03

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819
accept rate: 34%

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.

(28 Dec '11, 13:01) TPS
Replies hidden

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'
(28 Dec '11, 13:50) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×78

question asked: 27 Dec '11, 18:38

question was seen: 2,034 times

last updated: 28 Dec '11, 13:50