1、orcale创建一个test用户dblink连接用于创建dblink和后期测试,创建语句如下:
create user test identified by test123456;
grant dba to test;
2、在dm创建对应用户的dblink
create or replace public link “LOCAL_ORACLE” connect ‘ORACLE’ with test identified by test123456 using ‘127.0.0.1/orcl’;(我创建的公共外部链接,应该不影响)
3、在dm执行对应带dblink的select 语句(数据量稍微多一点太短可能捕获不到);
4、在orcale执行此语句即可看到按时间排序的对应语句
select t.LAST_ACTIVE_TIME,
t.*
from v$sqlarea@local_oracle t
where t.PARSING_SCHEMA_NAME in (‘TEST’) --TEST换成自己连接orcale用户即可
order by t.LAST_ACTIVE_TIME desc
文章
阅读量
获赞