TCP Provider: No connection could be made because the target machine actively refused it

In this post, I am trying to list out potential cause and general solution to this specific error when you are making connection to SQL Server 2005. First, It is due to TCP connection fail, since you can tell from the title, “TCP Provider: .xx”, which indicates that either your connection string explicitly use ‘tcp:” prefix, say “Server=tcp:<machinename>…


SSL Cipher Suites used with SQL Server

When enabling channel encryption between the application and SQL Server, users may wonder what encryption algorithm is being used to protect their data.  Unfortunately, this isn’t an easy question to answer and here’s why. SQL Server (both 2005 and 2000) leverages the SChannel layer (the SSL/TLS layer provided by Windows) for facilitating encryption.  Furthermore, SQL…


Install a self-signed test certificate that can be loaded by SQL Server automatically

  In the blog Certificate for SQL Server 2005, I explained the requirements of a certificate for SQL Server 2005. Customer usually needs to purchase a certificate from certificate authorities (such as VeriSign), or apply a test certificate from some of the free providers available from Internet. The process is usually complicated and time-consuming. If…


Named Pipes Provider, error: 40 – Could not open a connection to SQL Server (Microsoft SQL Server, Error: XXX)

This error message is the most frequent error message when connecting to SQL Server. You see this error message when you use SqlClient. In SNAC, the error message is slightly differently as follows: C:>osql -E -Syourserver[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [xxx].[SQL Native Client]Login timeout expired Basically, this…


Named Pipes Provider, error: 40 – Could not open a connection to SQL Server

This error was most frequently hitted by our customers, and in this post, give a brief summary of troubleshooting tips for this specific error message. First, take a look at below MSDN forum link lists about this topic: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=192622&SiteID=1 https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1287189&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=348662&SiteID=1 http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1334187&SiteID=17 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1292357&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=136253&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322792&SiteID=1 https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=763875&SiteID=1   The various causes fall into five categories: 1 Incorrect connection string,…


Building a WebMethod FORMAT=NONE Stored Procedure

Commonly for Web Services, the exposed interfaces (webmethods) must conform to some pre-defined contract.  To assist customers developing web services which conforms to these contracts, SQL Server 2005 Native Web Services provides the ability for customers to construct and format the output XML themselves.  To do this, the Stored Procedure (or CLR Stored Procedure) must…