Friday, January 3, 2014

Nice and Simple : Archivelog mode

In Oracle 11g switching on archive log mode is simplicity itself.

 

Remember, you’ll need archivelog mode if you want  to use RMAN to backup your database without closing it first.

 

I’m going to put my archive redo logs into /u01/FRA with default names. You should probably check the current settings of db_recovery_file_dest and archive log list before doing this.

 

sqlplus / as sysdba

 

                show parameter recover

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_recovery_file_dest                string      /u01/FRA

db_recovery_file_dest_size           big integer 3852M

db_unrecoverable_scn_tracking        boolean     TRUE

recovery_parallelism                 integer     0

                archive log list

                                                Database log mode              No Archive Mode

Automatic archival             Disabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     620

Current log sequence           622

                                quit

 

My db_recovery_file_dest is already set but we’ll do it again just to demonstrate.

 

mkdir /u01/FRA

sqlplus / as sysdba

 

shutdown immediate

startup mount

alter system set db_recovery_file_dest = ‘/u01/FRA’ scope=both;

alter database archivelog;

alter database open;

alter system switch logfile;

quit

 

ls /u01/FRA/ORCL/archivelog/2014_01_03

   where ORCL is the instance name and 2014_01_03 is the current date.

 

 

Happyjohn

 

No comments:

Post a Comment