Intermittent ODBC connection failures

前端 未结 2 1399
醉话见心
醉话见心 2020-11-28 16:36

We are developing an in-house 32bit app. The app connects to a SQL Server. The test environment is SQL Server 2008 R2, and the live environment is SQL Server 2014 SP2.

相关标签:
2条回答
  • 2020-11-28 17:25

    Thanks to Birel for pointing me in the right direction. The answer was that on the new 2014 server, the 'SQL Server Browser Service' was not running. I set it to automatic startup, and started it. That resolved the issue.

    0 讨论(0)
  • 2020-11-28 17:41

    I've had numerous issues with this in the past and the following worked:

    1. Navigate to Start | Microsoft SQL Server 2014 | SQL Server 2014 Configuration Manager.

    Expand SQL Server Network Configuration, then click on the 2008 instance. Upon doing that, on your right, you will notice Shared Memory, Named Pipes and TCP/IP. Open Named Pipes and Enable it, if it's disabled. Open TCP/IP and enable it, but on TCP/IP, you will also notice a secondary tab called IP Addresses. Click on this tab and enable each IP Address individually for all IP Addresses (or only the ones you want to activate). You will also note that there is a TCP Port of which the default port for SQL is 1433. However, when you have more than one instance of SQL installed on the same machine, I usually split the port numbers. i.e. the one instance, I set to 1433 and the second, I set to 1435. See screenshot below:

    Notice that I removed the zero in the TCP Dynamic Ports.

    When you get to the end, set it like the following screenshot:

    When you finished setting all this up, click on Apply, OK and then OK.

    1. Navigate to Start | Run.

    Type in cliconfg (You'll have to do this on each machine that has issues connecting), then click OK.

    Enable Named Pipes and TCP/IP, then tick the option Enable Shared Memory Protocol as can be seen below:

    Click on Apply and then OK.

    1. Navigate to Start Run, type in services.msc, then click OK.

    Navigate to both instances of SQL Server and restart them.

    Also open SQL Server Browser, change it from Disabled to Automatic, then type in your AD Username & Password.

    Click on Apply and OK, then start the Browser.

    If you still have connection issues after this, try disabling Windows Firewall's or adding Port Exceptions as mentioned earlier in the answer.

    If you still have issues, reply to this answer and I will assist you further...

    Edit:

    On the workstations, click on Start | Run, then type in cliconfg and click OK.

    Enable TCP/IP and Named Pipes, then tick the option Enable Shared Memory Protocol and click OK.

    Hope this helps.

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