Jumat, 06 Mei 2016

TOAD ORA-01031: insufficient privileges when connecting to Oracle 12c

An issue  faced is that when we try to connect from TOAD (version: 11.6 ) to a newly upgraded Oracle database 12c we faced the error:
ORA-01031: insufficient privileges
TOAD Error Message ORA-01031
The reason we are facing this problem, is the newly security implementation by Oracle in 12c for the system privilege SELECT ANY DICTIONARY. They have stripped this system privilege from accessing the following tables:USER$, ENC$,DEFAULT_PWD$, LINK$, USER_HISTORY$, CDB_LOCAL_ADMINAUTH$, XS$VERIFIERS
The current TOAD version checks the old (SELECT ANY DICTIONARY) which already has this table SYS.USER$ part of its permissionwhen it can’t access this table, it throws the error message:  ORA-01031
The reason in 12c they stripped those tables from “SELECT ANY DICTIONARY” is to protect the passwords in case this privilege is granted to non-DBA account , so the hashed passwords are not exposed (ONLY SYS account can query those tables).
So, to let the current version of TOAD works for 12c execute the following sql query:
SQL> grant select on sys.user$ to database_account;
Hope This Helps😉