Chester
Chester

Reputation: 1083

ColdFusion 10 Administrator, MS SQL 2012 and Windows 8

I've been trying to add a datasource in the ColdFusion Administrator for Windows 8 and I've been having many issues. Below is what I've done:

  1. Database created "onessBlog".
  2. Login created onessBlog with password onessBlog / SQL Server Authentication pointing to default database onessBlog
  3. User onessBlog created with default schema of dbo.
  4. Named Pipes enabled for SQLEXPRESS
  5. TCP/IP - All IP1 to IP11 is Active, Enabled, TCP Dynamic Ports is blank and TCP Port is 1433.
  6. Service has been restarted.

Under data sources in ColdFusion Administrator, I create a datasource name 1ssBlog with the Microsoft SQL Server. I filled in the following fields:

Once I verify the connection, I get the following error: Cannot open database "onessBlog" requested by the login. The login failed.

I have viewed the following resources and I don't know what I missed:

Upvotes: 1

Views: 2247

Answers (1)

Chester
Chester

Reputation: 1083

As Miguel-F commented above, he asked me why the username and password fields were blank. I replied that, according to the Adobe Docs, it advised me to leave the username and password fields blank. Obviously, this wasn't the case. Outlined below are the steps of getting a new instance SQL Server connected with ColdFusion:

  1. Using SQL Server Management Studio, add a new database by going to the Object Explorer, right click on "Databases" and clicking on "New Database". Enter a name and leave at defaults for development purposes.
  2. While still in the Object Explorer, under "Security" right on "Logins" and select "New Login". Enter a login name and choose "SQL Server authentication". For development purposes, uncheck at least "User must change password at next login"
  3. Still in the Object Explorer, expand the new database that was created and right click "Security" and select "New User". Select User Type "SQL user with login" and type a user name. For "Login name", press the three dots button "..." and browse to and select the username created above. Select default schema as "dbo" for development purposes.
  4. Video "Create user in SQL Server 2008 R2"
  5. Exiting SQL Server Management Studio, go to sql Server Configuration Manager. Expand "SQL Server Network Configuration" and select "Protocols for SQLEXPRESS". Enable "Named Pipes" by right clicking.
  6. Double click on "TCP/IP". In the IP Addresses tab type "Yes" for each "Enabled" field where "Active" is "Yes". Delete any entries to "TCP Dynamic Ports" and enter "1433" for any "TCP Port".
  7. Save changes and selecting "SQL Serve Services" right click on "SQL Server" and restart the service by right clicking and clicking "Restart".
  8. Local SQL Server 2008 ColdFusion Datasource
  9. Log in to ColdFusion Administrator. Should be http://127.0.0.1:8500/CFIDE/administrator/index.cfm if left at defaults. Click on "Data Sources". Type in a Datasource name and select "Microsoft SQL Server" as the Drive Type.
  10. In the "Database" field, enter the name of the database created in step 1.
  11. In the "Server" field, enter 127.0.0.1 with "Port" 1433.
  12. In the "User name" field, enter username created on step 2 and was selected in step 3.
  13. In the "Password" field, enter the password for that username.
  14. Submit and if it didn't verify, verify the connection.

Upvotes: 4

Related Questions