I am trying to run an .sql
file from sqlplus
in Unix environment as a background process.
I am connecting to Unix using Tectia or Putty, and I want sqlplus
to continue running in background even if my terminal closes.
This command works
$ sqlplus USERNAME/password@SCHEMA
SQL>@test.sql
SQL> quit
but when trying to start it in background it fails
$ sqlplus USERNAME/password@SCHEMA&
SQL>@test.sql
SQL> quit
What is the right command/script?
&
will put it in the background
but if you actually want to close your terminal and leave for the day
you need to use nohup
nohup sqlplus USERNAME/password@DBNAME @test.sql &
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With