February 19th, 2014, 07:16 PM
Trouble creating datasource for SQL Server Express 2008
I'm trying to verify a new datasource, and it keeps failing to connect. The SQL Server is using Windows Authentication, so I'm entering my Windows username and password, but it won't connect.
I know I have the correct server name, which let's say is "MSServer", and for username I use my Windows username ("Foo"), and my Windows password ("Bar"). But it doesn't like it.
I've done the server name and my username both with and without a "machine name\" prefix.
Since the DB is on my machine, I've also tried "127.0.0.1" as the Server Name and left un/pw blank. That doesn't work, either.
Am I missing something here?
February 20th, 2014, 12:20 AM
Fairly sure you can't use NTLM authentication with JDBC. You'll have to enable non-NTLM auth on the SQL box.
February 20th, 2014, 09:38 AM
I enabled non-NTLM authentication, created an account for CFServer, and was able to log into SQL Server through Management Studio. But the datasource still won't connect.
When I enter computerName/SQLServerName for the Server I get a message saying "...The requested instance is either invalid or not running."
When I enter the SQLServerName, message says "Error establishing socket. Unknown host: SQLServerName."
When I enter (local), I get a message saying "Error establishing socket. Unknown host: (local)"
When I enter 127.0.0.1, message says "Error establishing socket to host and port: 127.0.0.1:1433. Reason: Connection refused: connect"
I don't know why the first is considered invalid, or why the fourth is refusing connection. Am I forgetting something?
February 20th, 2014, 12:54 PM
I think I know what's happening. It looks like port 1433 isn't open on Localhost. I went in start>run>cmd, and typed
telnet 127.0.0.1 1433
and the message came back "Could not open connection to the host on port 1433: connect failed."
I have Windows firewall turned off, so it's not a firewall block. I need to find out how to open port 1433 -- do I need to do this through IIS, or Windows (or something else)?
February 20th, 2014, 03:43 PM
Check the troubleshoot section of the CF docs. It sounds like maybe you don't have TCP/IP connections enabled? http://goo.gl/bY8RjX
February 20th, 2014, 04:38 PM
Thanks, that was it - I had to play around with SSE's TCP/IP config before it finally started working. I posted the solution here: