重庆思庄Oracle、Redhat认证学习论坛

标题: Dbms_logmnr Fails On Pluggable Databas [打印本页]

作者: 刘泽宇    时间: 2024-3-3 13:06
标题: Dbms_logmnr Fails On Pluggable Databas
现象:
Running logminer, a dbms_logmnr procedure from within open PDB instance fails with:

ORA-65040: operation not allowed from within a pluggable database


原因:
The logminer needs to be started in the CDB.

Launching the logminer at PDB level does not meet the coding checks. The v$logminer_contents is only accessible at CDB level.
This is mentioned in the documentation:
'In a CDB, the V$LOGMNR_CONTENTS view and its associated functions are restricted to the root database'

处理方法:
Use the following steps to correctly start the logminer at CDB level:

1. Check active redo logs:
Select member from v$logfile;

2. Add the desired logs:
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/<ORACLE_HOME>/oradata/<DBNAME>/redo01.log', OPTIONS => DBMS_LOGMNR.NEW);
...

3. Start the logminer using the option as before:
EXECUTE DBMS_LOGMNR.START_LOGMNR( OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2