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

From: Powell, Mark <>
Date: Thu, 18 Mar 2010 14:02:03 +0000
Message-ID: <>

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: [] 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


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


     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.


Received on Thu Mar 18 2010 - 09:02:03 CDT

Original text of this message