Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I run sql script in background?

macdoorJan 23 2017 — edited Mar 4 2020

I can run my sql script in foreground smoothly. But when I run same script in background, it hang up in background, nothing output. After I switch the process to foreground, it run again .

SQL script file: t.sql

----------------------------

select sysdate from dual;

quit;

-------------------------------------

I can get result when run this command :

---------------------------------------

sql U/P@10.224.141.137:8521/nmsb @t.sql

I can not get any result and hung up in background , when run this command

---------------------------------------

sql U/P@10.224.141.137:8521/nmsb @t.sql &

---------------------------------------

After I input "fg" command in same terminal. The command can continue.

The only difference is '&' sign.

Thx.

Comments

Processing

Post Details

Added on Jan 23 2017
11 comments
25,140 views