I have a database on my computer running on SQL Server Express 2014, and I'd like other computers connected to my network to be able to connect to it using a C# program I wrote.
I've done the following:
1. turned off windows firewall. I know I don't need to do this completely, but I'm just debugging.
2. enabled TCP/IP in SQL Server Configuration Manager on the machine running the instance.
I can't change this for all machines. On the computer I'm trying to connect from, but not the computer hosting the database, I can't enable this. I'm not sure if that's a problem. However, on my machine I've enabled pretty much everything and restarted everything.
3. Remote connections are allowed
.UDL file to test the connection, I found that on my computer, if I select
MyComputerName as the server, I don't see my database listed. But if I enter
MyComputerName\SQLEXPRESS, I do see the database and can connect to it with integrated windows security.
But if I log on another computer and use a
.UDL to test the connection. I can connect if I enter
MyComputerName as the server, but if I try to enter
MyComputerName\SQLEXPRESS as the server, it tries really hard but then tells me
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Again, on my computer using the following connection strings work
Server=MyMachine\SQLEXPRESS;Database=MyDatabase;Integrated Security=True; Server=MyMachine\SQLEXPRESS;Database=MyDatabase;Trusted_Connection=True;
But on another computer on the network, I get the error
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
But I know that the the server is allowed remote connections and that the instance name is running, so I'm stuck. Any ideas of where to go from here?