SQL> select banner_full from v$version where rownum=1;
BANNER_FULL
--------------------------------------------------------------------------------
Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
SQL> select database_role from v$database@primary;
DATABASE_ROLE
----------------
PRIMARY
SQL> desc temp
Name Null? Type
----------------------------------------- -------- ----------------------------
S VARCHAR2(100)
SQL> select dbms_flashback.get_system_change_number@primary from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
3.4359E+11
SQL> alter session enable adg_redirect_dml;
Session altered.
SQL> desc temp
Name Null? Type
----------------------------------------- -------- ----------------------------
S VARCHAR2(100)
SQL> insert into temp values('bla');
insert into temp values('bla')
*
ERROR at line 1:
ORA-16397: statement redirection from Oracle Active Data Guard standby database
to primary database failed
primary is a database link from the physical standby (opened read-only) to the primary.
The insert succeeds when we omit the call to dbms_flashback.get_system_change_number@primary
Is it a bug or a feature ?
If feature: what exactly is featured here ?