12c sqlplus / as sysdba ORA-01017: invalid username/password; logon denied

You are trying to connect / as sysdba and get an error like this:

[oracle@vbgeneric dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 3 10:06:58 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR: ORA-01017: invalid username/password; logon denied

The issue is likely it’s a pluggable database you are trying to connect to.
so either put in the password:

sqlplus sys/pw as sysdba

or if you really want to connect to the container / root db
Here is one fix for that – if two task is set:

[oracle@vbgeneric dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 3 10:13:13 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys/oracle as sysdba
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production
[oracle@vbgeneric dbs]$ echo $TWO_TASK
ORCL
[oracle@vbgeneric dbs]$ echo $ORACLE_SID
orcl12c
[oracle@vbgeneric dbs]$ unset TWO_TASK
[oracle@vbgeneric dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 3 10:55:33 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production
SQL>

now you have connected to the container not the plugable
 

Leave a Comment

Scroll to Top