cancel
Showing results for 
Search instead for 
Did you mean: 

delete_old_logs Option (Effect on Mirrorlog)

Baron
Participant
1,080

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?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

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.

Baron
Participant
0 Kudos

Thanks for reply.

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

Which option should I use in case of DBMLSYNC?

VolkerBarth
Contributor
Baron
Participant
0 Kudos

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?

VolkerBarth
Contributor

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.

Baron
Participant
0 Kudos

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

VolkerBarth
Contributor
0 Kudos

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.

Breck_Carter
Participant
0 Kudos

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

Answers (0)