sqlplus oracle:如何在1行的bash上运行sql命令? [英] Sqlplus oracle : How can I run sql command on bash in 1 line?
本文介绍了sqlplus oracle:如何在1行的bash上运行sql命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在sqlplus中的bash上将其转换为1个命令行吗?因为我要使其自动化.
Can I convert this into 1 command line on bash in sqlplus? cause i want to automate it.
sqlplus / as sysdba
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exit
推荐答案
您将不需要使用自动化退出,因为无论如何它都应该在文件末尾退出.因此,您可以执行以下操作之一:
You won't need the exit with automation because it should exit on end of file anyway. So on one line you could do:
echo 'EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);' | sqlplus / as sysdba
这篇关于sqlplus oracle:如何在1行的bash上运行sql命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文