使用MV总结

今天系统需要升级几个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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10130206/viewspace-616473/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值