Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamically creating procedures
A copy of this was sent to vjavaly_at_hotmail.com
(if that email address didn't require changing)
On Fri, 12 Mar 1999 17:10:44 GMT, you wrote:
>I'm looking for ideas as to how to do the following: From an Oracle8.03
>PL/SQL procedure, create a new procedure and compile it into the database.
>
>Here's what I've done so far: Created a GENERATOR procedure to generate new
>procedures based on parameters. This GENERATOR procedure calls an external
>procedure (actually it calls the wrapper procedure which calls a C program)
>which create a file which contains the source code for the new procedure.
>
>At this point, I could have the C program invoke SQL*Plus (through the SYSTEM
>command) and START the new procedure source file to compile it. However, I
>would like to find another way to compile the new procedure.
>
>Any ideas would be appreciated. Please reply to vjavaly_at_hotmail.com. Thank
>you in advance.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Why not just use dbms_sql? If you grant CREATE PROCEDURE directly to the owner of the pl/sql routine, he can use dynamic sql in dbms_sql to create the procedures. no need for C, external procs, sqlplus, etc, etc, etc...
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities