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

From: Powell, Mark <mark.powell2_at_hp.com>
Date: Thu, 18 Mar 2010 14:02:03 +0000
Message-ID: <7C4BF3B32B80CC44AE37D31B172415934CE0089252_at_GVW1337EXC.americas.hpqcorp.net>



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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] 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

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 18 2010 - 09:02:03 CDT

Original text of this message