Sunday 8 February 2015

ORA-01665: control file is not a standby control file





                                    ORA-01665: control file is not a standby control file




So, the quick solution for ORA-01665 will be:


ALTER DATABASE CONVERT TO PHYSICAL STANDBY;

Lets see the small example:


SQL> STARTUP MOUNT
ORACLE instance started.

Database mounted.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
ERROR at line 1:
ORA-01665: control file is not a standby control file

SQL> SELECT database_role FROM v$database;
DATABASE_ROLE
—————-
PRIMARY

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.

SQL> STARTUP MOUNT
ORACLE instance started.

Database mounted.

SQL> SELECT database_role FROM v$database;
DATABASE_ROLE
—————-
PHYSICAL STANDBY

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Database altered.

So, now I have control file for Physical Standby database and I’m able to start Managed Recovery and I think that it is much easier/quicker than using standard procedure or making new standby control file on primary, copying it to standby host, restoring, etc.

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. So you have first stop recovery process and then convert primary to standby for this issue.

      Delete