|
|
Re: How to Allow a user to create a table in another schema [message #130975 is a reply to message #130621] |
Wed, 03 August 2005 12:05 |
erich65
Messages: 5 Registered: February 2005
|
Junior Member |
|
|
I tried this and it seems to have worked.
I created user USERA with create table privileges.
I put this package in schema USERA:
create or replace package seq
IS
procedure createtable(in_table VARCHAR2);
END;
/
show errors;
create or replace package body seq
IS
procedure createtable(in_table VARCHAR2)
IS
BEGIN
execute immediate in_table;
END;
END;
I created USERB without create table privileges but had USERA grant execute on package seq.
I then called this while logged into userb thru sqlplus:
exec usera.seq.createtable('create table foo (a number)');
and the table was created for usera.
Very Interesting possibilities.
|
|
|
|
|