Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help: Running SQLPLUS script from PLSQL

Re: Help: Running SQLPLUS script from PLSQL

From: Waterman Family <waterman_at_iwaynet.net>
Date: Thu, 29 Oct 1998 15:57:22 -0500
Message-ID: <71akvg$mpv$1@news.iwaynet.net>


From my experience, calling a SQL*Plus command from PL/SQL cannot be done. Oracle8 PL/SQL allows calls to programs on the host. You might try this approach: from PL/SQL query the data dictionary to gather all relevant information about the table to be copied, then construct the SQL create table statement and use dynamic SQL (dbms_sql package) to execute it. This gives you a empty table copy. Then use an insert ... select statement to fill it. If it is on a different database use a DB link with the insert command.
Hope this helps,

    --Gary

salmanaziz_at_my-dejanews.com wrote in message <71294p$k77$1_at_nnrp1.dejanews.com>...
>Hi
>
>I want to call the copy command from PL/SQL to copy a remote table . We
are
>running Oracle 7.3 over Unix (HP). I have a script which can be run from
the
>unix but the question is how to call this script from PL/SQL stored
>procedure. Is there a way to run SQLPLUS comand from PLSQL. If not, is
there
>any interface between PL/SQL and host operating system (unix). I need to
run
>this copy script to load a local table from a remote table using
PowerBuilder
>application.
>
>I will appreciate your help.
>
>Thanks
>
>Salman
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Oct 29 1998 - 14:57:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US