[20180823] IMU and DB Link.txt

Source: Internet
Author: User
Tags dname

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.