oracle 在 UNIX 中使用 sqlplus 运行 SQL?

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

Running a SQL using sqlplus in UNIX?

oracleunixsqlplus

提问by Balualways

While running the SQL using sqlplus, I dodn't want to dispaly anything on the screen. I am using SPOOL to save the contents to a file. even if I redirect it dispalys connected to SQL, SQL> 1 2 .... How can I prevent these entries from getting printed?

使用 sqlplus 运行 SQL 时,我不想在屏幕上显示任何内容。我正在使用 SPOOL 将内容保存到文件中。即使我重定向它显示连接到 SQL,SQL> 1 2 .... 如何防止这些条目被打印?

采纳答案by Erich Kitzmueller

if everything else fails, you could try

如果其他一切都失败了,你可以尝试

sqlplus username/password@database @myscript.sql >/dev/null 2>&1

回答by Codo

Try the option -silent (or just -s):

尝试选项 -silent (或只是 -s):

> sqlplus -s username/password@database