问答 Oracle LogMiner 底层sql 查询频率多高 对服务器压力多大

Oracle LogMiner 底层sql 查询频率多高 对服务器压力多大

   爱吃火锅    发布于 2022-01-24 18:27  335  0

DECLARE
st BOOLEAN := true;
start_scn NUMBER := ?;
BEGIN
FOR l_log_rec IN (
SELECT
MIN(name) name,
first_change#
FROM
(
SELECT
MIN(member) AS name,
first_change#,
281474976710655 AS next_change#
FROM
v$log l
INNER JOIN v$logfile f ON l.group# = f.group#
WHERE l.STATUS = 'CURRENT' OR l.STATUS = 'ACTIVE'
GROUP BY
first_change#
UNION
SELECT
name,
first_change#,
next_change#
FROM
v$archived_log
WHERE
name IS NOT NULL
)
WHERE
first_change# >= start_scn
OR start_scn < next_change#
GROUP BY
first_change#
ORDER BY
first_change#
) LOOP IF st THEN
SYS.DBMS_LOGMNR.add_logfile(l_log_rec.name, SYS.DBMS_LOGMNR.new);
st := false;
ELSE
SYS.DBMS_LOGMNR.add_logfile(l_log_rec.name);
END IF;
END LOOP;

SYS.DBMS_LOGMNR.start_logmnr( options => SYS.DBMS_LOGMNR.skip_corruption + SYS.DBMS_LOGMNR.no_sql_delimiter + SYS.DBMS_LOGMNR.no_rowid_in_stmt
+ SYS.DBMS_LOGMNR.dict_from_online_catalog + SYS.DBMS_LOGMNR.string_literals_in_stmt );
END;

0条回答
社区公告
  • 大数据领域最专业的产品&技术交流社区,专注于探讨与分享大数据领域有趣又火热的信息,专业又专注的数据人园地

最新活动更多
微信扫码获取数字化转型资料
钉钉扫码加入技术交流群