Wednesday, July 2, 2008

How to Enable / Disable Archive log Mode in 10g

Enabling and Disabling the Archive Log mode in 10g is slightly different compared to 9i database. LOG_ARCHIVE_START parameter has been deprecated in 10g database.

Enabling the Archive Log Mode:

SQL> startup mount
ORACLE instance started.

Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 188746628 bytes
Database Buffers 415236096 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Current log sequence 4

SQL> alter database archivelog;

Database altered.

The above command will enable the Archive Mode as well as enable the Automatic archiving ( In Oracle 9i, you need to enable the automatic archiving by setting the init parameter LOG_ARCHIVE_START=true )

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4

Disabling Archive Log Mode:

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 289406976 bytes
Fixed Size 1248576 bytes
Variable Size 100664000 bytes
Database Buffers 180355072 bytes
Redo Buffers 7139328 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 USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 26
Current log sequence 28

2 comments:

Anonymous said...

Hi Sudhakar,

Thanks for your posts on Oracle concepts.

I am Suresh an MBA grad from India, would like to do Oracle to become a functional consultant.

Please drop me a mail with your convenient time to talk for 5-10 minutes.

I would be honored if you can take out 5-10 minutes for me, that really helps to plan my actions accordinlgy.

Thanks,
Suresh - India
sureshkumarmbaindia@gmail.com

Unknown said...

Good work always reflects and makes others learn from your hard work. I am so thankful to you for sharing the step by step process.Keep it up Friend.