Keerthi Nandigam
Keerthi Nandigam

Reputation: 69

Insufficient privileges error in Oracle 10g

I am new to using Oracle database. I worked on it for some weeks. It worked well. But now, I'm having some problem. I am getting this error while trying to connect. I didn't change the password. I am using the default user name and password only.

SQL> connect as sysdba
Enter user-name: SCOTT
Enter password:
ERROR:
ORA-01031: insufficient privileges

Can someone tell the solution for this?

Upvotes: 0

Views: 817

Answers (2)

Littlefoot
Littlefoot

Reputation: 143073

That's because SCOTT isn't granted a SYSDBA role. Have a look at his demonstration.

This is what you have now:

SQL> connect as sysdba
Enter user-name: scott
Enter password:
ERROR:
ORA-01031: insufficient privileges


Warning: You are no longer connected to ORACLE.
SQL>

Connect as a privileged user (SYS) and grant SYSDBA to SCOTT:

SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected.
SQL>
SQL> grant sysdba to scott;

Grant succeeded.

SQL>

OK; now, back to the initial attempt:

SQL> connect as sysdba
Enter user-name: scott
Enter password:
Connected.
SQL>

Not everyone has SYSDBA privileges, and not everyone should have them. Handle with care, it is a powerful privilege so I'll revoke it from SCOTT:

SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected.
SQL> revoke sysdba from scott;

Revoke succeeded.

SQL>

Upvotes: 1

sandesh dahake
sandesh dahake

Reputation: 1026

Please share more information like OS etc

But have you checked user you are using to connect is part of ORA_DBA group assuming you are on windows

Upvotes: 0

Related Questions