Alter system archivelog current
I'm running 8.1.7.4 in archivelog mode (of course) under NT.
Every 10 minutes I issue a ALTER SYSTEM SWITCH LOGFILE, wait 10 seconds for archiving to finish, then start zipping the archlog(s) to send them across the country.
It would seem MUCH better to use ALTER SYSTEM ARCHIVE LOG CURRENT and not wait. Can I be sure that the archlog file has been totally written and any OS sharing locks released, before control is returned (ARCH being an asychronous process)?
(The answer ought to be "Yes" - but I can't find it anywhere).
TIA - DaPi
Re: Alter system archivelog current
Quote:
Originally posted by DaPi
It would seem MUCH better to use ALTER SYSTEM ARCHIVE LOG CURRENT and not wait. Can I be sure that the archlog file has been totally written and any OS sharing locks released, before control is returned (ARCH being an asychronous process)?
(The answer ought to be "Yes" - but I can't find it anywhere).
The answer is kinda "YES", but your scenario might still not work!
I think (but have never tested it, it's just my impression) that after ALTER SYSTEM ARCHIVE LOG CURRENT command is executed you can be sure that archlog file has realy been written.
BUT: You have no guarantie that the previous redo logs have also been archived by that time! So for example if your current redo log is archived as seq# 100009, your ZIP file might contain archfiles #100009, #100007, #100006, ...., but #100008 might be missing because it has not been archived yet.
Archlogs might be created out of sequential order, meaning that nothing is stopping oracle to write archlog #N+1 even if the archiving of #N or any previous redologs has not been finished yet.
And BTW, you could encounter the same scenario with your present setup (ALTER SYSTEM SWITCH LOGFILE + wait).
If you would like to avoid this, then you'd better use "ALTER SYSTEM ARCHIVE LOG ALL" instead.