Redo Log Files Management (Archived)


SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /home/oracle/AZDB/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> exit
[oracle@TEST ~]$ cd $ORACLE_HOME/dbs
[oracle@TEST dbs]$ vi initAZDB.ora
——————
——————
*.log_archive_dest=’/home/oracle/AZDB/archive’
*.log_archive_format=’arch_%t_%r_%s.arc’
*.log_archive_start=true
——————-
——————-
:wq!

[oracle@TEST dbs]$ cd
[oracle@TEST ~]$ sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 5 17:33:56 2013
Copyright (c) 1982, 2011, 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/AZDB/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/AZDB/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/AZDB/archive
Oldest online log sequence 0
Current log sequence 1

SQL> select archiver from v$instance;
ARCHIVE
——-
STOPPED

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: