Change archivelog/noarchivelog

To change database to archivelog or noarchivelog mode the database has to be in mount stage. If one tries to change the database to archivelog/noarchivelog during mount stage you will receive the following error message.

01:00:04 sys@TESTDB> alter database noarchivelog;
alter database noarchivelog
*
ERROR at line 1:
ORA-01507: database not mounted

Or if the database is open stage and trying to change Oracle will return the following error message.
00:59:01 sys@TESTDB> alter database noarchivelog;
alter database noarchivelog
*
ERROR at line 1:
ORA-01126: database must be mounted EXCLUSIVE and not open for this operation

To switch to noarchivelog mode
SQL> ALTER DATABASE NOARCHIVELOG;

Database altered.

To switch to archivelog mode (make sure archiver set to be running in this mode as if archiver process is not running, it would cause database to hang when switching archivelog file)
SQL> ALTER DATABASE ARCHIVELOG;

Database altered.

How to check if archiver is running

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