Home » SQL & PL/SQL » SQL & PL/SQL » How to invoke multiple sessions of sql*plus thru pl/sql program.
How to invoke multiple sessions of sql*plus thru pl/sql program. [message #224168] Tue, 13 March 2007 05:56 Go to next message
donind
Messages: 95
Registered: February 2007
Member
Hi

How to invoke multiple sessions of sql*plus thru pl/sql program.

Thanks
Re: How to invoke multiple sessions of sql*plus thru pl/sql program. [message #224188 is a reply to message #224168] Tue, 13 March 2007 06:41 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Why on earth would you want to do that. Whatever the reason, its a bad solution. Tell us what you trying to achieve and see if we can come up with a better solution architecture.

Ross Leishman
Re: How to invoke multiple sessions of sql*plus thru pl/sql program. [message #224190 is a reply to message #224188] Tue, 13 March 2007 06:44 Go to previous messageGo to next message
donind
Messages: 95
Registered: February 2007
Member
For modularity I have made so many small programs and divided the task for every program individually and I want to run all these programs parallely by invking sql*plus
Re: How to invoke multiple sessions of sql*plus thru pl/sql program. [message #224198 is a reply to message #224190] Tue, 13 March 2007 06:50 Go to previous message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Take a look at DBMS_JOB (in 9i) or DBMS_SCHEDULER (in 10g). You can use them to asynchronously execute PL/SQL procedures/packages.

You should not use them to invoke a SQL client (like SQL*Plus) which will establish yet another connection to the database - that's just bad design. Instead, move all of your logic from SQL*Plus into PL/SQL packages.

If you cannot move the logic into packages (eg. you are using SQL*Plus reporting capabilities to spool output) then what you want is an operating system scheduler / workflow tool. A Unix shell script or windows DOS batch script would do in a pinch.

Ross Leishman
Previous Topic: Multiple/Single Line Query
Next Topic: Tunning Question
Goto Forum:
  


Current Time: Sat Dec 10 10:32:02 CST 2016

Total time taken to generate the page: 0.08291 seconds