如何避免视图“标记为无效”?

发布于 2024-11-26 23:38:14 字数 391 浏览 6 评论 0原文

如何修改影响其他视图的表/视图而不将这些依赖视图“标记为无效”?

我们正在运行 DB2 9.5 LUW。我读过 Leons Petrazickis 的博客文章查找标记为无效的视图列表,他说,

还有一些方法可以使用事务、CREATE OR REPLACE 语句和其他措施来避免这种情况。

由于我们无法利用 9.7 中的新功能,因此我需要有人详细说明 Leons 提到的其他方法。如果有一个在 IBM Data Studio 中运行的示例就太好了。

How can I modify tables/views that impact other views without having those dependent views "marked inoperative"?

We're running DB2 9.5 LUW. I've read Leons Petrazickis' blog post Find a list of views marked inoperative where he says,

There are also ways to avoid it using transactions, CREATE OR REPLACE statements, and other measures.

Since we can't take advantage of the new features in 9.7 I need someone to elaborate on these other ways that Leons mentions. An example that runs in IBM Data Studio would be great.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傲娇萝莉攻 2024-12-03 23:38:14

DB2 9.7 中添加了“CREATE OR REPLACE”功能。在此之前,避免将视图标记为无效的唯一方法是在更改视图下的对象之前删除视图,然后重新创建视图。

或者,避免更改视图的依赖对象。 :-)

The "CREATE OR REPLACE" functionality was added in DB2 9.7. Prior to this, the only way to avoid marking views inoperative is to drop the views before making the changes to the objects underneath the views, and recreate the views after.

Or, avoid making changes to the views' dependent objects. :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文