Solved

how to grant  user with the DBA role

Posted on 2009-04-13
3
5,853 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MULTIPLE DATE QUERY 15 91
oracle RMAN - trying to duplicate a database 5 39
Creation date for a PDB 5 39
oracle sqlplus query delimiter 8 23
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

828 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