SQLTeam.com | Weblogs | Forums

App Unable to Connect to database

This instance is configured for both SQL Server and Windows Authentication.

Oddly, when the app try to connect via the Domain\login account, it gives this errror in the SQL logs:

Login failed for user 'Domain\login'. Reason: Attempting to use an NT account name with SQL Server Authentication

It's very odd. The instance is in a different domain but we have opened the firewall.

Any ideas? Thanks

what does the connection string look like or are you using SSMS?

Not using SSMS. I can connect that way.App uses a connection panel and all entries look to be correct.

You get this type of error when you have specified a trusted connection (Windows) and the username/password in the connection string. My guess is you have specified the username and password because the connection is coming from a different domain - which isn't necessary.

You are correct, Jeff. The connection originates from a diff domain.
The connection gets TO the instance but fails here:
Cannot open database "My_Database" requested by the login. The login failed.
Login failed for user 'MyDomain\MyLogin'. I even grant the login sysadmin to rule out any permissions issues, still get this error.

What does the connection string look like? If you are trying to use a trusted connection - then you cannot specify the username/password and the from domain needs to be trusted.

The user was mis-spelling the dbname. Sometimes it's the little things. Thanks.

The last error was a different error than the first error - and yes, the second error shows a problem with the database selected.

At least the issue has been addressed now.

worrisome. why would the user know anything about the db name?