Enable remote connections for SQL Server Express 2012

前端 未结 17 823
栀梦
栀梦 2020-11-22 03:33

I just installed SQL Server Express 2012 on my home server. I\'m trying to connect to it from Visual Studio 2012 from my desktop PC, and repeatedly getting the well-known e

相关标签:
17条回答
  • 2020-11-22 04:19

    Well, glad I asked. The solution I finally discovered was here:

    How do I configure SQL Server Express to allow remote tcp/ip connections on port 1433?

    1. Run SQL Server Configuration Manager.
    2. Go to SQL Server Network Configuration > Protocols for SQLEXPRESS.
    3. Make sure TCP/IP is enabled.

    So far, so good, and entirely expected. But then:

    1. Right-click on TCP/IP and select Properties.
    2. Verify that, under IP2, the IP Address is set to the computer's IP address on the local subnet.
    3. Scroll down to IPAll.
    4. Make sure that TCP Dynamic Ports is blank. (Mine was set to some 5-digit port number.)
    5. Make sure that TCP Port is set to 1433. (Mine was blank.)

    (Also, if you follow these steps, it's not necessary to enable SQL Server Browser, and you only need to allow port 1433, not 1434.)

    These extra five steps are something I can't remember ever having had to do in a previous version of SQL Server, Express or otherwise. They appear to have been necessary because I'm using a named instance (myservername\SQLEXPRESS) on the server instead of a default instance. See here:

    Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)

    0 讨论(0)
  • 2020-11-22 04:20

    I had this problem recently. 2015 Aug

    Solved by opening SQL Server Configuration Manager

    • SQL Server Network Configuration -> Protocols for SQLEXPRESS
    • Properties on TCP/IP -> IP Adresses tab
    • Everything stays default, only set IPALL: TCP Port to 1433

    Can connect to with SQL Server Manager to machine: [hostaddress], 1433

    Example:

    0 讨论(0)
  • 2020-11-22 04:21

    You can also set

    Listen All to NO

    in the protocol dialog then in the IP address IP1 (say)

    set enabled to Yes,

    define yr IP address,

    set TCP Dynamic to Blank and

    TCP port to 1433 (or whatever)

    0 讨论(0)
  • 2020-11-22 04:21

    I prefer way of "Rosdi Kasim" as that's doesn't require detail configuration on the IP.

    I will definitely forget it again when I try to up another server again.

    Keep It Simple Stupid (KISS) by simply enable the Sql Server Browser service, then add the \SQLEXPRESS behind the IP when you connect the server.

    Direct using IP without "\SQLEXPRESS" was my point of failure as it doesn't use the default port.

    Thanks.

    0 讨论(0)
  • 2020-11-22 04:23

    This article helped me...

    How to enable remote connections in SQL Server

    Everything in SQL Server was configured, my issue was the firewall was blocking port 1433

    0 讨论(0)
  • 2020-11-22 04:28

    On my installation of SQL Server 2012 Developer Edition, installed with default settings, I just had to load the SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for MSSQLSERVER and change TCP/IP from Disabled to Enabled.

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