• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » Oracle Database » How to enable archivelog mode in Oracle & Disable it

How to enable archivelog mode in Oracle & Disable it

April 10, 2022 by techgoeasy Leave a Comment

In this post, we will check about How to enable archivelog mode in Oracle ( alter database archivelog) in Both Single instance and RAC environment. We will also get to see how to disable the archivelog (alter database noarchivelog) in Both Single and RAC environments. We will also look at the common error ORA-00265. There may be many reasons to enable the archive log mode. You want to enable online backup, you want Datagaurd, You want point in time recovery of the Oracle database.

Table of Contents

  • How to enable archivelog mode in Oracle
  • How to enable archivelog mode in Oracle RAC
  • ora-00265: instance recovery required, cannot set archivelog mode
  • How to Disable archivelog mode in Oracle
  • How to disable archivelog mode in Oracle RAC
  • How to enable /disable in Container Database

How to enable archivelog mode in Oracle

Before enabling archivelog mode, please make sure RECOVERY_DEST is set to the right location and has good space. If you not using RECOVERY_DEST for archiving, then make sure the path given is correct and has good space. You will database downtime to enable archivelog mode. Here is the sequence of steps to enable archivelog mode

SQL> Shutdown immediate
SQL>Startup mount
SQL>Alter database archivelog;
SQL> Alter database Open;
Verify Using
SQL> ARCHIVE LOG LIST
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FLASH
Oldest online log sequence 1199
Next log sequence to archive 1298
Current log sequence 1298

How to enable archivelog mode in Oracle RAC

Stop the Database
srvctl stop database -d TEST
Mount the database
srvctl start database -d RAC -o mount
Enable Archive log mode
sqlplus "/ as sysdba"
alter database archivelog;
Shutdown and startup the cluster
srvctl stop database -d TEST
srvctl start database -d TEST

ora-00265: instance recovery required, cannot set archivelog mode

If you are getting ORA-00265 while putting the database in archivelog, then you must have shut down the DB in abort mode. If that is the case, then do these steps to prevent this error

SQL> Startup
SQL> shutdown immediate
SQL>Alter database archivelog;
SQL> Alter database Open;
Verify Using
SQL> ARCHIVE LOG LIST
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FLASH
Oldest online log sequence 1199
Next log sequence to archive 1298
Current log sequence 1298

This can happen in the RAC instance as sometimes, the srvctl command aborts the Database, if it does shut down in time, then do this

Stop the Database
srvctl stop database -d TEST
start the database
srvctl start database -d TEST
Mount the database
srvctl start database -d RAC -o mount
Enable Archive log mode
sqlplus "/ as sysdba"
alter database archivelog;
Shutdown and startup the cluster
srvctl stop database -d TEST
srvctl start database -d TEST

How to Disable archivelog mode in Oracle

You will database downtime to disable archivelog mode. Here is the sequence of steps to disable archivelog mode

SQL> Shutdown immediate
SQL>Startup mount
SQL>Alter database noarchivelog;
SQL> Alter database Open;
Verify Using
SQL> ARCHIVE LOG LIST

How to disable archivelog mode in Oracle RAC

Stop the Database
srvctl stop database -d TEST
Mount the database
srvctl start database -d RAC -o mount
Disable Archive log mode
sqlplus "/ as sysdba"
alter database noarchivelog;
Shutdown and startup the cluster
srvctl stop database -d TEST
srvctl start database -d TEST

How to enable /disable in Container Database

These enable and disable commands are valid for the Container database (CDB) also. we can’t have separate archiving for the PDBs, the steps are executed at the CDB level only. So steps remain the same in 12c, 18c, and 19c Container databases.

I hope you like this content on How to enable archivelog mode in Oracle

Related Articles
how to find archive log sequence number in oracle
Oracle DBA scripts
alter system switch logfile
alter table move
How to purge AUD$ table in Oracle
https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12007.htm

Filed Under: Oracle, Oracle Database

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • srvctl commands
  • how to check db size in oracle
  • How to access oracle cloud compute instance(Linux/Window)
  • size of schema in oracle
  • Pagination in Oracle

Copyright © 2022 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us