views:

158

answers:

6

I am not able to connect to Oracle using connection string and the correct password. I've tried the same parameters in SQL developer and sqlplus(commandline) and they are working. I even tried changing the password but no use.

Any ideas what might be wrong or where should I start looking? The exact Oracle error is : invalid username/password password, logon denied and after trying a few times account is getting locked with the account is locked

A: 

When I've run into this, it has ALWAYS been an issue with my connect string.

What is your connect string? It should be something like "User Id=[ID]; Password=[PWD]; Data Source=[DB]"

Of course, you'd replace [ID], [PWD] and [DB] as appropriate.

Brad Bruce
Yes its like this. I've been using this code from the last 2 years. It worked on friday and now it doesn't :(
satyajit
A: 

Is it just your computer that exhibits the problem, or are others seeing it as well?

Can you test your connection in the ODBC Data Source Administrator? Does that work?

DCookie
Just verified, another computer also seeing this problem
satyajit
A: 

Try to install the Oracle Developer Tools for Visual Studio. It's free but you need to register, also free.

FerranB
A: 

TNS file problem perhaps?

justin g
A: 

You need to unlock the account.

(From above referenced site)


SQL> ALTER USER username ACCOUNT LOCK;

SQL> ALTER USER username ACCOUNT UNLOCK;

bobobobo
On accounts locked, the error is "Account locked", not bad password.
FerranB
Account locking isn't related to the user's password - its different. Its like if sysadmin locks your linux account, you just can't sign in, until he unlocks it. Give http://www.orafaq.com/wiki/Oracle_database_Security_FAQ a read.
bobobobo
A: 

Actually the problem was with cache on the computer. Even though I am giving "server='correctdb'" visual studio was taking "server='olddb'" as input and hence I am not able to connect. Pathetic but that's what happened.

satyajit