Forum Discussion
Connecting Excel to SQL Server 2017
Hello,
I recently downloaded and installed SQL Server 2017 on my laptop and I am having trouble connecting excel with said server. I have tried a variety of trouble shooting options (TCP/IP enabled, checking that browser is active, named pipes is enabled, shared memory enabled, making sure that outside connections are allowed in Microsoft Excel, etc.) and every time I receive one of the following messages: error 40 or error 26. I even adjusted the string and made sure my instance and server name were correct (NE-SF-T******\\SQLSERVER and ".....\\mssqlserver) and I am still running into the same error. Any help on this would be appreciated.
As far as I can see, using SQL Management Studio you are connecting to a server name that has one R letter but in Excel, you have two R letters in TIRREL.
If you are connecting fine from SQL Management Studio, then your hostname only contains one R.
- VitalieCiobanuBrass Contributor
Hi Tirrell,
How are you trying to connect? If you installed SQL using default instance, then you only need to specify your hostname, without instance name. See screenshots attached, my hostname is called SQL2017 so I'm connecting to it with no issues.
If you still have issues, either disable firewall or open 1433 and 4022 TCP ports.
- Open Windows Firewall with Advanced Security
- Right click Inbound Rules and select New rule
- In the New Inbound Rule Wizard window make the following modifications:
- Rule Type – Port
- Protocol and Ports – TCP, Specific local ports: 1433, 4022
- Action – Allow the connection
- Profile – no modification
- Name – SQL TCP ports
- Tirrell BrownCopper Contributor
Hey
Thanks for responding. So I turned windows firewall off, allowed a special rule for the port and the server and I am still receiving the same error message. Would it happen to be a security issue on the excel side? I allowed all connections under excel..
- VitalieCiobanuBrass ContributorI doubt.
Do you have SQL Management Studio? If not, install it and try to connect to your local SQL server/instance from there.
Are you able to connect?