简体   繁体   中英

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:

在此处输入图像描述

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. 在此处输入图像描述

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?

You should be connected as SYS or SYSTEM in order to grant SYSDBA. Are you?

For example:

connect sys/pwd@db as sysdba
grant sysdba to santobedi;

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 (eg (770) in UNIX/Linux), and ensure that the oracle user is a member of the dba group (eg /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.

Connect as sysdba

bash-4.2$ $ORACLE_HOME/bin/sqlplus / as sysdba

show user will show user as 'SYS' show con_name will display CDB$ROOT

SQL> alter session set container=PDB19;

Session altered.

SQL> grant sysdba to ggadmin;

Grant succeeded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM