views:

296

answers:

2

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 tutorials online, but they don't seem to be working for me. Ideas?

+2  A: 

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.

Sergii
Where can I access the database permissions? :S **Edit:** Nevermind. Found it. You rock!! Server name needed to be localhost, and I needed to change the permissions. Thank you so much!
Mark
+1  A: 

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.

Cody Caughlan
Except I didn't use "sa" in Management Studio. I used Windows Authentication. That's the problem. Can't do that with CF AFAIK.
Mark