DBA ROLES
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: DBA ROLES

  1. #1
    Join Date
    Nov 2000
    Posts
    34

    Wink

    Hi,
    Can any body please help me what is the DEFAULT_ROLE does in DBA_ROLE_PRIVS.

    IF it set to YES means what?
    IF it set to NO means what?

    Thanks in advance,


  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    If YES, it means that this role is granted to user as a default role.
    If NO, it means that this role is granted to user, but not as a default role.


    I guess the above explanation does not help much, does it? So the right question would be, what is a default role and what is nondefault role.

    A default reole is a role that is enabled automaticaly after you log in. On the other hand, a non-default role is a role that has been granted to you, but will not be enabled automaticaly when you log in. If you want to activate it, you have to use SQL command "SET ROLE ....".
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Nov 2000
    Posts
    440
    Why then i create a new user, i grant a role to that user and he has that role as default. And another user that have only that role the default_role is set to NO.

    user a:
    has 1 role with default_role = yes

    userb:
    has the same role with default_role = no

    i revoke the role and regrant it and the default_role
    is still to no.

    I want it to be YES, cuse the user b cant see certain object because of that.

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    GRANT the_role TO userB;

    Then isue:
    Code:
    ALTER userB DEFAULT ROLE ALL;
    -- All granted roles will be his default roles
    or
    Code:
    ALTER userB DEFAULT ROLE the_role;
    -- Only THE_ROLE will be his default role, all other roles will be non-default roles
    or
    Code:
    ALTER userB DEFAULT ROLE the_role, another_role, ....;
    -- Only the listed will be his default roles, all other roles will be non-default roles
    or
    Code:
    ALTER userB DEFAULT ROLE ALL EXCEPT another_role;
    --All roles except ANOTHER_ROLE will be his default roles; 
    --ANOTHER_ROLE will be his non-default role
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width