Infrastruktur & Datenbanktechnologie1.08.2023Tom Lieber
Create Standby with Oracle 19.16?
I hit Bug 34446152 – [DATAGUARD_BRKR] 19.16 onward broker shows „ORA-16705: internal error in Data guard broker“ (Doc ID 34446152.8)
If you decide to create an DG Environment, do it with 19.14 or 19.20 but not with 19.15-19.19. I have not alot of infos about this Bug. But it is a … maybe you will HIT-Bug.
Okay after Upgrade (19.20)
Following Guide helps to startup DG-Standby from previouse cloned VM:
FYI: This Template VM is preconfigured to be ready for Standby Cloning with this steps:
tomdg01:
mkdir /app_oracle/fra/C10P_A/standbylog
sql+ /app_oracle/local/dbsetup/19/crdb/11_standby.sql
vi /etc/oratab => don't start the DB after cloning vm
change listener.ora -- check standby entries
change tnsnames.ora -- check standby entries
now we can clone
Okay now you can start und Setup the Standbyside:
tomdg02:
change listener.ora -- remove the primary and active the standby part
change tnsnames.ora -- same here
mkdir /app_oracle/fra/C10P_B
cp /tmp/demo_stby.ctl /app_oracle/data/C10P_A/ctrl1.ctl
cp /tmp/demo_stby.ctl /app_oracle/fra/C10P_A/ctrl2.ctl
mkdir /app_oracle/fra/C10P_B
sqlplus "/as sysdba"
startup nomount;
alter system set db_recovery_file_dest='/app_oracle/fra/C10P_B' scope=spfile;
alter system set db_unique_name=C10P_B scope=spfile;
shutdown immediate;
startup mount;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
exit;
lsnrctl start C10P
Now we can start the Primary instance tomdg01
tomdg01:
sqlplus "/as sysdba"
startup;
exit;
lsnrctl start C10P
--test the connection best on both sides!
sqlplus sys/@dg_c10p_a;
sqlplus sys/@dg_c10p_b;
Now lets enable the DG:
dgmgrl sys/@dg_c10p_a
create configuration C10P as primary database is c10p_a connect identifier is DG_C10P_A;
add database c10p_b as connect identifier is DG_C10P_B maintained as physical;
edit database c10p_b set property ApplyLagThreshold=0;
edit database c10p_b set property TransportLagThreshold=0;
edit database c10p_a set property ApplyLagThreshold=0;
edit database c10p_a set property TransportLagThreshold=0;
edit database c10p_a set property 'logxptmode' ='sync' ;
edit database c10p_b set property 'logxptmode' ='sync' ;
enable configuration ;
-- alter system switch logfile --
show configuration;
show database c10p_b;
show database c10p_a;
The Broker shows the Current status of the Standby
After a while..
DGMGRL> show configuration
Configuration - c10p
Protection Mode: MaxPerformance
Members:
c10p_a - Primary database
c10p_b - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 54 seconds ago)