ITPub博客

首页 > 数据库 > Oracle > 【MVLOG】正确删除物化视图 避免ora-00942错误

【MVLOG】正确删除物化视图 避免ora-00942错误

原创 Oracle 作者:xysoul_云龙 时间:2017-08-18 22:26:49 0 删除 编辑
 select 'drop materialized view log on '||mvl.log_owner||'.'||mvl.master||';'  cmd  from dba_mview_logs mvl  where not exists  ( select table_name from dba_tables tab  where tab.owner = mvl.log_owner and tab.table_name = mvl.log_table  ) ;
CMD
--------------------------------------------------------------------------------
drop materialized view log on SCOTT.EMP;
#执行正确的删除 materialized view log  语句
SQL> drop materialized view log on SCOTT.EMP;
Materialized view log dropped.




ORA-00942 when deleting from an existing Table after dropping materialized view log table (文档 ID 1912363.1)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29487349/viewspace-2143798/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
主要从事Oracle数据库 DBA相关工作,其他操作系统、中间件等也有涉及,热衷分享。岁月老将至,如有幸在江湖中留点踪迹,也是欣慰。 【文盲筱烨】好读书爱运动的IT技术爱好者 微博:文盲筱烨 微信公众号:筱烨视点

注册时间:2014-02-15

  • 博文量
    412
  • 访问量
    1104618