Search code examples
oracle10goracle-sqldeveloperora-00942ora-01031

01031. 00000 - "insufficient privileges" while granting System Privileges to the new user


I created a new connection in Oracle SQL Developer. Under this new connection, I created a new user. Now, I'm trying to grant roles and System privileges to this new user. I get the following error while trying to grant system privileges to the new user:

enter image description here

The new user has been granted all the roles successfully. However, I'm unable to grant all system privileges to it.

UPDATE:

I followed this and this links to grant sysdba privilege to the new user using the command prompt. I'm able to grant sysdba to this new user. However, when I try to grant all system privileges from the Oracle sql Developer, I get the same error (specified in the screenshot above). I am trying to grant all the system privilege to the new user because I'm getting following error while trying to access the tables of the database.enter image description here

Recently I had to change my OS to Windows 10. Earlier I had Windows 7 and I didn't have any of this issues. Is this issue related to OS? Is there any problem to use Oracle SQL Developer in Windows 10?


Solution

  • Please refer to this blog

    The ORA-01031: "insufficient privileges" error occurs when you attempt to execute a program or function for which you have not been granted the appropriate privileges.

    For the DBA, the ORA-01031 can happen if the target OS executables do not have read and execute permissions (e.g. (770) in UNIX/Linux), and ensure that the oracle user is a member of the dba group (e.g. /etc/group). There are similar permission in the Windows registry.

    Inside Oracle, the "ORA-01031: insufficient privileges" error can be avoided by signing on "as sysdba" with unlimited database privileges.

    The oerr utility notes this on the ORA-01031 error:

    ORA-01031: insufficient privileges

    Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges. When Trusted Oracle is configure in DBMS MAC, this error may occur if the user was granted the necessary privilege at a higher label than the current login.

    Action: Ask the database administrator to perform the operation or grant the required privileges. For Trusted Oracle users getting this error although granted the appropriate privilege at a higher label, ask the database administrator to re-grant the privilege at the appropriate label.