Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Procedures
Phil,
dynamic sql is what you want. The DMBS_SQL package for O7 and execute immediate for O8 (i? - I can't remember off hand.)
In addition, the user dropping the tables must have the appropriate privs granted directly and not through a role.
Plus, the procedure will be running as the user who owns the procedure, if other users are able to execute it, so it will be the owning user who needs the privs.
Plus, under O8i, you can use the AUTHID CURRENT_USER clause on the procedure definition - this means that the proc now runs under the calling user rather than the owner, and in this case the calling user will need the privs.
Confused ? I know I was. :o)
HTH. Norman.
Norman Dunbar EMail: Norman.Dunbar_at_LFS.co.uk Database/Unix administrator Phone: 0113 289 6265 Fax: 0113 289 3146 Lynx Financial Systems Ltd. URL: http://www.Lynx-FS.com
------------------------------------------------------------------------
-----Original Message-----
From: Philip Morrow [mailto:cracker_at_mymorrow.com]
Posted At: Thursday, January 10, 2002 2:25 PM
Posted To: server
Conversation: Procedures
Subject: Procedures
Is it possible to create and drop tables from inside a procedure. If
not is
there another way it can be done through a function, external procedure
etc
if you can't do this from inside a procedure.
Thanks
Phil
Received on Tue Mar 26 2002 - 03:15:19 CST