Go Back > Common DBA Misconceptions

User login

Frontpage Sponsor


How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
200 - 500 GB
500 - 800 GB
800 - 1200 GB
1200 - 1500 GB
1500 - 2000 GB
> 2000 GB
Total votes: 83

Baanboard at LinkedIn

Reference Content

Book Navigation

Backup & Recovery: Always switch logfile before/after online backups
By patvdv at 23 Feb 2008 - 22:53

In order to be sure that all changes generated during a hot backup are available for a recovery, Oracle recommends that the current online log be archived after the last tablespace in a hot backup is taken out of backup mode. A similar recommendation stands for after a recovery manager online database backup is taken. A wide variety of literature on backup and recovery, including the oracle documentation, suggests using the


alter system switch logfile

command to achieve these ends.

The use of switch logfile to obtain archives of the current logs is ill advised, because the command returns success as soon as the log writer has moved to the next log, but before the previous log has been completely archived. This could allow a backup script to begin copying that archived redolog before it is completely archived, resulting in an incomplete copy of the log in the backup.


A better command to use for archiving the current log is


alter system archive log current.

This command will not return until the current log is completely archived.


For the same reasons outlined above, a backup script should never just back up all the archived redologs. If a script does not restrict itself only to those logs that it knows to be archived, it may improperly try to back up an archived redolog that is not yet completely archived. To determine which logs are archived, a backup script should query the v$archived_log view to obtain a file list for copying.


No votes yet

All times are GMT +2. The time now is 01:24.

©2001-2018 - -