11 November 2015

dgmgrl switchover or convert gives ORA-01017

I have this setup of dataguard with broker:
Host:     paris.localdomain
Instance: TESTDB  (primary)
Host:     london.localdomain
Instance: TESTDBS (physical standby)

When I do:
dgmgrl /
DGMGRL> show configuration;
It all seems fine.

Errors on switchover
If I do a switchover, I get the following errors:

DGMGRL> switchover to 'TESTDBS';
Performing switchover NOW, please wait...
Operation requires a connection to instance "TESTDBS" on database "TESTDBS"
Connecting to instance "TESTDBS"...
ORA-01017: invalid username/password; logon denied

Warning: You are no longer connected to ORACLE.

    connect to instance "TESTDBS" of database "TESTDBS"


Errors on convert command

Also, when I do a convert to snapshot standby, it works fine, but back to physical standby fails:

DGMGRL> convert database 'TESTDBS' to snapshot standby;
Converting database "TESTDBS" to a Snapshot Standby database, please wait...
Database "TESTDBS" converted successfully
DGMGRL> show configuration;

Configuration - DRSolution

  Protection Mode: MaxPerformance
    TESTDB  - Primary database
    TESTDBS - Snapshot standby database

Fast-Start Failover: DISABLED

Configuration Status:

DGMGRL> convert database 'TESTDBS' to physical standby;
Converting database "TESTDBS" to a Physical Standby database, please wait...
Operation requires shutdown of instance "TESTDBS" on database "TESTDBS"
Shutting down instance "TESTDBS"...
ORA-01017: invalid username/password; logon denied

Warning: You are no longer connected to ORACLE.

Please complete the following steps and reissue the CONVERT command:
    shut down instance "TESTDBS" of database "TESTDBS"
    start up and mount instance "TESTDBS" of database "TESTDBS"


This leads to a lot of manual work, which is not nice - certainly not in times of emergency.

Note, that when you do such operations, you should login without the slash:

[oracle@paris ~]$ dgmgrl
DGMGRL for Linux: Version - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys
Password: ******


The password is explicitly needed!! 
So do NOT use dgmgrl / for these operations.

This took me a few hours to find out, hope to never forget it anymore.

The documentation that I should have read is:
http://docs.oracle.com/cd/B28359_01/server.111/b28295/dgmgrl.htm#BABHECFB and then under 8.1.1 the phrase:
       (remote database restarts will not work),
How could I have missed that....


  1. Your post helped me. Thanks a lot...

  2. This has been annoying me all day. Found that switchover worked if I specified the user/password but not with /. It's taken hours to find any references to it.

    Thank you!

  3. thanks a lot... this helps me

  4. Wow - so simple, yet so annoying when you're trying to debug it. Thank you so much for this!!! :)

  5. Thank you very much sir. You guaranteed going to heaven!!! :)

  6. I also ran into the same issue, it would be so nice if they would just state that clearly in MOS. instead they give you clues which causes you to chase your tail for solutions that won't work and have nothing to do with the problem. Thanks!!

  7. Thank you so much!!!!
    It was so simple.
    MOS is the most spiteful support in the world ........ ;-)