Home » SQL & PL/SQL » SQL & PL/SQL » Invalid username in sqlplus but can "connect" with same details
Invalid username in sqlplus but can "connect" with same details [message #204421] Mon, 20 November 2006 10:22 Go to next message
car
Messages: 6
Registered: February 2004
Junior Member
Have a username and password for an ops$ account.
tru64 unix. 9i DB.


sqlplus ops$user/password@mydb

I get invalid username/password, however I know the the login details are right so

sqlplus system/password@mydb

conn ops$user/password
-- connected and I can now run selects

-- so I know the username and password works so whats going on there?
-- I can change the password to something very basic and test and get same behaviour. I tried setting the SID in the env, same behaviour.
Re: Invalid username in sqlplus but can "connect" with same details [message #204429 is a reply to message #204421] Mon, 20 November 2006 12:24 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Unix sees the dollar sign as part of a "variable" looking for a value for $USER and appending it to "ops."
You have the either "escape" the dollar sign as ops\$user/password@mydb or I believe you can simply do sqlplus /@mydb
Re: Invalid username in sqlplus but can "connect" with same details [message #204586 is a reply to message #204421] Tue, 21 November 2006 06:03 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The whole idea of ops$ accounts is to not explicitly use a username/password, but log in as / like joy_division pointed out. Often, the password of the ops$ account isn't even known.
Re: Invalid username in sqlplus but can "connect" with same details [message #204594 is a reply to message #204586] Tue, 21 November 2006 06:18 Go to previous message
car
Messages: 6
Registered: February 2004
Junior Member
lads, thanks a million. the escape character did it. was 100% Id managed to login with that before on my server but mustnt have been able to.

As posted above, I can get in with sqlplus using
sqlplus ops\$user/password@mydb

Im not logged in on the OS as the ops user when trying that. must note that one for the future. thanks again.
Previous Topic: DDL in Trigger ?
Next Topic: Update problem (merged)
Goto Forum:
  


Current Time: Sat Dec 03 09:39:09 CST 2016

Total time taken to generate the page: 0.12063 seconds