Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Rachel.

Asked: November 13, 2016 - 5:04 am UTC

Last updated: November 14, 2016 - 3:38 am UTC

Version: oracle 11g

Viewed 1000+ times

You Asked

I am trying to create a role, but every time i type it in on sql plus, i get an error saying insufficient privileges. I was wondering what am i doing wrong. I have tried typing in CREATE ROLE PURCH_ROLE_1; and CREATE ROLE PURCH_ROLE_1 IDENTIFIED BY crimson; and i am still getting insufficient privileges. Can you help me and let me know what i am doing wrong? thanks.

and Connor said...

You need to have the "CREATE ROLE" privilege given to *you*.

Example

SQL> conn scott/tiger
Connected.

SQL> create role MY_ROLE;
create role MY_ROLE
*
ERROR at line 1:
ORA-01031: insufficient privileges


SQL> conn / as sysdba
Connected.

SQL> grant create role to scott;

Grant succeeded.

SQL> conn scott/tiger
Connected.

scott@np12
SQL> create role MY_ROLE;

Role created.




Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, November 14, 2016 - 3:56 am UTC

Thank you!!