ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 使用MV总结

使用MV总结

原创 Linux操作系统 作者:qqmengxue 时间:2009-10-13 22:08:34 0 删除 编辑

今天系统需要升级几个MV,原本在测试库上运行良好的脚本但到正式环境还是有些出入的,

问题一:

首先是创建的时候,居然报:

ora-12060 shape of prebuilt table does not match definition query

原因是需要将select后的列名需要进行as 别名提示,晕死。。

问题二:

再就是执行好的脚本居然上面都有小红叉叉,叫人看了心里好不爽,但是还是可以正常运行的,后来查看metalink文章(264036.1):

An mview becoming invalid does not mean it will not retain old data. You can still query the mview. Actually an mview with invalid status means it has old data and it is not in sync with the master table.

We were seeing the same behavior. in 9.2 and found Metalink note 264036.1 which says:

"This is expected behavior. When there is a DML on the master table, all the MVs based on this table are marked as INVALID. Though the status is INVALID, you will be able to query the mview.

 

shit~~~~~
However, the query on MV will not return latest update done in master table unless MV is refreshed

 

 

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

请登录后发表评论 登录
全部评论

注册时间:2009-03-26

  • 博文量
    169
  • 访问量
    549092