Saturday, December 22, 2007

Turn off Archive Logs in 10g RAC Database

In 8i and 9i database, the archive log can be turned off by
1. set LOG_ARCHIVE_START = false
2. startup mount
3. alter database noarchivelog;

In the RAC environment, all instances have to be in shutdown, before "alter database noarchivelog;" can be executed successfully in the mounted instance. Otherwise, you will get ORA-1126 error "database must be mounted exclusive and not open for this operation".

1. Make sure LOG_ARCHIVE_START: set to FALSE, CLUSTER_DATABASE: set to FALSE
2. Shut down all instances
3. Mount the database, but not open, by an exclusive instance
4. Enter "alter database noarchivelog;"
5. Set LOG_ARCHIVE_START=FALSE for each of the other instances
6. Shut down the exclusive instance and reset its CLUSTER_DATABASE to TRUE
7. Restart all instances using the modified parameters

CLUSTER_DATABASE is an identical setting in RAC and has to be restored back to TRUE so that there will not be problems starting the other RAC instances. "alter system set cluster_database=false scope=spfile" before shutdown will do it, if SPFILE shows up on "show parameter spfile;" command in Sql*Plus.

We spent hours in truning off archivelog mode because we did not learn there were guaranteed restore points in the database. If there are records in view v$restore_point, you need to run a DROP command to delete the guaranteed restore point. If you do not do that, you will hit error:
ORA-38781: cannot disable media recovery - have guaranteed restore points
or "ARCHIVELOG mode cannot be turned off because a guaranteed restore point exists." in Grid Control.

Once archive log mode is turned off, all instances in the RAC will in noarchive log mode!

"alter system archive log stop;" is obsolte in 10G.

No comments: