Connect to remote sql database using excel

前端 未结 4 730
执念已碎
执念已碎 2020-12-19 23:04

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
相关标签:
4条回答
  • 2020-12-19 23:17

    you can just insert into EXCEL server name: WIN2K8-01\sqlexpress, 1433

    0 讨论(0)
  • 2020-12-19 23:22

    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.

    http://www.leansoftware.net/en-us/help/excel-database-tasks/worked-examples/how-to-securely-connect-excel-to-remote-web-server.aspx

    0 讨论(0)
  • 2020-12-19 23:32

    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.

    0 讨论(0)
  • 2020-12-19 23:35

    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

    Troubleshooting steps:

    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.

    0 讨论(0)
提交回复
热议问题