Writing About Our Experiences With Oracle Databases
Friday July 30th 2010

Latest Topics

DBMS_SCHEDULER jobs not running?

I came across this posting on OTN which lists down things to check in case your scheduler job is not . This is quite [Read More]

‘Metric execution timed out’ error reported by Grid

We use 10.2 Enterprise Manager Grid control  to monitor our oracle database environments . Apart from the normal [Read More]

Downloading Oracle Software directly to Server

Downloading Oracle Software directly to Server

This article is based on Pythian’s aricle DOWNLOADING FROM OTN DIRECTLY TO YOUR DATABASE SERVER. Article [Read More]

11gR2 Silent Install errors with [SEVERE] – Invalid My Oracle Support credentials

While performing  11gR2 RAC Database Software installation with response file (silent mode), I got this error. - [Read More]

opmnctl start fails when ORA_NLS10 parameter is set

I got into this issue , where in while starting Grid Control components, opmnctl command failed with following errors [Read More]

Enabling Flashback On RAC Database

Enabling Flashback /Archive Log mode on a Single Instance Database is quite straight forward. In case of RAC, you need to follow additional steps.

The requirements for enabling Flashback Database are:

  • Your database must be running in ARCHIVELOG mode, because archived logs are used in the Flashback Database operation.
  • You must have a flash recovery area enabled, because flashback logs can only be stored in the flash recovery area.
  • For Real Application Clusters databases, the flash recovery area must be stored in a clustered file system or in ASM.

First of all configure flash recovery area by setting db_recovery_file_dest_size and db_recovery_file_dest

ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 20G SCOPE=BOTH;
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '+DG1' SCOPE=BOTH;

We are using ASM Diskgroup here which is sharable and available to both the nodes.Next step is to enable archivelog mode and then to turn on flashback. To perform this, database needs to be in mount mode.

We can use srvctl to disable any associated Database service and then stop the Database

[/home/oracle>srvctl stop service -d TESTDB
[/home/oracle>srvctl stop database -d TESTDB

Now set Cluster_database=false for enabling the Archivelog mode. This is a additional step which is required in RAC Database. For Single Instance, we do not require it.

/home/oracle>sqlplus "/ as sysdba"

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 1073741824 bytes
Fixed Size                  1271564 bytes
Variable Size             314575092 bytes
Database Buffers          750780416 bytes
Redo Buffers                7114752 bytes
SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> exit
SQL> startup mount
ORACLE instance started.

Total System Global Area 1073741824 bytes
Fixed Size                  1271564 bytes
Variable Size             314575092 bytes
Database Buffers          750780416 bytes
Redo Buffers                7114752 bytes
Database mounted.
SQL>alter database archivelog;
SQL> alter database flashback on;

Database altered.

Set the Cluster_database parameter again to true.

SQL>  alter system set cluster_database=true scope=spfile;
System altered.
SQL>shutdown immediate

We will again use srvctl to start the database and associated service

[/home/oracle>srvctl start database -d TESTDB
[/home/oracle>srvctl start service -d TESTDB

We can confirm whether Archivelog mode and Flashback is enabled by querying V$DATABASE

SQL> SELECT LOG_MODE,FLASHBACK_ON FROM V$DATABASE;
LOG_MODE     FLASHBACK_ON
------------ ------------------
ARCHIVELOG   YES
  • Share/Bookmark
Related Tags: , ,

Leave a Comment

Recent Comments

Deepak had this to say

Thanks a lot Amit. Very useful doc. Please update something more like this. Read the post

Amit had this to say

Upload the cookies.txt file in same directory from where you are running the wget command. Did you try downloading Read the post

inoideas had this to say

I tried but got the below error msg wget .load-cookies=cookies.txt --user-agent Mozilla/4.0 Read the post

Richard had this to say

Hello, Great this tip that you sent, you helped me so much. but take care when to use dd command. Regards, Read the post

Ram had this to say

This is very straight forward and clear.It has become easy when compared to referring the looong docs. Read the post

More from category

11gR2: CVU needs SCAN Listeners’ Manual Startup During Grid-Infrastructure Configuration

During configuration phase of Grid Infrastructure for cluster, CVU failed while performing post-checks. Following [Read More]

Cluvfy Reports CRS not Installed on Nodes

Before I start my post, I would like to wish all our readers a “Happy New Year”. While reviewing a 10gR2 [Read More]

Link:11gR2 RAC installation steps on OEL4

If you are looking for steps for 11gR2 RAC installation, you can refer to this article by Rajeev Ramdas at [Read More]

Link: Best practices for AIX RAC Database on OTN

A new whitepaper has been published on OTN which primarily discusses best practices for AIX 5.2,5.3 and 6.1 for RAC [Read More]

SRVCTL fails to start RAC resources:CRS-0215

After upgrading RAC database to 10204 and applying CRS bundle patch-1 for 10204 crs home, srvctl command fails to [Read More]