ORA-01031: insufficientprivileges, ORA-01925: maximumof30enabledrolesexce
ORA-01031: insufficient privileges, ORA-01925: maximum of 30 enabled roles exce
Ora-01031: insufficient privileges
1. sqlplus "/as sysdba" unable to connect, report ora-01031: insufficient privileges Solution
Select instance_name from v $ instance; # view the Oracle instance name
SQL> select instance_name from v $ instance;
INSTANCE_NAME
--------------------------------
Orcl
(1) Check whether sqlnet. ora (in the % ORACLE_HOME % NETWORKADMIN directory in WINDOWS) contains this sentence: SQLNET. AUTHENTICATION_SERVICES = (ETS). If not, add
(2) check whether the login user is included in the ORA_DBA group,
Windows is (administrator or the user used when installing oracle). This problem may occur when the domain user does not connect to the domain server;
Root or oracle Installation authorization account on linux and unix
SQL> select * from v $ pwfile_users;
USERNAME SYSDBA SYSOPER
-------------------------------------------------------------------------------
SYS TRUE
If the returned result is null, SYS has no dba permission.
SQL> grant sysdba to sys;
Grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
This time, the password file should be rebuilt or modified. For details, see step (4 ).
V $ PWFILE_USERS
This view lists the users granted SYSDBA and SYSOPER permissions exported from the password file.
Column data type description
USERNAME
VARCHAR2 (30)
Username included in the password file
SYSDBA
VARCHAR2 (5)
If the value of this column is true, the user can use the SYSDBA permission for connection.
SYSOPER
VARCHAR2 (5)
If the value of this column is true, the user can use the SYSOPER permission to connect.
(3) ensure that the remote_login_passwordfile parameter = EXCLUSIVE
SQL> show parameter password
NAME TYPE
----------------------------------------------------------
VALUE
------------------------------
Remote_login_passwordfile string
EXCLUSIVE
# --------- If not run
SQL> alter system set remote_login_passwordfile = EXCLUSIVE scope = spfile;
#/*-------------------------
REMOTE_LOGIN_PASSWORDFILE =
{NONE | SHARED}
REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file.
Values:
•
NONE
Oracle ignores any password file. Therefore, privileged users must be authenticated by the operating system.
•
SHARED
One or more databases can use the password file. The password file can contain in SYS as well as non-SYS users.
Note:
The value EXCLUSIVE is supported for backward compatibility. It now has the same behavior as the value SHARED.
#-----------------------*/
(4) check whether the password file needs to be generated using orapassw
For example, if the machine is a windows system:
Orapwd file = "D:/oracle/product/10g/db_1/database/PWDoratest. ora" password = gp
Oswong entries = 10
SQL> select * from v $ pwfile_users;
USERNAME SYSDB SYSOP
----------------------------------------
SYS TRUE
SYS is displayed as normal and can be used normally if you log on remotely with SYSDBA.