Total Pageviews

Tuesday 8 May 2012

Archive Log Mode

Lets start by checking the current archive mode.

SQL> SELECT LOG_MODE FROM  SYS.V$DATABASE;

LOG_MODE
------------
NOARCHIVELOG


Follow the below steps to alter the Archive mode:


#1. Shutdown Immediate

#2. STARTUP MOUNT

#3.ALTER DATABASE ARCHIVELOG;

#4. ALTER DATABASE OPEN;

To get the information about Archive mode:

SQL> Archive log list;

Database log mode : Archive Mode
Automatic archival  : Enabled
Archive destination : C:\oracle\product\10.2.0\log_archive_dest\ORCL2
Oldest online log sequence : 15
Next log sequence to archive : 17
Current log sequence : 17

SQL>

We can verify that we are infact in ARCHIVELOG mode: 

SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

SQL> SELECT  DEST_NAME,STATUS,DESTINATION from V$ARCHIVE_DEST;
  •   Status can be valid or Invalid.
  •    Dest_Name :LOG_ARCHIVE_DEST_N  where N= 1 to 10.
  •    Destination: "C:\oracle\product\10.2.0\flash_recovery_area" Default location for 10g
Alter the Destination :

Alter system set log_archive_dest_1='location=C:\oracle\product\10.2.0\log_archive_dest\ORCL2';







No comments:

Post a Comment