物化的变化
我在一台服务器上有一个由数据库链接创建的物化视图。 该 Mview 上正在运行一项作业。 (之前使用 dbms_refresh.make 创建)。
现在我在原始表中创建了 3 个新字段。 我的疑问是。
1)我是否需要再次删除并创建Mview,如果是,我是否需要在主服务器上再次创建Mview日志 2)在 Mview 上运行的作业会发生什么情况,我需要重新创建它吗?
还有在Mview上创建的视图,所以 --如果我运行创建或替换视图查询,会产生任何问题吗?
请指导。
谢谢!
I have one Materialized view on one server which is created by DB link.
There is one job running on that Mview. (created with dbms_refresh.make earlier).
Now I have created 3 new fields in original table.
My queries are.
1) Do I need to drop and create Mview again, if yes, do i need to create Mview log on main server again
2) What happens to job running on Mview , do i need to create it agin?
Also there are views created on Mview ,so
--If i run create or replace view query , will it create any problem?
Please guide.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您需要在物化视图中包含新列,那么您需要重新创建物化视图。您必须显式删除视图,因为没有“创建或替换物化视图”语句。
删除/重新创建物化视图应该重新创建刷新作业。不能 100% 确定,但您可能也应该重新创建日志。
而且,如果您不需要在视图中包含新列,那么您实际上不需要执行任何操作......
If you need to include the new columns in your materialized view then yes you need to re-create the materialized view. You must explicitly drop the view as there is no "create or replace materialized view" statement.
Dropping/recreating the materialized view should re-create the refresh job. Not 100% certain, but you should probably recreate the log as well.
And, if you don't need to include the new columns in your view, you really don't need to do anything...
删除/创建物化视图后,您应该重新编译其他视图,因为它们可能已变得无效。
来检查是否发生了这种情况
您可以通过重新编译视图
,或者
这只是重新编译架构中的所有内容。执行此操作时请确保没有正在运行的作业!
After dropping/creating the materialized view, you should recompile the other views afterwards, because they may have become invalid.
You can check if that happened with
Recompile a view can be done with
or
This simply recompiles everything in your schema. Be sure to have no running jobs while doing this!