GRANT ALL on a schema [message #182091] |
Wed, 12 July 2006 23:51 |
gkrishn
Messages: 506 Registered: December 2005 Location: Putty a dark screen
|
Senior Member |
|
|
Hi,
I have a schema PRODOBJ holding many objects(all types). now i want to grant all permission on all objects to another user called 'appuser'.
Any idea,how to?
|
|
|
|
Re: GRANT ALL on a schema [message #183613 is a reply to message #182091] |
Fri, 21 July 2006 09:55 |
nmacdannald
Messages: 460 Registered: July 2005 Location: Stockton, California - US...
|
Senior Member |
|
|
littlefoot is correct. Spooling/editing/running it the way to go.
You can try a system grant as PROBOBJ or maybe sys (grant select any table to appuser;)
I usually create a public synonym and grant object privs for the synonym to a user or role.
in sqlplus as PROBOBJ;
spool synonym.txt
set pagesize 0
set linesize 100
select 'create public synonym ' || table_name || ' for PROBOBJ.' || table_name || ' to appuser;' where owner = 'PROBOBJ' order by table_name;
exit sqlplus
edit synonym.txt
run synonym.txt
Then
spool grant.txt
set pagesize 0
set linesize 100
select 'grant <object priv> on PROBOBJ.' || table_name || ' to appuser;" from dba_tables where owner = 'PROBOBJ' order by table_name;
exit sqlplus
edit grant.txt
run grant.txt in sqlplus
|
|
|