Can I set a default role to that point of connection?

Hi all;

I have a doubt of roles.  After three roles assigned to the test user.

SQL > select dealer, granted_role dba_role_privs default_role where dealer = 'TEST ';

DEALER DEFAULT_ROLE

--------------- ------------------------------

TEST R1

TEST R3

TEST ORCL_DEV

SQL > alter user test by default role orcl_dev;

Modified user.

SYS > select dealer, granted_role dba_role_privs default_role where dealer = 'TEST ';

DEALER DEFAULT_ROLE

--------------- ------------------------------

TEST R1

TEST R3

TEST ORCL_DEV

$ sqlplus test/test

TEST > select * from session_roles;

no selected line

TEST > set orcl_dev role identified by oradev;

Role play.

When I connect you as "USER of TEST" stated I must perform the role play .

so, what's the point to set the default role for users?

Without executing set instruction role, can I get a default role to that point of connection?

'

Thank you.

Hello

default role assigned to the users are by default roles. This means that roles does not need to be explicitly enabled with set role.

If you set a role as a default to a user role, it must be explicitly enabled.

that is to say:

SQL > create user identified by test test

Created by the user.

SQL > grant create session to test

Total grant.

SQL > create role r1

Created role.

SQL > create role r2

Created role.

SQL > create orcl_dev role

Created role.

SQL > grant r1 to test

Total grant.

SQL > grant r2 to test

Total grant.

SQL > grant orcl_dev to test

Total grant.

SQL > alter user default test except orcl_dev's role

Modified user.

SQL > select the dealer, granted_role, dba_role_privs default_role where dealer = 'TEST '.

DEFAULT_ROLE GRANTED_ROLE ASSIGNEE

------------------------------ ------------------------------ ------------

TEST                           R1                             YES

TEST                           R2                             YES

TEST                           ORCL_DEV                       NO

3 selected lines.

sqlplus test/test

SQL * more: Production version 11.2.0.1.0 Mon May 18 10:03:15 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:

Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

With partitioning, OLAP, Data Mining and Real Application Testing options

SQL > select * from session_roles;

ROLE

------------------------------

R1

R2

SQL > role play all;

Role play.

SQL > select * from session_roles;

ROLE

------------------------------

R1

R2

ORCL_DEV

For more information you can take a look at the Oracle documentation on roles:

http://docs.Oracle.com/CD/E25054_01/network.1111/e16543/authorization.htm

Kind regards.

Alberto

Tags: Database

