Solved

how to grant  user with the DBA role

Posted on 2009-04-13
3
5,868 Views
Last Modified: 2013-12-18
Hi,

How can I check all the existing privileges of a curresnt user/schema. How can I grant the user with DBA role. And also how can I revoke the DBA role to the user in future if I do not want it. Any sample code, links, resourcces highly appreciatged. Thanks in advance.
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Assisted Solution

by:Ivo Stoykov
Ivo Stoykov earned 150 total points
ID: 24135230
Hi
Oracle privileges could be System privileges and Object privileges. User following dics about privilege information in Oracle :

DBA_SYS_PRIVS : The System Previleges.

DBA_TAB_PRIVS : The Table Privileges.

DBA_ROLE_PRIVS : Roles consist of a set of privileges which can be assigned to users instead of granting privileges one by one.

DBA_COL_PRIVS : The Table Column Privileges.


HTH
Ivo Stoykov
0
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 350 total points
ID: 24135659
also if you want to grant some role/privilege to some other user, then you can use as shown below :

grant DBA to scott;   -- DBA is the role name here which we are granting to user scott,
                                 -- so you can substitute any role name which exists in the
                                 -- database in the place of DBA in this statement.

grant select any table to user1 ; -- 'select any table' is a privilege which we are granting to
                                                    -- user user1

if you want to revoke some privileges, then the syntax will be as shown below :

revoke DBA from scott;
revoke select any table from user1;

also if you want to enable the user scott to grant the DBA role which he was granted to other users then the statement should be in the below format :

grant DBA to scott with admin option; -- with admin option clause says that scott can grant
                                                            -- the DBA role to other users. This clause can be used along
                                                            -- when granting a system privilege or a role to a users.

if scott user runs the below command ( assuming he has an emp table ) in this schema :
grant delete on emp to user1 with grant option; -- with grant option enables user1 to
                                                                            -- grant delete object privilege on this emp table
                                                                            -- to some other users.

For more and complete information, browse thru :

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#BABEFFEE
0
 
LVL 7

Author Closing Comment

by:gudii9
ID: 31569759
Thank you
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question