oracle oracle编译查看sql

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/859039/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 18:14:00  来源:igfitidea点击:

Oracle compile view sql

sqloraclecompiler-constructionant

提问by Marcus Leon

As part of our ANT based deploys we run some sql against an Oracle database.

作为基于 ANT 的部署的一部分,我们针对 Oracle 数据库运行一些 sql。

The deploys are set to fail if any sqlerrors occur. (We do this using WHENEVER SQLERROR EXIT FAILURE ROLLBACKin our SQL files and using the ant execcommand with failonerror=trueto run the sql).

如果sql发生任何错误,部署将设置为失败。(我们WHENEVER SQLERROR EXIT FAILURE ROLLBACK在 SQL 文件中使用并使用 antexec命令执行此操作failonerror=true以运行 sql)。

We would like to add to our deploy sql files some sql that will compile (or re-compile) certain views and have the deploy fail if the compile fails. Anyone know the sql (or whatever) that will allow us to do this?

我们想将一些 sql 添加到我们的部署 sql 文件中,这些 sql 将编译(或重新编译)某些视图,并且如果编译失败则部署失败。任何人都知道允许我们执行此操作的 sql(或其他)?

回答by araqnid

Do you need to do more than "ALTER VIEW xxx COMPILE"?

您需要做的不仅仅是“ALTER VIEW xxx COMPILE”吗?