Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to make a role the default?

Re: How to make a role the default?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/04/19
Message-ID: <353b3ba7.3473494@192.86.155.100>#1/1

A copy of this was sent to Eugene Fan <eugenef_at_tidalwave.net> (if that email address didn't require changing) On Sat, 18 Apr 1998 01:38:35 -0400, you wrote:

>Hello All,
>
>Sorry for this dumb question, but I forgot how to make a granted role
>the default. For example,
>

It is done via the "alter user command". For example:

SQL> select * from dba_role_privs where grantee = USER;

GRANTEE                        GRANTED_ROLE                   ADM DEF
------------------------------ ------------------------------ --- ---
TKYTE                          CONNECT                        NO  NO
TKYTE                          DBA                            NO  YES
TKYTE                          RESOURCE                       NO  NO

SQL> alter user tkyte default role connect;

User altered.

SQL> select * from dba_role_privs where grantee = USER;

GRANTEE                        GRANTED_ROLE                   ADM DEF
------------------------------ ------------------------------ --- ---
TKYTE                          CONNECT                        NO  YES
TKYTE                          DBA                            NO  NO
TKYTE                          RESOURCE                       NO  NO

SQL> alter user tkyte default role connect, resource, dba;

User altered.

SQL> select * from dba_role_privs where grantee = USER;

GRANTEE                        GRANTED_ROLE                   ADM DEF
------------------------------ ------------------------------ --- ---
TKYTE                          CONNECT                        NO  YES
TKYTE                          DBA                            NO  YES
TKYTE                          RESOURCE                       NO  YES


So, the alters are no cumulative but rather you need to specify all of the roles you want to be 'default' for the user in the alter user command...

[snip]
> ^^^
>
>I know this is kinda of RYFM, but somebody walked off with our copy
>of the Server Admin manual and the other books, like the SQL Lanquage
>Reference, weren't very helpful. Thanks in advance for any help.

Now the sql reference will be since you know what command to get the syntax of...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sun Apr 19 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US