开发者

CF9 + SQL Server Express

开发者 https://www.devze.com 2022-12-18 23:48 出处:网络
I just created a new database in \"Microsoft SQL Server Management Studio Express\" and now I\'m in \"ColdFusion Administrator\" and I\'m trying to add my database as a Data Source. How do I do that?

I just created a new database in "Microsoft SQL Server Management Studio Express" and now I'm in "ColdFusion Administrator" and I'm trying to add my database as a Data Source. How do I do that? I believe the servername is .\SQLEXPRESS but I'm not sure what the default username and password are. I've tried creating a new login through Management Studio with an actual username and password, but those aren't working either. The error I'm getting is:

Connection verification failed for data source: xxx
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]The requested instance is either invalid or not running.
The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]The requested instance is either invalid or not running.

I can see that the service is running, and I can connect to it through management studio. I've tried following a couple tu开发者_运维知识库torials online, but they don't seem to be working for me. Ideas?


Server name can be any resolvable hostname or domain name, in case of having SQL Server and CF server on same box localhost should work for you.

Also make sure that user you created has access to the particular database and needed operations. Look into the database permissions for this. This check is not required when using master account (often login is sa), but this is not recommended practice because of the security reasons.


Also make sure SQL Server and Windows Authentication mode is checked. I had an issue with permissions as well when I only had Windows Authentication enabled under:

right click on server (localhost) -> security

Then restart SQL Server Services to save changes. After that I was able to connect my ColdFusion datasource to SQL Server.

CF9 + SQL Server Express


For testings sake use the same credentials that you are connected with in Management Studio, likely the "sa" user and password. Once you have it working with "sa" then go back into Management Studio and create an application level user for your CF app and then update the data source to use your new user / password.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号