1

I have a windows service connecting to a SQL database. Recently, I was told to change the DB name in the connection string, all else was the same. When I attempted to connect, it threw Error 18456. With some research I found:

  • If I debug against the DB in visual studio on my machine, I get data
  • If I use SQL Server Mgmt Studio v18.2 (newest version?) on my machine, I get data
  • If I run it in SQL Server Mgmt Studio 2008 on my machine, I do NOT get data unless I run as Administrator

I am not SQL Server savvy and I don't know what the issue is or how to describe the issue to the DBA. Can someone help me identify the issue or give assistance in how to bring this to the DBA's attention? Thank you.

EDIT: I've installed the service code on a different server and it properly returns data. So this appears to be specific to the server and it's ability to get data from a SQL server. Additionally, both servers I am testing on have an operation which are able to connect to the Oracle. maybe this detail will spark some ideas? Unfortunately, I am not allowed to remote into the issue server as it is production, so I am unable to get much more info. Thanks again.

1

First, the error seems something wrong with login (as per following query)

select * from sys.messages
where language_id = 1033 and message_id = 18456

When you told to simply rename DB Name in connectionstring, did you verify which username was used, and the same username exists as login with appropriate permissions on SQL server, you can verify this via SSMS.

0

You can rename it back to see if it works. There's probably another dependency that needs to be changed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.