Oracle Data Guard “Physical Standby Database (Disabled)”

This past week, I was working on a task nobody anywhere ever wants to do: routinely changing passwords. It’s easy enough to do. In Toad for Oracle, right-click the user, Alter, paste new password. That works well until you realize you forgot everywhere you used and need to update that password. In our case, I neglected to stop Data Guard prior to changing the passwords, which caused our production server to be marked as “disabled”.

Even fixing/regenerating the passwords files, the server was stuck in the disabled state.

DGMGRL> show configuration

Configuration - DG_CONFIG

  Protection Mode: MaxPerformance
  Members:
  PRODDB - Primary database
    STANDBYDB - Physical standby database (disabled)

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 7 seconds ago)

When we tried to re-enable the database, we received a message “operation requires shutdown of database or instance”.

DGMGRL> enable database 'STANDBYDB'
Error: ORA-16631: operation requires shutdown of database or instance

Failed

Not going to happen… Our production database is a critical resource that absolutely cannot go down, which is why we have Data Guard. Not having very much experience with Data Guard, it took me quite a while to figure out how to get it back online. The solution is pretty simple. Hopefully sharing it here will help someone else out who may end up in the same situation.

DGMGRL> edit database 'STANDBYDB' set state='ONLINE';
Succeeded.

That’s it! The standby database is now showing as active again

DGMGRL> show configuration

Configuration - DG_CONFIG

  Protection Mode: MaxPerformance
  Members:
  PRODDB - Primary database
    STANDBYDB - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 7 seconds ago)

You can confirm the replication is working properly and is up-to-date by querying the v$dataguard_status table.

select * from v$dataguard_status order by timestamp desc;

Leave a Reply