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

Home -> Community -> Usenet -> c.d.o.misc -> Re: create any table in schema

Re: create any table in schema

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 18 Apr 2002 17:41:16 +0100
Message-ID: <1019148032.14139.1.nnrp-14.9e984b29@news.demon.co.uk>

Depends how much infrastructure you want to build. You could create a procedure owned by the schema where the table is to be created, executable by the schema which is to create the table. The code should simply accept a 'create table' statement and execute it dynamically. Since the (by default) procedures execute in the context of the procedure owner, this would create the table in the same schema as the procedure.

It's not particularly good practice though to have production systems creating (and dropping) objects on the fly, if that's what you were thinking of using this for.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Author of:
Practical Oracle 8i: Building Efficient Databases

Next Seminar - Australia - July/August
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html



Matthew Hallam wrote in message ...

>Is there a halfway house between "grant create table" and "grant
>create any table" whereby you can allow a user to create a table only
>in a certain specified other schema (ie i want them to create a table
>in another users' schema but dont want them to be able to create
>tables in absolutely every schema!)
>
>TIA
>Matt
Received on Thu Apr 18 2002 - 11:41:16 CDT

Original text of this message

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