[20180823] IMU and DB Link.txt
--//when using DB link to view remote tables, a small log is actually generated.
--//when combined with the IMU, it can cause the IMU to fail.
1. Environment:
[Email protected]> @ ver1
Port_string VERSION BANNER
------------------------------ -------------- ------------------------------------------------------------------- -------------
X86_64/linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
CREATE public DATABASE LINK LOOPBACK CONNECT to SCOTT identified by book USING ' localhost:1521/book:dedicated ';
CREATE TABLE Deptx as SELECT * from dept;
2. Test:
[Email protected]> @ &r/viewsess "IMU commits"
NAME statistic# VALUE SID
----------- ---------- ---------- ----------
IMU commits 374 0 1
[Email protected]> update deptx set Dname=lower (dname) where deptno=10;
1 row updated.
[Email protected]> commit;
Commit complete.
[Email protected]> @ &r/viewsess "IMU commits"
NAME statistic# VALUE SID
----------- ---------- ---------- ----------
IMU commits 374 1 1
--//can discover that the current database imu is working.
[Email protected]> @ &r/viewsess "IMU commits"
NAME statistic# VALUE SID
----------- ---------- ---------- ----------
IMU commits 374 0 1
[Email protected]> update deptx set Dname=lower (dname) where deptno=10;
1 row updated.
[Email protected]> Select sysdate from [email protected];
Sysdate
-------------------
2018-08-22 09:04:00
[Email protected]> commit;
Commit complete.
[Email protected]> @ &r/viewsess "IMU commits"
NAME statistic# VALUE SID
----------- ---------- ---------- ----------
IMU commits 374 0 1
--//when there is a Dblink statement when executing DML, the IMU fails and returns to its original mode.
--//viewsess.sql script:
Set Verify off
Column name format A70
SELECT b.name, a.statistic#, A.value,a.sid
From V$mystat A, v$statname b
WHERE Lower (b.name) like lower ('%&1% ') and a.statistic# = b.statistic#;
--and a.value>0;
[20180823] IMU and DB Link.txt