|
Re: Difference in ALTER commands with redo/archive logs [message #213661 is a reply to message #213656] |
Thu, 11 January 2007 14:39 |
|
ebrian
Messages: 2794 Registered: April 2006
|
Senior Member |
|
|
When in NOARCHIVELOG mode, 'ALTER SYSTEM ARCHIVE LOG CURRENT' does not work:
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination E:\oracle\ora92\RDBMS
Oldest online log sequence 1
Current log sequence 2
SQL> ALTER system ARCHIVE log CURRENT;
ALTER system ARCHIVE log CURRENT
*
ERROR at line 1:
ORA-00258: manual archiving in NOARCHIVELOG mode must identify log
SQL> ALTER system SWITCH logfile;
System altered.
SQL>
and while in ARCHIVELOG mode with MANUAL archiving, 'ALTER SYSTEM SWITCH LOGFILE' will hang if the archivelogs aren't archived manually:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Disabled
Archive destination E:\oracle\ora92\RDBMS
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
SQL> ALTER system SWITCH logfile;
System altered.
SQL> ALTER system SWITCH logfile;
System altered.
SQL> ALTER system SWITCH logfile;
--hangs here until I go into another session and issue 'ALTER SYSTEM ARCHIVE LOG CURRENT'.
While in ARCHIVELOG mode with AUTOMATIC archiving, the two commands are essentially the same, however if running RAC, the 'ALTER SYSTEM ARCHIVE LOG CURRENT' allows you to specify a THREAD parameter too.
[Updated on: Thu, 11 January 2007 14:51] Report message to a moderator
|
|
|
Re: Difference in ALTER commands with redo/archive logs [message #213662 is a reply to message #213661] |
Thu, 11 January 2007 14:51 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Does that mean that:
'ALTER SYSTEM SWITCH LOGFILE' switches to the next sequential redo log but does NOT archive the current log sequence
and
'ALTER SYSTEM ARCHIVE LOG CURRENT' switches to the next redo log and DOES archive the current log sequence?
How do the commands differ if you are in ARCHIVELOG mode with AUTOMATIC archiving?
Thanks!
|
|
|
Re: Difference in ALTER commands with redo/archive logs [message #213678 is a reply to message #213656] |
Thu, 11 January 2007 17:23 |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
There are only three conditions where log switch takes place.
1. redo log is filled up
2. alter system switch logfile
3. alter system archivelog current
and in ur case (in ARCHIVE mode),both statememnts work same way .
switch log file and archive previous log file(s).
|
|
|