如何在 Oracle/TOAD 中获取有关编译错误的信息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7013370/
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-10 03:28:00  来源:igfitidea点击:

How to get information about compile error in Oracle/TOAD

oracletoad

提问by Shane Wealti

I'm using TOAD to develop a stored function in an Oracle database. When I click the "run as script" button in TOAD, it tells me that the script was executed with 0 errors and 1 compile errors. Where do I see the specific compile error(s). I'm fairly new to TOAD so I might be missing something obvious about the interface like a tab/window to see such error messages.

我正在使用 TOAD 在 Oracle 数据库中开发存储函数。当我单击 TOAD 中的“作为脚本运行”按钮时,它告诉我脚本执行时有 0 个错误和 1 个编译错误。我在哪里可以看到特定的编译错误。我对 TOAD 相当陌生,所以我可能会遗漏一些明显的界面,例如选项卡/窗口来查看此类错误消息。

采纳答案by Allan

You can either add SHOW ERRORSto the end of the script, which will print the error message(s) to the "script output" tab, or compile the function using the "Execute Statement" command in Toad, which will cause the errors to be displayed in a box at the bottom of the editor.

您可以添加SHOW ERRORS到脚本的末尾,这会将错误消息打印到“脚本输出”选项卡,或者使用 Toad 中的“执行语句”命令编译函数,这将导致显示错误在编辑器底部的一个框中。

回答by Gary Myers

Or you can look in USER_ERRORS table afterwards

或者你可以在之后查看 USER_ERRORS 表

回答by user4265386

2 things you can do

你可以做的 2 件事

  1. goto Toad, schema browser, select Invalid Objects will tell you where to look.
  2. then load the package into the editor and select the function, right click, compile, wioll show you the errors
  1. 转到 Toad,模式浏览器,选择 Invalid Objects 会告诉您在哪里查看。
  2. 然后将包加载到编辑器中并选择函数,右键单击,编译,将显示错误

回答by Prashant_M

Click on Database -> Procedure Editor in top tool bar.

单击顶部工具栏中的数据库 -> 过程编辑器。

Paste your code in this new editor window and execute by clicking green play button on top.

将您的代码粘贴到这个新的编辑器窗口中,然后单击顶部的绿色播放按钮执行。

All the errors will be displayed in a new window at the bottom.

所有错误都将显示在底部的新窗口中。

回答by Shane Wealti

Another option that worked for me was to open my script in the procedure editor and compile it there.

另一个对我有用的选项是在过程编辑器中打开我的脚本并在那里编译它。