简体   繁体   中英

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

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!

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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM