Remove Unwanted/Extra Data in SQLPLUS

若如初见. 提交于 2019-12-20 04:15:55

问题


I am running a file via batch file

Batch File:

sqlplus admin/admin@SERVER @abc.sql > output.txt

SQL File abc.sql:

set PAGESIZE 1000
set LINESIZE 550
set echo off
set head off
set FEEDBACK OFF
select * from S_ABC
exit;

Output.txt:

Connected To:
Oracle Database 11g................................
.
.
.
DATA
.
.
Disconnected from Oracle Database 11g .......
.
.

Please help me remove the extra data, in the starting and end of output.txt file.


回答1:


-S seems to be what you're looking for;

sqlplus -S admin/admin@SERVER @abc.sql > output.txt

-S[ILENT]

Suppresses all SQL*Plus information and prompt messages, including the command prompt, the echoing of commands, and the banner normally displayed when you start SQL*Plus. If you omit username or password, SQL*Plus prompts for them, but the prompts are not visible. Use SILENT to invoke SQL*Plus within another program so that the use of SQL*Plus is invisible to the user.



来源:https://stackoverflow.com/questions/35913494/remove-unwanted-extra-data-in-sqlplus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!