Re: ORA-01666: control file is for a standby database

  • From: Hemant K Chitale <hemantkchitale@xxxxxxxxx>
  • To: sundarmahadevan82@xxxxxxxxx
  • Date: Thu, 10 Feb 2011 02:09:25 +0800

Did you follow the documentation ?
http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/create_ls.htm#i91653

After you build the Physical Standby, you don't open it.
4.2.1 Create a Physical Standby Database

You create a logical standby database by first creating a physical standby
database and then transitioning it to a logical standby database. Follow the
instructions in Chapter 3, "Creating a Physical Standby
Database"<http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/create_ps.htm#g88234>to
create a physical standby database.
 4.2.2 Stop Redo Apply on the Physical Standby Database

You can run Redo Apply on the new physical standby database for any length
of time before converting it to a logical standby database. However, before
converting to a logical standby database, stop Redo Apply on the physical
standby database. Stopping Redo Apply is necessary to avoid applying changes
past the redo that contains the LogMiner dictionary (described in Section
4.2.3.2, "Build a Dictionary in the Redo
Data"<http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/create_ls.htm#BEIGHEIA>
).

To stop Redo Apply, issue the following statement on the physical standby
database. If the database is an Oracle RAC database comprised of multiple
instances, then you must first stop all Oracle RAC instances except one
before issuing this statement:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

 4.2.3 Prepare the Primary Database to Support a Logical Standby Database

and later

4.2.4 Transition to a Logical Standby Database

This section describes how to prepare the physical standby database to
transition to a logical standby database. It contains the following topics:

   -

   Convert to a Logical Standby
Database<http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/create_ls.htm#BEIGJCAC>
   -

   Adjust Initialization Parameters for the Logical Standby
Database<http://download.oracle.com/docs/cd/E11882_01/server.112/e17022/create_ls.htm#BEIDIBAG>

 4.2.4.1 Convert to a Logical Standby Database

The redo logs contain the information necessary to convert your physical
standby database to a logical standby database.

Note:
If you have an Oracle RAC physical standby database, shut down all but one
instance, set CLUSTER_DATABASE to FALSE, and start the standby database as a
single instance in MOUNT EXCLUSIVE mode, as follows:

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE;
SQL> SHUTDOWN ABORT;
SQL> STARTUP MOUNT EXCLUSIVE;

To continue applying redo data to the physical standby database until it is
ready to convert to a logical standby database, issue the following SQL
statement:

SQL> ALTER DATABASE RECOVER TO LOGICAL STANDBY db_name;


and so on ...

On Thu, Feb 10, 2011 at 1:17 AM, sundar mahadevan <
sundarmahadevan82@xxxxxxxxx> wrote:

> Hi All,
> I would like to make my previous email short. I am trying to implement
> logical standby. First I start off with creating a physical standby with
> rman. After a complete recovery, do I open the database with noresetlogs or
> with resetlogs? If I try to open the database with resetlogs, I get
> ORA-01666: control file is for a standby database. On one mos note, it said
> alter database open resetlogs would create the redo log files (After the
> complete recovery, I do not have tempfile and redo logs created). According
> to note 601835.1, the redo log errors can be safely ignored on physical
> standby. So when do the redo logs get created ? What should I do now to
> eliminate this error. Oracle support is taking too long to respond and i
> need to get this working soon. Thanks a ton for all your help.
>
>
> On Tue, Feb 8, 2011 at 5:28 PM, sundar mahadevan <
> sundarmahadevan82@xxxxxxxxx> wrote:
>
>> Hi Group,
>> Greetings. I am trying to setup a logical dataguard on 11.2.0.2 (SLES 11
>> x86_64). Initially I am creating the physical standby with rman hot backup
>> from primary. I followed the procedure from note *469493.1 *to create the
>> physical standby. The following are the steps:
>>
>>
>> Connect to primary and crosscheck backup/archivelogs:
>> delete expired backup and archivelogs
>> Connect to primary and take rman backup:
>> command used for backup on primary:
>> run {
>> set command id to 'rman';
>> backup database plus archivelog;
>> sql 'alter system switch logfile';
>> backup archivelog from time 'sysdate -3/24';
>> backup current controlfile for standby;
>> }
>>
>> Rman Restore Physical Standby Database:
>> startup nomount;
>> set dbid=2225084209
>> sql 'alter database mount standby database';
>> restore database;
>> exit
>>
>> Find current redo log sequence on Primary Database:
>> sqlplus / as sysdba
>> recover standby database ;
>> enter all archivelogs and the current redo log sequence from primary and
>> finally i get Media recovery complete.
>> At this point I do not have tempfile/redo logs created but the redo logs
>> missing error was reported as soon as i mounted the physical standby
>> database with "sql 'alter database mount standby database'; before restore"
>>
>> now do I open the database with reset logs or no resetlogs.
>> If I try to open the database with noresetlogs, the tempfile gets created
>> but not the redo logs. If I try to open the database with resetlogs, I get
>> ORA-01666: control file is for a standby database. On one mos note, it said
>> alter database open resetlogs would create the redo log files. According to
>> note 601835.1, the redo log errors can be safely ignored on physical
>> standby. So when do the redo logs get created when I go for a logical
>> standby creation. What should I do now to eliminate this error. Oracle
>> support is taking too long to respond and i need to get this working soon.
>> Thanks a ton for all your help.
>>
>>
>


-- 

Hemant K Chitale
http://hemantoracledba.blogspot.com

Other related posts: