I’m using SQL Server 2008 R2 and Microsoft Excel.
- I have the server set up to be logged in via Windows user or database user
- I can log into the database fine with the database user
- I can connect to the database with my Silverlight app
- I cannot figure out how to connect from a remote PC in Excel
I went to Excel -> Data – > From other sources -> From SQL Server
My server name is
WIN2K8-01\DATABASENAME, so in Excel I typed in
IP\WIN2K8-01\DATABASENAME with the username and password.
There can be several reasons for which you cannot connect to your SQL Server:
A) It doesn’t admit remote connections
B) There’s a firewall or anything else that avoids remote computers connections
C) You don’t have SQL Browser service running
1) In a remote computer open cmd and run
ping win2k8-01 You should get responses from your computer. if not, there’s a network connectivity problem
2) Check that the “SQL Browser service” is running in your computer (Services, in Administrative tools, in Control panel) If not set it start type as automatic and start it. This allows remote computers to get information about available instances and how to connect to them. If in doubt, look here
3) Verify that TCP/IP is enabled. If not enable it How to: Enable the TCP/IP Protocol for a Database Instance
4) Verify that your server allows remote connections. To do this open SSMS, connect to your server, right click, open Properties, and look for “Allow remote connections” on “Connections” tab. get sure this option is checked. If in doubt, look here
5) Disable firewall in your computer (windows firewall or any 3rd party firewall like those installed by antivirus software)
Try connecting using the same connection configuration that worked in your local computer. It should work now.
If you cannot connect using Excel you should try connecting with another tool from the remote computer (you can install SSMS on that computer and try connecting).
This should work. if not let me know what is failing.
If it’s working, enable firewall again and try connecting again. If you cannot, you need to configure your firewall to allow SQL Server connections. Do that and try again. Don’t forget to allow connections to SQL Server browser on UDP port 1434, apart form the DB instance port on TCP.
Here is an article by Lean Software demonstrating the steps to securley connect Excel to a remote Web Server to either Report/Edit/Transfer data.
The article refers to the EDT Excel tool – however the technical steps in terms of connection string and setting firewall and SQL Server options are generic.
The syntax for connecting through excel is
<SERVERNAME OR IP>\INSTANCENAME (Where INSTANCENAME is not needed if you have installed a default instance).
This means in Excel you should go Data – From other sources – SQL Server – type in IP only as what you want to connect to. Once there, you will get options to connect to a specific database and table.
you can just insert into EXCEL
server name: WIN2K8-01\sqlexpress, 1433