Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user privileges 1

Status
Not open for further replies.

Ravala

Programmer
Jan 28, 2004
88
US
I need to create a new user (newUser)and give him all privilege which have another user, let's say, oldUser.
For ex. oldUser is an owner tables T1,T2,T3; oldUser have priviledges on select tables oe.T5,inv.T6.
I want that newUser would have select privileges on all these tables. Can I do it in one statement?

Thanks.
 
No - only the schema owner can grant access to those tables, so you will have to do one statement for each table that you need access to (as well as change schema owners)

Alex
 
Actually, for completeness, I'll mention that a non-owner can grant access to those tables if someone else with administrative privileges on those tables grants privileges to the non-owner "WITH GRANT OPTION" for example, If I am connected as "DHUNT" and have full, administrative privileges myself on "USER_A's" tables, then I can grant those privileges to "USER_B":
Code:
GRANT SELECT, INSERT, UPDATE, DELETE on user_a.tab_1 TO USER_B WITH GRANT OPTION;
So, not only can the DHUNT user grant access of USER_A's objects to USER_B, but DHUNT can pss along full administration privileges to USER_B to further GRANT SELECT, INSERT, UPDATE, and DELETE privileges on USER_A's tab_1 to whomever s/he wishes (since s/he received her/his privileges "WITH GRANT OPTION").

Questions?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 16:06 (30Sep04) UTC (aka "GMT" and "Zulu"), 09:06 (30Sep04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top