Wednesday, May 11, 2016

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

Description: After the restore of RMAN backup for Standby we should convert database to standby. If it is not there db will show this error. 

SQL> alter database mount standby database;
alter database mount standby database
*
ERROR at line 1:
ORA-01665: control file is not a standby control file


SQL>  alter database mount;

Database altered.

SQL> SELECT database_role FROM v$database;

DATABASE_ROLE
----------------
PRIMARY

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;


Database altered.

SQL> shut immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> STARTUP MOUNT
ORACLE instance started.

Total System Global Area 3958439936 bytes
Fixed Size                  2259320 bytes
Variable Size            2264925832 bytes
Database Buffers         1677721600 bytes
Redo Buffers               13533184 bytes
Database mounted.
SQL> SELECT database_role FROM v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY

SQL> alter database recover managed standby database disconnect;

Database altered.

SQL> SELECT database_role FROM v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

Database altered.

SQL>

No comments:

Post a Comment