How can I create a batch file for SQLPlus?

こ雲淡風輕ζ 提交于 2019-12-13 02:08:11

问题


I need to create a batch file, i.e., batch.bat.

When we execute this file:

  1. It will open SQLPlus
  2. It will call a file called file1.sql.

file1.sql contains the creation and insertion scripts for a particular user.

I have file.sql, but what I need to know is, how do I create a batch file to perform this function?


回答1:


A little test script (stored in file named test.sql):

select 1 from dual;

exit;

... and to execute it:

sqlplus user/password @test.sql


来源:https://stackoverflow.com/questions/881115/how-can-i-create-a-batch-file-for-sqlplus

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