SQL Server Error 64 A connection was successfully established with the server

We got email from developer saying they are getting error while connecting to database server as shown below

A connection was successfully established with the server, but then an error occurred during the login process ( provider: TCP provider, error:0 – the specified network name is no longer available) Microsoft Sql server, Error: 64)

Checked sql server services that were up and running also looked in to access permission for those user. All were having permission to connect the respective database server.

Later on, we diagnosed the issue. If we use the ip-address of the target SQL server, which forces NTLM authentication (see http://davenport.sourceforge.net/ntlm.html), the problem goes away.

The long term solution is to add a registry key to each server to override the default MaxTokenSize (too low to handle large AD groups) that is defined on Server 2008 R2 servers (and others)

Each server needs to have the registry key added and then the server needs to be rebooted.

The manual instructions for adding the key are as follows…

1. Start Registry Editor (Start->Run->regedit).

2. Locate and click the following key in the registry:


3. If this key (‘Parameters’) is not present, create the key. To do so:

1. Click on the parent key in the registry:


2. On the Edit menu, click ‘Add Key’.

3. Create a key named ‘Parameters’

4. Click on the Parameters key.

5. On the Edit menu, click Add Value, and then add the following registry value:

Data type: REG_DWORD

Value name: MaxTokenSize

Base: click the ‘Hexadecimal’ radio button

Value data: ffff

Here’s what the key will look like in the ‘Edit DWORD’ dialog box…

Edit registry key for sql server


Leave a Reply




− 1 = 0