Re: How can I call a SQL Plus script from a PL/SQL script?

From: julio <julio33_at_whomail.com>
Date: 16 Jul 2002 16:18:23 -0500
Message-ID: <3d348d11$0$158$45beb828_at_newscene.com>


In article <3d346257.1130579890_at_news-east.newscene.com>, me_at_anon.com (Don) wrote:
>I think youhave it backwards. I think his question is how does he
>call a SQL Plus script from the Anonymous Block. I have the same
>problem and can't figure it out.
>
>For example, I have a script called script.sql. It has DDL and SQL
>commands. At the SQL Plus prompt I can type 'run sript.sql' (or
>_at_script.sql) to run it and it executes with no problem
>
>Now I need to execute it from the PL/SQL block as follows:
>DECLARE
>....
>BEGIN
> LOOP
> run script.sql -- *** This is what I can't do ***
> END LOOP
>END
From Tom Kyte the guru of gurus:

See chapter 10 in the PL/SQL manual. Its about External Procedures which let you call C from PL/SQL directly. Basically, you'll create a .dll on NT or .so on Unix and then you'll be able to call the functions/procedures in that after you map them to pl/sql.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

also in his book Expert one-on-one Oracle (walk, no run, to the store and buy it) see page 860 where he gives you complete code for Oracle JAVA stored procedure that does it (he calls code trival :) )

Julio and Colin and Lyse

See my babies at

http://www.geocities.com/colin_and_lyse/colin_lyse.html Received on Tue Jul 16 2002 - 23:18:23 CEST

Original text of this message