Friday, April 6, 2018

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

ORA-01665: control file is not a standby control file
It means that I have restored not standby control file
To cope with this situation I have to CREATE STANDBY CONTROLFILEon primary, copy it to standby, then restore it(better read full store here), depending on disk configuration rename data, log-files…, but we have other soluction as well. 
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.

No comments:

Post a Comment