Most of the High Availability features of Oracle require you to enable ARCHIVELOG mode for your database. When you enable this mode redo logs will be archived instead of overwritten. The archivelogs are stored in a seperate place usually can backed up regularly by your standard filesystem backup system. Archive logs are utilized by RMAN, Data Guard, Flashback and many others.
You can set archilogs file format and destination.
Change archivelog file format and destination
SQL> alter system set log_archive_format=’testdb_%t_%s_%r.arc’ scope=spfile sid=’*’;
SQL> alter system set log_archive_dest_1=’LOCATION=+FRA’ scope=both sid=’*’;
If you use Oracle RAC edition, you have to shutdown all instance. After you can change archivelog mode on one instance.
You can use below commands for shutdown and startup database. If you are using RAC system below commands very useful.
Oracle Database Shutdown and Startup With srvctl command
[oracle@testnode1~]# srvctl stop database -d testdb
[oracle@testnode1~]# srvctl start database -d testdb
Enable Archivelog Mode
for show current mode
SQL>select log_mode from v$database;Note : If result is noarchivelog, the database is not archivelog mode.
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database archivelog;
SQL>alter database open;Note : Finally, Our database was enabled archivelog mode.
Disable Archivelog Mode
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database noarchivelog;
SQL>alter database open;
Write Archivelogs Now
SQL> alter system switch logfile;