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: DDL Statements in PL/SQL !?!

Re: DDL Statements in PL/SQL !?!

From: Andrew Babb <andrewb_at_mail.com>
Date: Mon, 03 May 1999 14:49:58 +0800
Message-ID: <372D4716.E47CBEFB@mail.com>


Hi Peter,

You can issue DDL from PL/SQL using the DBMS_SQL database package. This should do what you are looking for.

Rgds
Andrew

peter_veenstra_at_my-dejanews.com wrote:

> How does one go about performing administrative tasks (like removing all
> sequences or indexes) in a iterative fashion without spooling out the contents
> of a query into a file a then creating a script to execute?
>
> For example. I want to delete all the sequences for a single user and then
> reset them with a higher value. I can easily determine the names of the all
> the sequences, I can write a query that will return to me all the tables with
> primary keys and the maximum values for those columns but I can not write a
> PL/SQL block that will identify the sequences, identify the columns that they
> are used for, DROP the sequences (DDL) statement, and then create and rename
> the sequence for each column set at the column max value + 1000 ...
>
> Why can't I execute DDL in PL/SQL and is there a better way to do this
> programmatically with out a lot of script writing? I want to pass a PL/SQL
> block a user name and have it do all the rest.
>
> Any information would be appreciated. Please contact me directly at
> pveenstra_at_mjharden.com or pcgv1_at_ibm.net.
>
> Merci,
>
> Peter
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Mon May 03 1999 - 01:49:58 CDT

Original text of this message

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