Assume, that INSTP is the primary and INSTS is the standby Instance and DG_INSTP and DG_INSTS are the related DG-Broker:
Start data guard management tool dgmgrl:
$ dgmgrl DGMGRL> connect sys/<password>@DG_INSTP DGMGRL> show configuration verbose;
Make sure, that the configuration is enabled, the protection mode is "MaxPerformance", settings of primary and physical standby database are correct.
Connect to database (sqlplus, toad or any other db-tool):
$ sqlplus sys/<password>@INSTP sql> select max(sequence#) sequence from v$archived_log;
On server of standby database start sqlplus:
$ sqlplus sys/<password>@INSTS sql> select max(sequence#) sequence from v$archived_log;
Verify that the sequence number on the standby database has the same or higher value than the sequence number of the primary database (regard: the application is still running).
Connect to database (sqlplus, toad or any other db-tool):
$ sqlplus sys/<password>@INSTP sql> exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE'); sql> select value from v$parameter where name = 'job_queue_processes'; sql> alter system set job_queue_processes=0;
Attention: notice the value of job_queue_processes and keep it well!
Force log file switch
$ sqlplus sys/<password>@INSTP sql> alter system switch logfile; (3x) sql> select max(sequence#) sequence from v$log;
Notice the sequence.
Verify that the latest logfile has arrived the standby database (perhaps wait some time and repeat)
$ sqlplus sys/<password>@INSTS sql> select max(sequence#) sequence from v$log;
Sequence must be the same like the one above.
Start data guard management tool dgmgrl:
$ dgmgrl DGMGRL> connect sys/<password>@DG_INSTP DGMGRL> shutdown immediate; DGMGRL> connect sys/<password>@DG_INSTS DGMGRL> failover to INSTS;
Start data guard management tool dgmgrl:
$ dgmgrl DGMGRL> connect sys/<password>@DG_INSTP DGMGRL> startup mount DGMGRL> connect sys/<password>@DG_INSTS DGMGRL> reinstate database INSTP; DGMGRL> switchover to INSTP;
Connect to database (sqlplus, toad or any other db-tool):
$ sqlplus sys/<password>@INSTP sql> exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED', 'FALSE'); sql> alter system set job_queue_processes=<value>;