Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: different ways of archiving current redo log
"Prem K Mehrotra" <premmehrotra_at_hotmail.com> wrote in message
news:43441e77.0403231048.373be43d_at_posting.google.com...
> I have seen different ways of archiving logs and want to clarify their
> usage:
>
> 1. alter system switch logfile
>
> Does this command really archives current redo log before switch, or
> it simply switches and archiving is done later in background
> (asynchronus manner)
Switch logfile instructs LGWR to start writing to another online log. ARCn also gets a message to start archiving the log just switched away from.
> 2. alter system archive log current:
> I will think this command will actually archive the current log and
> then only swtch to next log, i.e, archiving and next log are
> synchronus operations.
Here's a little test you might try:
SQL> archive log list
Database log mode Archive Mode Automatic archival Disabled Archive destination C:\ Oldest online log sequence 151 Next log sequence to archive 152 Current log sequence 153
SQL> alter system archive log current;
System altered.
SQL> archive log list
Database log mode Archive Mode Automatic archival Disabled Archive destination C:\ Oldest online log sequence 152 Next log sequence to archive 154 Current log sequence 154
You might notice that the log sequence numbers have changed, indicating that LGWR is certainly aware of the effects of the command. But you'll notice that my ARCn process is actually disabled and therefore cannot possibly have archived the current log. So how synchronous do you think the operations are?
There is in fact precious little difference between 'archive log current' and 'switch logfile'.
> 3. alter system archive log all:
> This command will archive all filled redo logs but will not complete
> current log because it will not be full.
About right.
Regards
HJR
>
>
> Thanks,
>
> Prem
Received on Tue Mar 23 2004 - 13:07:32 CST
![]() |
![]() |