Sunday, March 29, 2020

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

Users may see this error when trying to mount standby database after restore or during the switch over

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> SELECT database_role FROM v$database;
DATABASE_ROLE
----------------------------------------------------------------
PRIMARY

In current scenario, we see the database role as primary and trying to convert as Physical Standby. You can convert when database not mounted, otherwise you will see below error.

SQL> Alter database convert to physical standby;
Alter database convert to physical standby
*
ERROR at line 1:
ORA-01507: database not mounted

SQL> shutdown immediate
SQL> startup nomount;

SQL> Alter database convert to physical standby;
Database altered.
SQL> SELECT database_role FROM v$database;
DATABASE_ROLE
----------------------------------------------------------------
PHYSICAL STANDBY
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE disconnect from session;
Database altered.

Make sure you start the recovery using below command

sql> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE disconnect from session;

To avoid any user mistakes I would advise to use Data Guard broker

Refer below presentation related to Data Guard.

1. “Why Oracle DataGuard? New Features in Oracle 18c,19c”
https://www.oracleracexpert.com/2019/12/why-oracle-dataguard-new-features-in.html

2. Data Guard Physical Standby Setup in Oracle?
https://www.oracleracexpert.com/2019/02/webinar-data-guard-physical-standby.html

Regards
Satishbabu Gunukula, Oracle ACE
http://oracleracexpert.com


3 comments:

  1. Thanks for picking out the time to discuss this,
    Lajpat Nagar Escorts
    Malviya Nagar Escort Service
    Connaught Place Escort Service
    Punjabi Bagh Call Girls
    Call Girls in Mahipalpur
    Escorts Service in Aerocity
    karol bagh Escorts Service
    I feel great about it and love studying more on this topic. It is extremely helpful for me. Thanks for such valuable help again.

    ReplyDelete
  2. All competitive and government recruitment exams, including those for the UPSC, SSC, Bank PO/Clerk, and other positions, have a significant and standard portion on general knowledge or general awareness. General Knowlorge on Telugu seeks to aid candidates' preparation by offering in-depth study of significant themes, extensive insights on General Knowledge essential issues, and GK questions with answers on historical as well as current events taking place in India and throughout the world.

    ReplyDelete
  3. Thank you for sharing such a good information. I really appreciate it. Regards, Mumbai Dating Girls

    ReplyDelete