Sql Server 2005 fail to start up if there are spaces after tcp port

SYMPTOMS:

When you try to start sql server 2005, it may fail and in the errorlog, it shows:

Error: 17182, Severity: 16, State: 1.
TDSSNIClient initialization failed with error 0xd, status code 0x10

Error: 17826, Severity: 18, State: 3.
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.

And you checked protocol configuration, nothing looks unusual.

Cause:

One possible reason is that there are spaces after the tcp port on the server side. You can go to SQL Server Configuration Manager, choose the server instance, right click TCP/IP and see the properties, check whether there trailing spaces in the TcpPort field.

Essentially, SQL Server 2005 does not allow trailing spaces in Server-side TcpPort field, this is a breaking change from SQL Server 2000. The error that you would see in the error log depend upon whether the instance set "ListenAll" to "Yes" or "No".

If "Yes":

   TDSSNIClient initialization failed with error 0xd, status code 0x10

If "No":

   TDSSNIClient initialization failed with error 0xd, status code 0x19

Resolution:

  Go to SQL Server Configuration Manager, edit the server-side TcpPort and remove the trailing blank.

Reference:

KB article number 907853

 

Ming Lu, SQL Server Protocols