Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Is there a way to make the option delete_old_logs be considered also for Mirror Logs?

I am using SQL Anywhere 10, and use DBREMOTE with -X, but I want to keep the Transaction Log Files && Mirror Log files for 30 Days, so that I set the option delete_old_logs to 30 Days.

The problem is that this 30 Days applies only for the trnsaction log files and not for Mirror log files.

Any ideas please?

asked 23 Mar '20, 05:27

Baron's gravatar image

Baron
2.1k138151178
accept rate: 48%


Do the offline mirror logs reside in the same directory as the active mirror log?

Otherwise, I guess you need to specify the offline mirror log directory via the DBREMOTE -ml directory option.

permanent link

answered 23 Mar '20, 05:55

Volker%20Barth's gravatar image

Volker Barth
40.2k362550822
accept rate: 34%

Thanks for reply.

No, the mirror logs reside in a different directory (and different drive).

Which option should I use in case of DBMLSYNC?

(23 Mar '20, 06:46) Baron
Replies hidden
1
(23 Mar '20, 07:18) Volker Barth

OK, I'll try it.

I am wondering to read in the documentation that the in default installations the mirror log files reside in the same directory as the active transaction log files.

Does it really make sense to have both mirror and active logs in the same location?

(23 Mar '20, 07:52) Baron
Replies hidden
1

Hm, in my understanding it assumes the offline mirror logs are in the same directory as the active mirror log, not the active (main) transaction log itself, and that certainly is common.

(23 Mar '20, 08:06) Volker Barth

There are two types of transaction log files

  1. Main transaction log files (with .LOG extension)
  2. Mirror transaction log files (with .MLG extension)

On the other hand, the transaction log files (both main and mirror), are renamed and truncated (for performance and disk space purposes), so that we can always see the online/active one (usually the same name as .db file but with LOG extension), and the offline one/s (YYMMDDxx.LOG).

In this forum I am always used to use the online instead of active.

My question is here, under which circumstances could the online/active and the offline transaction log files (main or active) reside in different locations?

We have several installations, and I have never seen such installation where the transaction log files are trunacted and renamed (and moved to another location).

(24 Mar '20, 19:00) Baron

Well, that's also the way we have always handled backups and offline transaction logs, so active and offline logs reside in the same directory - this seems useful if you always backup logs via DBBACKUP -r or the according BACKUP STATEMENT variants that leave old logs both in the "active" and in the backup directory.

However, say when you use DBBACKUP -x -n, the old (aka offline) transaction logs would only reside in the backup directory, not in the active directory. With that usage, specifying the offline log directory is apparently necessary.

(25 Mar '20, 04:21) Volker Barth

> under which circumstances could the online/active and the offline transaction log files (main or active) reside in different locations?

If you are not using dbremote.exe or dbmlsync.exe on the database then the answer is "the yymmddxx.log files can reside anywhere"... they are not used for anything except recovery after a restore and that requires manual intervention.

If you ARE using dbremote or dbmlsync, you already know what you must do :)

AFAIK the .mlg files are not used for anything. In theory they might be used after a restore but I've never seen it happen.

(25 Mar '20, 09:27) Breck Carter
showing 2 of 7 show all flat view
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
×48

question asked: 23 Mar '20, 05:27

question was seen: 710 times

last updated: 25 Mar '20, 09:32