RE: How to call a file .sql posted at SO area via PL/SQL

  • From: "Powell, Mark" <mark.powell2@xxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 18 Mar 2010 14:02:03 +0000

Using a SQLPlus session started remotely you cannot directly execute a SQLPlus 
script stored on the database server from the session using the native SQLPlus 
start script feature.

Your options depend on the nature of the script in question.

As Niall mentioned you might be able to use the dbms_scheduler feature.

You might be able to store the code as a stored procedure and just execute it 
from any session perhaps passing data back as a cursor or writing results on 
the database server using utl_file.

The utl_file utility can read and write only on the database server but it may 
be of use depending on the nature of the script.

There is the dbms_alert package that can be used to signal a program to take 
action.

There is the external progam call feature.

HTH -- Mark D Powell --


________________________________
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Eriovaldo Andrietta
Sent: Wednesday, March 17, 2010 10:43 PM
To: ORACLE-L
Subject: How to call a file .sql posted at SO area via PL/SQL

Hi,

 How can I do for call an .sql script that is in the SO (host).

 Ex.
     I have the file c:\script.sql
     I would like to call this file via PL/SQL., only via PL/SQL.

 Consider that the SO can be : Windows and Linux/Unix. it must run in both.
 Do not consider doing it via shell script.

Regards
Eriovaldo

Other related posts: