Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 18456

Status
Not open for further replies.

TazzMann

Programmer
Jul 25, 2001
79
US
Hello, I have searched the past threads and can't find anything like this particular problem:

We have two database servers that are identical, the sysaccount account has a password and permissions are the same on both servers. When I log into each server, lets call them A and B, with Query Analyzer, they login just fine and can display tables, etc. Now when I connect to A with VB.NET, it works just fine. But when I connect to B with VB.NET, it gives me this error:

Connection Failed:
SQLState: '42000'
SQL Server Error: 18456
Login Failed for user 'sysaccount'


All of our existing applications in can use this account without a hitch. All the datbase and server settings seem to be identical. It just seems to be happening with .NET and Perl. Any ideas?

Thanks

Tazzmann
 
Possibilities:

1. something in the .net code is incorrect for making the connection to B.

2. there could be something blocking the application from accessing B. Check for a firewall.

3. Could be permissions. Is there an application role on A that's not on B?

I think it's most likely #1, some typo in the connection string for accessing server B.

By the way....it's poor security to allow your applications to be using the sysaccount.

-SQLBill
 
Nah, the connection string is looking good, I have triple checked everything. They are virtually identical boxes, same make, model, operating systems, etc...

All the security settings are identical on both boxes, all the same roles. I am at a loss.

And yes I know it is not good security to do that, but it is not my decision or choice. I just started working for this company and they have a LOT of things that are just mind boggling, but not much I can do about them....yet.

Any other ideas?

Tazzmann
 
Microsoft says that error 18456 is due to not having permissions on the server and could be due to logins being orphaned due to moving the server; or orphaned due to the databases being restored except for the logins; or the login being deleted.



But since the other apps can access that server with no trouble, it eliminates that issue. I'm back to the connection string in the failing app. Again, double check the app for a typo or check the ODBC connection.

-SQLBill
 
ok, well, then I am at a loss. The connection string is correct and I have checked it again for the 10th time today. We are going to try and import the user from the database that works to the one that doesn't and see if that fixes the problem. Maybe it is something that I just can't see.

Thanks for the help. If anyone has anymore suggestions, I am still willing to try.



Tazzmann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top