0

Right now I've just installed Oracle on Windows, so far I've successfully logged in with sys and system users via sqlplus and the enterprise manager GUI and created a new user. Now, I'm able to log in with this new user through the enterprise manger web interface but when I try to log in with sqlplus or with sqldeveloepr I get the error "ERROR: ORA-01017: invalid username/password; logon denied".

I've re-entered the password several times making sure not to make mistakes but yet again, I can't login. I can only connect with this user via enterprise manager web gui.

Any ideas why this would happen? :(

Here is the user logged into web EM

Error in sqldeveloper. I get the same error in sqlplus console, what I find strange is that if I use either system or sys user, it does connect successfully. So is my newly created user missing a role or privilege?

In the case of sqldeveloper I've tried both "localhost" and "127.0.0.1" as host and I'm getting the same result.

stigma
  • 338
  • 2
  • 12
  • What is your database version up to 4 decimal places? – Lalit Kumar B Nov 05 '15 at 05:28
  • Is it possible, that you forgot to commit the changes? Therefore you can see the user only in the open session. Another idea - what priviliges has this new user? grant connect, create session, imp_full_database to ; could solve the problem. – mcane Nov 05 '15 at 12:37
  • @mcane I've logged out and log back in with the new user through the web gui and it works fine, it's just with sqlplus and sqldeveloper that I'm having isssues :( I'll try granting connect and create session once I get home, I'm at work right now :) Thank you. – stigma Nov 05 '15 at 15:27
  • Which version of Oracle are you using? I would suspect password case sensitivity rules as a starting point. For the password, did you try to use all in UPPER CASE as a troubleshooting manner? – rorfun Nov 05 '15 at 05:29
  • I'm using Oracle 12c, as for the password since I'm using it for local tests/development I used all lowercase password without numeric or special characters. Don't know if this may have something to do with the error though :( – stigma Nov 05 '15 at 15:01

2 Answers2

0

Maybe you don't have enough privileges. Try this:

grant connect, create session to <user>;
mcane
  • 1,696
  • 1
  • 15
  • 25
0

Well.. it seems that it's working now, at least with sqldeveloper. Apparently I needed to use the Service Name and not the SID when trying to connect, at least that's what I tried based on the answer by "thatjeffsmith" here: ora-12505 error while connecting via SQL Developer

I suppose that granting connect and create session also helped.

Also on the service name I typed the container name? for the pluggable database which in my case is "poraclepredb" the container being "oraclepredb". Now I'm able to connect with sqldeveloper. Still not sure on how connect with sqlplus though, since I can't "tell" which SID/Service it's using. Any ideas on that?

UPDATE: I was finally able to log in with sqlplus using the syntax:

sqlplus <user>/<password>@<host>:<port>/<database>

in my case for "database" i typed the name of my pluggable database.

The same can be done when sqlplus asks for the username, typing:

<user>/<password>@<host>:<port>/<database>

the downside on this is that the password is visible whenever I log in.

Community
  • 1
  • 1
stigma
  • 338
  • 2
  • 12
  • In linux: ORACLE_SID= export ORACLE_SID echo $ORACLE_SID – mcane Nov 06 '15 at 09:40
  • Above are three commands. Similar should be for SERVICE_NAME. If you think that grant privileges helped, you can an up-vote the answer. – mcane Nov 06 '15 at 09:47