ColdFusion datasource error: can't connect to database login failed

672 Views Asked by At

I keep getting the same error: Connection verification failed for data source: estimates java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot open database "estimates" requested by the login. The login failed.

I have checked in Sql Server Configuration Manager and TCP/IP is enabled in all of the SQL Server settings, and I'm using Windows Authentication only to access the SQL Server DB on my local server.

Can someone help fix this so I can set up a DSN, please? Thank you!

1

There are 1 best solutions below

7
Will Belden On

Likely a SQL configuration issue. Once you add the Login to the server, go back to the database and add the user to it. You'll need to add a role, as well, usually dbo for simplicity, but not necessarily security.

If you've restored the database from another source, you might need to run this command:

USE [yourdb]
EXEC sp_change_users_login 'Auto_Fix', 'theLoginName'