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: executing a list of DDL statements in one call

Re: executing a list of DDL statements in one call

From: Jerwynn <venture_at_i-manila.com.ph>
Date: Wed, 16 Jun 1999 09:47:44 +0800
Message-ID: <37670240.98643FE5@i-manila.com.ph>


thanks Mark,

However, I need to read the script file from my own program, bypassing SQL plus, and send them to the server through an OCI function call. I found out that it the server could not accept the list of DDL statements in one call. There must something to wrap the list of DDL.

Mark Malakanov wrote:

> If you only need automatically execute several DDL you can simply use script
> (text file):
>
> myscript.sql
> ----------------
> create table T1...;
> create table T2...;
> ...
> create or replace....;
> <EOF>
>
> You can execute this script from SQL*Plus
> SQL> @myscript.sql
>
> If you need create several objects in one step (all or nothing) you can use
> CREATE SCHEMA construction.
>
> If you want to create different objects in each execution of the
> _procedure_, use dinamic SQL (DBMS_SQL package )
>
> Regards,
> Mark
>
> Jerwynn wrote in message <3765C351.9754B8A2_at_i-manila.com.ph>...
> >Hi,
> >
> > I need to execute several DDL statements, specifically CREATE OR
> >REPLACE FUNCTION command (which is read from a file). PL/SQL begin ...
> >end doesn't allow DDL statements inside.
> >Is there another way to run the DDL statements in one call?
> >
> > Oracle has a CREATE PACKAGE command, which can contain several
> >functions. However, I want my FUNCTIONS to be created in the
> >top-level. Thanks.
> >
> >Regards,
> >
> >Jerwynn Lee
> >
Received on Tue Jun 15 1999 - 20:47:44 CDT

Original text of this message

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