Saturday, October 02, 2010

Enable ARCHIVELOG Mode

Enable ARCHIVELOG Mode

When you run a database in ARCHIVELOG mode, you enable the archiving of the redo log. The database control file indicates that a group of filled redo log files cannot be reused by LGWR until the group is archived. A filled group becomes available for archiving immediately after a redo log switch occurs.


The archiving of filled groups has these advantages:
  • A database backup, together with online and archived redo log files, guarantees that you can recover all committed transactions in the event of an operating system or disk failure.
  • If you keep an archived log, you can use a backup taken while the database is open and in normal system use.
  • You can keep a standby database current with its original database by continuously applying the original archived redo logs to the standby.

You can configure an instance to archive filled redo log files automatically, or you can archive manually. For convenience and efficiency, automatic archiving is usually best. Archiver process (ARCx) writes filled redo log files to the database archived redo log.

STEPS:-

A. configure
1) alter system set db_recovery_file_dest='+ORAFLASH001' scope=both sid='*';
2) alter system set db_recovery_file_dest_size = 20G scope=both sid='*';

B. Enable Archivelog Mode
1) shutdown database
2) startup database in mount mode
3) alter database archivelog; # as sysdba
4) sys@demo> archive log list
       Database log mode               Archive Mode
       Automatic archival                Enabled
       Archive destination               USE_DB_RECOVERY_FILE_DEST
       Oldest online log sequence    301
       Next log sequence to archive 302
        Current log sequence           302
5) alter database open;

Hope this help. Regards Rupam