Home » RDBMS Server » Backup & Recovery » why alter system archive log current?
why alter system archive log current? [message #233264] Wed, 25 April 2007 07:50 Go to next message
meggens
Messages: 57
Registered: February 2007
Location: Netherlands
Member
Hi All,

I'm currently trying some RMAN scripts.
When I google around I see a lot of people are using
'alter system archive log current' to archive the current redo log file.

I did some testing (oracle 10.2.0.1) and saw that if I backup the archivelog files a redo log switch occurs...so I guess the current redo log is already archived by doing the backup...

Am I wrong?

regards,
martin


Re: why alter system archive log current? [message #233266 is a reply to message #233264] Wed, 25 April 2007 07:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
A log switch does not mean that the redo is archived.
When you execute "'alter system archive log current" you force that current log to be archived, so it safe: you are sure to have all the needed archived logs.

Regards
Michel
Re: why alter system archive log current? [message #233273 is a reply to message #233266] Wed, 25 April 2007 08:34 Go to previous messageGo to next message
meggens
Messages: 57
Registered: February 2007
Location: Netherlands
Member
Thanks for you reply. I understand.

I did some more testing.

When I ussue the RMAN command 'backup archivelog all delete input;'
I see the number of archive logs increasing by 1 and when the backup is finished all archive logs are gone from the archive_log_dest. So I guess with oracle 10.2.0.1 it's save to leave out the alter system archive log current from the backup script.
Re: why alter system archive log current? [message #233277 is a reply to message #233273] Wed, 25 April 2007 08:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe, maybe not.
Never rely on implicit actions they may change in other versions.
If you need something, do it explicitly then after sometimes you know that you have think about it and solve the issue.
If you really want to remove it, just put it in comment and add a new one saying you remove it because rman 10g does it and this has to be checked in future version and at each patchset you will apply unless you find an Oracle document stating this is and will be the actual processing.

Regards
Michel
Re: why alter system archive log current? [message #233280 is a reply to message #233264] Wed, 25 April 2007 09:04 Go to previous message
meggens
Messages: 57
Registered: February 2007
Location: Netherlands
Member
Thanks again....
I had some doubts but I'll include it in the scripts, it doesn't hurt....and I have to backup some oracle 10.1 and 9 databases also so I think it's good to be consistent.

Regards,
Martin
Previous Topic: About RMAN backup
Next Topic: Migrating a noarchive Database of LINUX to noarchivelog mode SOLARIS
Goto Forum:
  


Current Time: Tue May 14 16:10:39 CDT 2024