Similar Questions

  • Default folders: How can I change my default settings so that Windows Explorer, downloads, etc., all open to the folder I chose instead of "libraries.

    How can I change my default settings so that Windows Explorer, downloads, etc., all open to the folder I chose instead of "libraries.

    Here is an article on how to change this folder opens when you click on an icon in Windows Explorer:http://www.watchingthenet.com/how-to-change-windows-explorer-icon-to-open-a-diffierent-folder-in-windows-xp-and-vista.html.  I think this will do the trick. Otherwise, maybe the following can help (but I think that's the answer you're looking for).

    Here's how to change the default template for a folder:http://www.vistax64.com/tutorials/70819-windows-explorer-folder-view-settings.html.  Default behavior is to select the model based on the first type of file placed in the folder (you must choose something).  Vista sets thefolder type template according to what are the types of files in the window and the settings display window Explorer. This will show you how to resetthe Windows Explorer folder view settings, disable Automatic folder Type discovery and increase theview of the folder cache to have Vista don't forget display settings, model of file type, size, or position of a specific window for when it was still closed to the location of specific path.  Keep in mind that it works, just a generic and holistic - it will not work for individual folders by folder.  That cannot be done in Vista.  But you can create shortcuts to the folders that you want and add to the desktop or right-click

    It does not work with the Sub record under, Open with,open in a new tab (Internet Explorer), etc... dialog windows of type through the goodFile menu bar item. These don't seem to be able to have their size or their position to recall. For the latter, you can use the free programhttp://autosizer.en.softonic.com/to resize them.

    Here is another article on how to modify the columns in Windows Explorer and sort in Vista:http://www.vistax64.com/tutorials/108665-column-customize.html.  This will show you how Add, Remove, move, change the widthand change the sort order of the columns in Windows Explorer in the way that you want.

    Here is another article on how to change the display of the default folders in Vista (but she argues, it is not a perfect solution and can revert to the previous behavior is not as good as the two prior links provided:http://news.cnet.com/8301-13880_3-10019957-68.html.)

    I hope this helps in your situation.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can I set my default printer?

    my printer has worked fine since I installed it initially. Now today, it seems not to be the default printer. But I can't work on how to change default

    Original title: How can I set my default printer, I have office 2010, it was OK, but for some reason, it is by default.

    Hi MinnieTraynor,

    Thanks for posting in the Microsoft Community. It seems that you have a problem with setting the default printer on Windows 7. This can be very frustrating for you, and I appreciate the efforts you have put in. Let us work together as a team to get this number fixed.

    We start with a few questions-

    (1) what is the brand and model of the printer?

    (2) have you made changes on the computer?

    I would like more information about the issue.

    Method-

    I would have you look at the article-

    Change your default printer

    http://Windows.Microsoft.com/is-is/Windows7/change-your-default-printer

    In addition, I would have to see the article-

    Solve printer problems

    http://Windows.Microsoft.com/en-in/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    We know if you need help. We will be happy to help you.

    Thank you.

  • How can I set the default value of a selection in the Query Panel with table.

    Hi Experts,

    JDev 12.1.3.0.0

    I have a view Criteria (contains a attribute with LOV). and the named criteria is dragged as a query with Table Panel.

    In the user interface, the LOV is now visible in the query Panel. Suppose that the LOV has 3 values: 'Manual', 'Other' and 'portfolio '.

    How can I set a default value for the choice of a select. ?

    Thank you

    Roy

    refer to:

    Andrejus Baranovskis Blog: Dynamic value by default for the field in query ADF search

    but rather to express as in the bellows of the image, choose literal and let 2

  • How can I set the default download locations

    How can I set the default download locations?

    You can watch here:

    • Tools > Options > general: downloads
  • How can I set the default font size and type for the outgoing Hotmail mail?

    How can I set the default font size and type for the outgoing Hotmail mail?

    Hi Dale,

    What is the email client do you use?

    Outlook can be configured per - start Outlook-> Tools-> Options-> mail-> fixed Format and fonts... Select the font and size you need... Click ok on all screens.

    I hope this helps.

  • How can I set the default folders to the drive working?

    Hellooo...

    I was just wondering how can I set a default folder (work disk) location in Premiere Pro CC 2014?

    example image:

    Scratch-disks-in-premiere-Pro-cc.png

    So it should automatically record audio previews and video to one of my disks SSD and not on the same hard disk where my project.

    It's pretty boring change the location of the current 'default' whenever I start a new project...

    I can't find the menu for these parameters?

    Thanks for any help in advance!

    Create a template project with your desired settings.  Use it to start new projects and rename and save.

  • How can I set the default resolution of the tabs, Favorites, etc...?

    Hello world
    I'm having a problem with my browser. About 5 days ago, I installed my graphics (nvidia geforce gtx 670) was last updated. Immediately after the update changed the look of my browser!
    The problem is obvious with the Favorites bar and the tab bar.
    This is the difference:
    Before: http://imageshack.us/a/img153/4573/g35.png
    After: http://imageshack.us/a/img62/7908/nbir.png
    Please help me!
    Here, there is some other information... I use a new installation of the latest version of the browser. New profile, no theme, no addon.
    It seems that this menu are in the correct resolution.
    Change in topic layout.css.devPixelsPerPx:-1 to 1.22 config makes things better. But I want the old default resolution.
    I have average - 125% for the resolution in the options panel.
    Does turning off hardware acceleration.
    Thank you much for the help!

    Hello

    Firefox on Windows is now after display, scaling options that can make the biggest text on screens at high resolution.
    You can adjust the resolution of your screen.
    To change it follow these steps:

    • Type of topic: config in the Firefox address bar and hit the Enter key.
    • If the warning that this might void your warranty , click I'll be careful, I promised.
    • Search for layout.css.devPixelsPerPx

    • Double-click layout.css.devPixelsPerPx to edit its value. The default value is - 1.0 in Firefox 22 and above. Change it to 1.0 to run as in previous versions of Firefox.

    If necessary, further adjust the value of 0.1 or 0.05. Values between 1.0 and around 0.5 to reduce the size of the elements. Use a value greater than 1.0 to increase the size. For example, a value of 1.25 will increase the font size of the 125% to account for the default DPI setting in Windows 8. Check the value that you enter. Definition of a value that is too small will take everything away and too high will explode things.

    If the web pages should always be adjusted so you can watch the extension Default FullZoom Level or NoSquint .

    To adjust the font size for the user interface, you can use the extension of theme font & size changer .

    This solve your problems? Please report to us!

    Thank you.

  • How can I set a default zoom for the browser (freeze)?

    Hello, there is a possibility of using the CTRL ++ to enlarge the Web page, but he returned to the default zoom of Firefox in the middle which is very annoying. In general, I would like to be able to establish a certain level of default zoom and then only if necessary, use the CTRL + / zoom in and out of options. If my optimum zoom level is used for all my browsing unless I change it.

    I listed 2 modules below for you to consider. I did not use of NoSquint, but I use and rely on Default FullZoom Level.

    "You can also set a 'Minimum font size' in the Firefox Options > content > fonts & colours advanced."

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • How can I set a default save file for scans using the Solution Center?

    Using Windows 7-64 bit.   All-in-one printer HP Photosmart C-309 Premuim has.

    Due to a crash of Windows, I had to install a new drive and reload Windows. I also rebooted other software like the HP Solution Center & drivers. My problem is that I can't find how to set a default folder for my scans.  This is NOT mentioned in the user manual, but it has been initially implemented by the HP Technical Support when the printer was new.  Can anyone relate how to set the default folders for my scans?

    Thank you.

    Tango

    When you go to the analysis, there should be a window that appears to select the format and the DPI of the analysis. There is also an option for the options of '/CSA/ '. Here you can change the default location to save on selecting another file of having sent them to analysis.

    I would like to know if this information helps, and have a great day!

  • How can I set a default font?

    I can not set the font I want to use my default pages

    Michigan 1958

    There are a few tips to: police by default in the Pages, and How to change the default font on the Pages?

    Read also: http://macintoshhowto.com/software/how-to-change-the-default-font-style-in-pages .html

  • Signed using a certificate until created, I can't set the default method signature.

    Hello

    I used to sign documents using a certificate created in Adobe.

    Now, we have the DC Standard from Adobe and I can add my certificate, I can create the appearance of the signature, but I can't set default method signature.

    For this reason, when I try to sing the document, I can only write my name or so now instead of placing the signature as before.

    How do I continue to sign with a certificate as before?

    Thank you

    Look at the tools > Certificates > digitally sign

  • How can I set a default page point?

    Hello world.

    I am facing a problem by setting the default value to a page element in the apex 4.2.

    I want the default value to a page (P3_EMP_NAME) element using the PL/SQL function body.

    When I use the following code, I have faced no problem:

    The :

    DECLARE default_name varchar2 (50);

    BEGIN

    Select FULLNAME in default_name USER_REPOSITORY where USERNAME = 'peterw. "

    RETURN default_name;

    END;

    Body of the PL/SQL function

    But when I use the following code I have faced a problem :

    The :

    DECLARE default_name varchar2 (50);
    BEGIN
    Select FULLNAME IN default_name from USER_REPOSITORY where username =: APP_USER;
    RETURN default_name;
    END;

    Error: Computer error point default value of the page P3_EMP_NAME.

    ORA-01403: no data found

    Please help me someone.

    How can I solve this problem? Please help me someone.

    The query did not find any records, then the user name does not match: APP_USER

    So, what is the value of: APP_USER?

    Maybe you need to use

    user name = LOWER(:APP_USER)

  • Can't set the default printer, error message: 0 X 00000709

    Original title: default printer

    Cannot set any printer as your default... bought new printers, same error message: 0 X 00000709 is displayed.

    Printers, print documents word, Notepad, but not excel or adobe PDF docs...   Need help!

    Hello

    I suggest you to check if you have another account user or an administrative account.

    I also suggest to create a new user account and check if you are able to set the default printer.

    Create a user account

    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    See also:

    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    See also:

    Resolve PDF printing problems. Acrobat, Reader

    http://helpx.Adobe.com/Acrobat/KB/troubleshoot-PDF-printing-Acrobat-Reader.html

  • How can I set my default printer instead of always default to a single Note?

    you want to set my default printer.    When I click on the printer, set it as the default came not even as an option.

    Try it from the desktop.

    1. Click the Start button, choose Control Panel
    2. Go to hardware and sound, then devices and printers
    3. Right click on the printer and choose "Set as default"

Maybe you are looking for