First, we need to add/change 3 new lines in the init${ORACLE_SID}.ora file. The directory chosen in the log_archive_dest reflects the ORACLE_SID of the instance, so be sure to either change this for each instance in a multiple instance install, or make it an environment variable. They are :
log_archive_start = true # if you want automatic archiving
log_archive_dest = /usr1/oracle/dbs/arc/sco7/arc
log_archive_format = _%S.arc
Now, stop the database
svrmgrl
SVRMGR> connect internal
Connected.
SRVMGR> shutdown immediate;
Statement processed.
Then restart the database in mount mode (Note that by not issuing a PFILE parameter, "init${ORACLE_SID}.ora" is assumed:
SVRMGR> startup mount
ORACLE instance started.
Total System Global Area 8163284 bytes
Fixed Size 41876 bytes
Variable Size 6962240 bytes
Database Buffers 1126400 bytes
Redo Buffers 32768 bytes
Database mounted.
SVRMGR>
Now start the archive process :
SVRMGR> alter database archivelog;
Statement processed.
Now check to see if it is in fact running :
SVRMGR> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /usr1/oracle/dbs/arc/arc_
Oldest online log sequence 82
Next log sequence to archive 84
Current log sequence 84
SVRMGR>
Now open the database for use by all :
SVRMGR> alter database open;
Statement processed.
Turning OFF
To turn off archiving, do this:
First of all, I will assume that arhiving is currently running and is automatic. If not, there would be no need to do this. We need to change 3 lines in the init${ORACLE_SID}.ora file. The directory chosen in the log_archive_dest reflects the ORACLE_SID of the instance, so be sure to either change this for each instance in a multiple instance install, or make it an environment variable. Mainly we want to make the start line indicate false. They are :
log_archive_start = false # to turn off automatic archiving
log_archive_dest = /usr1/oracle/dbs/arc/sco7/arc
log_archive_format = _%S.arc
Check the current archive status
svrmgrl
SVRMGR> connect internal
Connected.
SVRMGR> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /usr1/oracle/dbs/arc/arc_
Oldest online log sequence 82
Next log sequence to archive 84
Current log sequence 84
Dump remaining archives, and stop the automation of the archiving
SVRMGR> alter system archive log all;
Statement processed.
SVRMGR> alter system archive log stop;
Statement processed.
Now check to the change :
SVRMGR> archive log list;
Database log mode Archive Mode
Automatic archival Disabled
Archive destination /usr1/oracle/dbs/arc/arc_
Oldest online log sequence 82
Next log sequence to archive 84
Current log sequence 84
SVRMGR>
Shutdown the database
SRVMGR> shutdown immediate;
Statement processed.
SVRMGR> exit
Then restart the database in mount mode (Note that by not issuing a PFILE parameter, "init${ORACLE_SID}.ora" is assumed: