Oracle Dataguard Broker 12c with password file in ASM

Configure 12c dataguard broker using the below command onPrimary database server
primeprd – > tnsnames for primary database
primedr-> tnsnames for standby database
/home/oracle::11g–>dgmgrl
DGMGRL> connect sys/********
DGMGRL> create configuration dg_primeprd as primary database is primeprd connect identifier is primeprd;
DGMGRL> add database primedr as connect identifier is primedr maintained as physical;
Configuration “dg_primeprd” created with primary database “primeprd”
DGMGRL> add database primedr as connect identifier is primedr maintained as physical;
Error: ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set
Failed.
DGMGRL> remove configuration;
Removed configuration
Set the log_archive_dest_2 settings from both the Primary and Standby databases to be nothing.
alter system set log_archive_dest_2=” scope=both sid=’*’;
Disable then Enable the broker parameter on both the Primary and Standby databases.
— Primary
alter system set dg_broker_start=false scope=both sid=’*’;
alter system set dg_broker_start=true scope=both sid=’*’;
— Standby
alter system set dg_broker_start=false scope=both sid=’*’;
alter system set dg_broker_start=true scope=both sid=’*’;
On the Primary database create the broker configuration for the Primary and Standby database and this time it should work fine with no issues since the log archive destination 2 setting is not set, this is the workaround/solution.
/home/oracle::11g–>dgmgrl
DGMGRL> connect sys/**********
DGMGRL> create configuration dg_primeprd as primary database is primeprd connect identifier is primeprd;
DGMGRL> add database primedr as connect identifier is primedr maintained as physical;
DGMGRL> enable configuration;
If in Broker you get below error Error: ORA-16664: unable to receive the result from a database
DGMGRL> show configuration
Configuration – dg_primeprd
Protection Mode: MaxPerformance
Members:
primeprd – Primary database
primedr – Physical standby database
Error: ORA-16664: unable to receive the result from a database
Fast-Start Failover: DISABLED
Configuration Status:
ERROR (status updated 40 seconds ago)
Check in Broker Log File.
Mon Jul 04 14:41:46 2016
Error 1017 received logging on to the standby
————————————————————
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
Failed to send message to site . Error code is ORA-01017.
Re-create password files in ASM in 12c like below, the correct format is pwd<dbuniquename>
Primary
srvctl config database -d primeprd
orapwd file=’+DATAC1/PRIMEPRD/pwdprimeprd’ entries=10 dbuniquename=primeprd password=*** force=y ignorecase=y
Standby
srvctl config database -d primedr
orapwd file=’+DATAC1/PRIMEDR/pwdprimedr’ entries=10 dbuniquename=primedr password=*** force=y ignorecase=y
DGMGRL> show configuration
Configuration – dg_primeprd
Protection Mode: MaxPerformance
Members:
primeprd – Primary database
primedr – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 18 seconds ago)
— Try Switchover Now —
DGMGRL> switchover to primedr
Performing switchover NOW, please wait…
Error: ORA-16644: apply instance not available
Failed.
Unable to switchover, primary database is still “primeprd”
DGMGRL> edit database primedr set state=’APPLY-ON’ with apply instance=’primedr1′;
DGMGRL> show database verbose primedr
Database – primedr
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 0 seconds (computed 0 seconds ago)
Average Apply Rate: 6.00 KByte/s
Active Apply Rate: 755.00 KByte/s
Maximum Apply Rate: 827.00 KByte/s
Real Time Query: OFF
Instance(s):
primedr1 (apply instance)
primedr2
DGMGRL> switchover to primedr
Performing switchover NOW, please wait…
New primary database “primedr” is opening…
Oracle Clusterware is restarting database “primeprd” …
Switchover succeeded, new primary is “primedr”
DGMGRL> show configuration
Configuration – dg_primeprd
Protection Mode: MaxPerformance
Members:
primedr – Primary database
primeprd – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 40 seconds ago)
DGMGRL> edit database primeprd set state=’APPLY-ON’ with apply instance=’primeprd1′;
DGMGRL> show database verbose primeprd
Database – primeprd
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 0 seconds ago)
Apply Lag: 0 seconds (computed 0 seconds ago)
Average Apply Rate: 307.00 KByte/s
Active Apply Rate: 0 Byte/s
Maximum Apply Rate: 0 Byte/s
Real Time Query: OFF
Instance(s):
primeprd1 (apply instance)
primeprd2
DGMGRL>
DGMGRL> show configuration
Configuration – dg_primeprd
Protection Mode: MaxPerformance
Members:
primedr – Primary database
primeprd – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 55 seconds ago)
Connect to DR site broker to intiate switchover
DGMGRL> switchover to primeprd ;
Performing switchover NOW, please wait…
Operation requires a connection to instance “primeprd1” on database “primeprd”
Connecting to instance “primeprd1″…
Connected as SYSDBA.
New primary database “primeprd” is opening…
Oracle Clusterware is restarting database “primedr” …
Switchover succeeded, new primary is “primeprd
DGMGRL> show configuration
Configuration – dg_primeprd
Protection Mode: MaxPerformance
Members:
primeprd – Primary database
primedr – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 11 seconds ago

Category: DatabaseUncategorized

Tags:

Leave a Reply

Article by: Shadab Mohammad