3
Archived Redo Log Files Management Posted by Narashim Reddy .R on August 16, 2009 3 Votes Checking Database Mode: SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination /home/oracle/tarun4/archive Oldest online log sequence 0 Current log sequence 1 Configuring Database to archive: SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> create pfile from spfile; File created. SQL> ! [oracle@reddy ~]$ cd $ORACLE_HOME/dbs [oracle@reddy dbs]$ vi inittarun4.ora —————— —————— *.log_archive_dest=’/home/oracle/tarun4/archive’ *.log_archive_format=’arch_%t_%r_%s.arc’ *.log_archive_start=true ——————- ——————- :wq! [oracle@reddy dbs]$ cd [oracle@reddy ~]$ sqlplus sys as sysdba SQL*Plus: Release 10.2.0.1.0 – Production on Tue Nov 18 17:55:03 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved.

Archived Redo Log Files

Embed Size (px)

DESCRIPTION

Archive Redo log Files and its Managment

Citation preview

  • Archived Redo Log Files Management

    Posted by Narashim Reddy .R on August 16, 2009

    3 Votes

    Checking Database Mode:

    SQL> archive log list;

    Database log mode No Archive Mode

    Automatic archival Disabled

    Archive destination /home/oracle/tarun4/archive

    Oldest online log sequence 0

    Current log sequence 1

    Configuring Database to archive:

    SQL> shutdown immediate;

    Database closed.

    Database dismounted.

    ORACLE instance shut down.

    SQL> create pfile from spfile;

    File created.

    SQL> !

    [oracle@reddy ~]$ cd $ORACLE_HOME/dbs

    [oracle@reddy dbs]$ vi inittarun4.ora

    *.log_archive_dest=/home/oracle/tarun4/archive

    *.log_archive_format=arch_%t_%r_%s.arc

    *.log_archive_start=true

    -

    -

    :wq!

    [oracle@reddy dbs]$ cd

    [oracle@reddy ~]$ sqlplus sys as sysdba

    SQL*Plus: Release 10.2.0.1.0 Production on Tue Nov 18 17:55:03 2008

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

  • Enter password:

    Connected to an idle instance.

    SQL> create spfile from pfile;

    File created.

    SQL> startup mount;

    ORA-32004: obsolete and/or deprecated parameter(s) specified

    ORACLE instance started.

    Total System Global Area 348127232 bytes

    Fixed Size 1219328 bytes

    Variable Size 289408256 bytes

    Database Buffers 50331648 bytes

    Redo Buffers 7168000 bytes

    Database mounted.

    SQL> alter database archivelog;

    Database altered.

    SQL> alter database open;

    Database altered.

    SQL> archive log list;

    Database log mode Archive Mode

    Automatic archival Enabled

    Archive destination /home/oracle/tarun4/archive

    Oldest online log sequence 0

    Next log sequence to archive 1

    Current log sequence 1

    SQL> select archiver from v$instance;

    ARCHIVE

    -

    STARTED

    Configuring Database to noarchive:

    SQL> archive log list;

    Database log mode Archive Mode

    Automatic archival Enabled

    Archive destination /home/oracle/tarun4/archive

    Oldest online log sequence 0

    Next log sequence to archive 1

    Current log sequence 1

    SQL> shutdown immediate;

    Database closed.

  • Database dismounted.

    ORACLE instance shut down.

    SQL> startup mount;

    ORA-32004: obsolete and/or deprecated parameter(s) specified

    ORACLE instance started.

    Total System Global Area 348127232 bytes

    Fixed Size 1219328 bytes

    Variable Size 289408256 bytes

    Database Buffers 50331648 bytes

    Redo Buffers 7168000 bytes

    Database mounted.

    SQL> alter database noarchivelog;

    Database altered.

    SQL> alter database open;

    Database altered.

    SQL> archive log list;

    Database log mode No Archive Mode

    Automatic archival Disabled

    Archive destination /home/oracle/tarun4/archive

    Oldest online log sequence 0

    Current log sequence 1

    SQL> select archiver from v$instance;

    ARCHIVE

    -

    STOPPED