Home » SQL & PL/SQL » Client Tools » To Run Sql script in background
To Run Sql script in background [message #647152] Wed, 20 January 2016 13:59 Go to next message
rohit_shinez
Messages: 138
Registered: January 2015
Senior Member
Hi Guys,

I am executing two sql scripts from unix box by connecting through sqlplus from two putty sessions, i need to run the scripts in background is there a way to run apart from executing it from sh script.

SQL> @test.sql
.
.
.

Another session 

SQL> @test1.sql
.
.
.

Re: To Run Sql script in background [message #647154 is a reply to message #647152] Wed, 20 January 2016 14:37 Go to previous messageGo to next message
BlackSwan
Messages: 26201
Registered: January 2009
Location: SoCal
Senior Member
It depends upon what the scripts do.

Can you do the same from PL/SQL procedures?
Re: To Run Sql script in background [message #647155 is a reply to message #647152] Wed, 20 January 2016 14:46 Go to previous messageGo to next message
rohit_shinez
Messages: 138
Registered: January 2015
Senior Member
No actutally i need to run the sql scripts in background so that my putty session will not disconnect basically my myscript does below


insert into T1
select * from T2 where id = 23;
Re: To Run Sql script in background [message #647156 is a reply to message #647155] Wed, 20 January 2016 14:53 Go to previous messageGo to next message
BlackSwan
Messages: 26201
Registered: January 2009
Location: SoCal
Senior Member
https://www.gnu.org/software/screen/manual/screen.html
Re: To Run Sql script in background [message #647157 is a reply to message #647152] Wed, 20 January 2016 15:33 Go to previous messageGo to next message
Michel Cadot
Messages: 65848
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Maybe you should envisage to feedback and thank people who help you.
Review your previous topics and do it.

Re: To Run Sql script in background [message #647173 is a reply to message #647157] Thu, 21 January 2016 04:20 Go to previous messageGo to next message
JNagtzaam
Messages: 36
Registered: July 2015
Location: Alkmaar
Member

submit it as a one time job!? Can be done on the database as on UNIX.
Re: To Run Sql script in background [message #647184 is a reply to message #647155] Thu, 21 January 2016 06:55 Go to previous message
EdStevens
Messages: 983
Registered: September 2013
Senior Member
rohit_shinez wrote on Wed, 20 January 2016 14:46
No actutally i need to run the sql scripts in background so that my putty session will not disconnect basically my myscript does below



And why would it cause your putty session to disconnect?
Is this meant to be manually submitted, or submitted by some job scheduling process, like cron?
In an earlier message you asked "is there a way to run apart from executing it from sh script". What are you envisioning here? If you are logged on to the server, you are already in a shell processor. You can launch sqlplus from there to execute your sql, or you can execute a shell script that in turn launches sqlpus.
Why are you using two putty sessions? What is that accomplishing?

Previous Topic: Does Oracle SQL Developer Support Unicode ?
Next Topic: Hide SQL > statements in the spool file
Goto Forum:
  


Current Time: Sat Oct 20 01:38:48 CDT 2018