aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

QSM-02180: no primary key constraint in the master table

QSM-02180: no primary key constraint in the master table
Cause: The explain_mview assumes that the materialized view is going to be created as the Primary Key materialized view. A Primary Key materialized view can not be created if the base table does not have a primary key constraint.
Action: Add a primary key constraint to the base table, or create the materialized view as Rowid MV by specifying the WITH ROWID option. If the materialized view is a Rowid MV, then it should be able to do complete refresh and even fast refresh, given that the materialized view log on the master table has a rowid.

请先 登录 后评论

1 个回答

小智
QSM-02180:主表中没有主键约束,
.原因: explain_mview假定物化视图将被创建为主键实现视图。如果基表没有主键约束,则无法创建主键实体化视图。,
.操作:将基本键约束添加到基表中,或者通过指定WITH ROWID选项,将实体化视图创建为Rowid MV。如果物化视图是Rowid MV,则应该能够完成刷新甚至快速刷新,因为主表上的实例化视图登录具有rowid。,
.
请先 登录 后评论