SQL 2008 R2 – Connection issues from application – connects 2nd time

Had a problem where an application had issues connecting to another applications SQL database.
The application would freeze and after a delay come up with SQL related errors.
Troubleshooting was difficult as some users would not freeze and it only happened in certain areas of the application.

However when testing the connection with Excel I found that it would fail the 1st time connecting and then work the 2nd time. It did not matter if I used Windows Authentication or SA.
To test in Excel:
In Excel > data tab > from other sources > from SQL server > enter servername\instance\name > select log on credentials.

Excel connect to SQL

After clicking Next it would time out, but would then work if I tried to connect again.

I then searched online and found the following post:


I then opened SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for DATABASE > dbl click TCP/IP > IP Addresses Tab > found IPAll > TCP Dynamic Ports was 61288 (port numbers can be different to this)

SQL IPAll port setting


Opened Windows firewall and added a inbound rule for this port number.

Tested in Excel and found it would connect 1st time now using Windows or SA authentication.

Tested in application and found connection issues resolved.

Be the first to comment - What do you think?
Posted by Admin - July 21, 2014 at 12:22 pm

Categories: SQL   Tags:

How to install Service Pack on SQL Express

To get the correct SP installer see: http://blogs.msdn.com/b/sqlforum/archive/2011/04/19/forum-faq-how-do-i-apply-a-service-pack-for-an-instance-of-sql-server-2005-express-edition-or-sql-server-2008-express-edition.aspx

SQL 2005 SP’s: http://support.microsoft.com/kb/913089

Be the first to comment - What do you think?
Posted by Admin - October 3, 2012 at 2:39 pm

Categories: SQL   Tags: