Professional Documents
Culture Documents
This new feature allows DML to be executed on an Active Data Guard standby database. When DML
(insert/update/delete) operation is executed the update is passed to the Primary database where it is
executed and the resulting redo of the transaction will update the Standby database after which control
will be returned to the application. The DML is executed preserving all ACID properties of the transaction.
Note: That some of the steps above could potentially introduce some performance overhead.
• The managed standby recovery at the Active Data Guard standby database must be started with
the real-time apply option
• The Active Data Guard standby database must be in sync with the primary database.
• Connection to the Active Data Guard Standby database from a client machine or using a tns string
like '$ sqlplus sys@SUZMA19C as sysdba'
ENVIRONMENT
PRIMARY STANDBY
OS / VERSION Oracle Linux Server 7.9 Oracle Linux Server 7.9
HOSTNAME OMmac1.localdomain SOMmac1.localdomain
IP ADDRESS 192.168.56.230 192.168.56.240
DB NAME uzma19c uzma19c
DB UNIQUE NAME uzma19c suzma19c
DB ROLE PRIMARY PHYSICAL STANDBY
DB VERSION 19.3.0 19.3.0
Page 1 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
Page 2 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
When we try to perform the DML (insert) on standby we get ORA-1600 error.
Page 3 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
On Standby Enable the Active DataGuard DML Redirection, then try to insert
Or
When we try to perform the DML (insert) on standby after DML enabling on standby but we still get
ORA-1600 error.
Page 4 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
Start the MRP and then try to insert the new record
When we try to perform the DML (insert) on standby after starting the MRP this time we get ORA-16397
error
Page 5 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
So finally, we followed below steps for succesful Active DataGuard DML Redirection
Page 6 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
When DML (insert) is done on standy, we do not get the SQL prompt until.
The Redo generated is shipped and applied on standby and then we get the SQL prompt.
Page 7 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
If DML (Insert) done on Standby takes a lot of time to reach on primary then we will get ORA-02055 and
ORA-40509 error
Post ORA-02055 and ORA-40509 error we need to Rollback the DML on standby.
REF:
https://blogs.oracle.com/maa/post/oracle-active-data-guard-dml-redirect-tuning-read-mostly-
workloads
Page 8 of 9 o-dba-g.blogspot.com
Uzma Parveen 19c NF: DML ON STANDBY
THANKYOU!!!
Page 9 of 9 o-dba-g.blogspot.com