0

why do i get ORA-01031: insufficient privileges ?

SQL> grant create view to rojib;

Error :

grant create view to rojib
*
ERROR at line 1:
ORA-01031: insufficient privileges

1 Answer 1

1

In order to grant the CREATE VIEW privilege, your user needs the CREATE VIEW privilege WITH ADMIN OPTION, or the GRANT ANY PRIVILEGE system privilege. Otherwise you have insufficient privileges.

http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9013.htm#i2094944

To grant a system privilege, one of the following conditions must be met:

  • You must have been granted the GRANT ANY PRIVILEGE system privilege. In this case, if you grant the system privilege to a role, then a user to whom the role has been granted does not have the privilege unless the role is enabled in user's session.

  • You must have been granted the system privilege with the ADMIN OPTION. In this case, if you grant the system privilege to a role, then a user to whom the role has been granted has the privilege regardless whether the role is enabled in the user's session.

1
  • Or the user must have the DBA role (which has amongst others the GRANT ANY PRIVILEGE role).
    – Marco
    Commented Aug 30, 2015 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.