Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Severity: 14, State: 8 error... Need help

Author  Topic 

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-09 : 03:20:10
Hello guys,

Error: 18456, Severity: 14, State: 8.
Login failed for user 'sa'. [CLIENT: <ip address>]

With what Ive searched.. State: 8 is wrong password. What Ive
encountered I believed is not State: 8 I guess... I have 2 pc..
PCX and PCY.. PCY has SQL Server 2005 so does PCX.. when I run my application that stores data to PCY DB it prompts me an error just
like the one above.. but what seems to be confusing me is both of them have the same DB password. Did I miss something... please help..


-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-09 : 04:41:02
Never use SA account for login with aopplications!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-09 : 04:49:04
What could be the appropriate thing to do when using SA? Is it too powerful for an application?

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-09 : 04:58:21
Yes. The use have access to everything!
Including dropping tables and the entire database.
Most often, create an account for end-users with datareader and datawriter rights, and execute permission to the stored procedures needed.

Read about SQL injection. This is a security risk!

Regarding your original question, both sql servers can have same password for SA account, so the error is not that.
Which application is throwing the error?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 00:43:50
actually PCY is the server where the DB resides. PCX is where the application that is configured to connect to the DB in PCY. when accessing PCY DB thru PCX SQL Mgt Studio, its fine. But, when the application is the one that is trying to connect, it fails..

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 00:52:26
Change the password for the SA account in application on PCX.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 00:55:06
hard to explain but application in PCX automatically
run, doesn't have a login or something.. connection is configured
thru the server PCY. all connections and codes are in there...
the application in PCX, all it can do is... open the DB..
store the data.. and thats it..

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 01:21:15
Of course it has a login!
Where do you think the error come from? Magic? Some divine intervention?

Or do you think application on PCX randomly connects to a server of it's own choice?



Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 01:25:27
as ive said... it is configured in PCY.
simply means the application is PCX is a client,
once you open it.. it concurrently run..

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 01:32:34
www.connectionstrings.com


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 01:45:21
OK... the login password is change... but still
Ive got the same prob...

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 01:45:44
Or you will have to change the SA password on the machine PCY to match the password what the application on PCX wants it to be.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 01:47:31
Ive already change the password... both PCX and PCY sa account have the same password... but still coudn't got out of this mess...

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 01:50:01
It seems (as I have told you numerous times) that the password for SA account used in the application installed on PCX is hard-coded with some other password (most obvious a blank password since you have no idea what is going on).

If that is the case, the password for the account on PCX must be changed to same password as the application uses!
What is so hard to understand about that?

Also, how does the application installed on PCX know which server to connect to? Is that hard-coded too?
Or is there a setting in the registry for this? It that is the case, I think there is a setting for the password to (I cross my fingers that the password is encrypted).


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 01:56:09
Yeah your right.... it is in the registry... its encrypted...
I do as what you said.. I changed the sa password for the application in PCX... so now the sa password of the application in PCX is the same as the sa password in PCY..

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2007-01-10 : 02:21:24
Real programmer dont use VB either



Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 03:27:10
And now the passwords for SA account on both PCX and PCY is what the application wants it to be?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 04:49:30
quote:
Originally posted by Merkin

Real programmer dont use VB either



Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson



Its a matter of choice....non-sense...!
I only use that for my signature...

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

iceblizzard
Starting Member

17 Posts

Posted - 2007-01-10 : 04:51:44
quote:
Originally posted by Peso

And now the passwords for SA account on both PCX and PCY is what the application wants it to be?


Peter Larsson
Helsingborg, Sweden



geez.... I hope so.. I will try it, after my other task.. Thanks..!

-------------------
Real Programmer dont document

If its hard to write Then
its easy to undertand.
End If
Go to Top of Page

cas_o
Posting Yak Master

154 Posts

Posted - 2007-07-12 : 09:48:53
I seem to recall if Sql Server is in mixed mode, The windows user running the app on PCX must exist and have rights on PCY also, to be able to connect and use Sql Server. This authorisation takes place *before* sql server authentication. But you get the login failed message, instead of an Access Denied message which would be more intuitive.

;-]... Quack Waddle
Go to Top of Page
   

- Advertisement -