want to create a role

Posted on 2011-10-10
Last Modified: 2012-06-27
Hi guys,
I want to create a role and want to grant this role to some of the users.Whats the right path to achieve this.
Which clause should I use identified by or not identified.
Question by:nirvairghuman
    LVL 73

    Accepted Solution

    if the role itself needs a password then use identified  (this isn't common)

    create role YOUR_ROLE;

    grant YOUR_ROLE to YOUR_USER;

    grant select on YOUR_TABLE to YOUR_ROLE;
    LVL 73

    Assisted Solution

    you would use the identified by clause if the role shouldn't be enabled by default and users that wanted to enable it would be required to enter the password to do so
    LVL 23

    Assisted Solution

    - use identified if you want a password protected role. i would suggest that you go thru the CREATE ROLE documentation:

    - steps to create a role:
    SQL> CREATE ROLE select_table_role;
    SQL> GRANT SELECT ON table1, table2 TO select_table_role;
    SQL> GRANT select_table_role TO user;
    LVL 23

    Expert Comment

    - the steps i provide is almost the same as sdstuber. as additional you should go thru the link i provided for more option on create role.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Oracle date format issue 36 80
    Oracle Standby Databases 3 40
    surrogate key in database world 6 60
    Extract only part of data 5 75
    Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    Via a live example, show how to take different types of Oracle backups using RMAN.
    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

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now