Executable that runs a .sql file to prompt for a username to unlock in a oracle database. Needs to close at the end

自古美人都是妖i 提交于 2019-12-11 12:07:54

问题


I have an executable that connects to an Oracle database and runs a SQL script, stored in a ".sql" file. When the script runs, it prompts for a username input, and then unlocks it. After it completes the unlock and it pops up:

User Altered with no errors

And it goes back to the sqlplus arrow.

I would want the window to close after the script has run. It works perfectly on the remote server, without the connection details in the exe file. For some reason when I add the connection details in my exe to start sqlplus and run this script, it doesn't matter where I put exit at, or how I use it, the window still stays open.

Thanks for the help.

exe. code:

sqlplus system/password//server:1521/db @C:\Scripts\Script2.sql

sql code:

ALTER USER &user_name ACCOUNT UNLOCK;
exit

来源:https://stackoverflow.com/questions/55262230/executable-that-runs-a-sql-file-to-prompt-for-a-username-to-unlock-in-a-oracle

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