Sql-server – Full Back up over to Network failed due to unknown network error 59

backupNetworkola-hallengrensql serversql-server-2012

I am recently seeing the Unknown Netowrk Error 59 which saves the full back ups to a file share on some of the servers . The back ups happens at different times.

Ola Halengren scripts are being used currently and the sql server edition used are 2012, 2014 enterprise edition.

I see there are suggestions for to create a DWORD with name ‘Sesstimeout’ and value 360 in HKLM\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters.

My question is should we create this on the target server (file share) or the server from where the sql server resides

Best Answer

Aaron's answer provides great advice on how to work around this issue. I thought I'd add an answer to provide some more technical details.

According to Microsoft's err.exe utility, error 59 is defined in winerror.h as: An unexpected network error occurred.

If this was a problem with the session timing out, you would almost certainly be seeing STATUS_NETWORK_SESSION_EXPIRED, which is error 0xC000035C / -1073740964. Microsoft Docs states the resolution to this is:

The client's session has expired; therefore, the client MUST re-authenticate to continue accessing remote resources.

The registry value you mention in your question, HKLM\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters, relates to the "lanmanworkstation" Windows service, also known as simply "Workstation" via the services control panel applet. This service is what initiates network connections at the workstation end. Therefore, if you need to modify that registry value, you'd modify it at the client, which in this case is the SQL Server machine. Microsoft Docs for that registry value:

Determines the duration of the secondary delay used in calculating a time-out value for outstanding operations. If the redirector does not receive a response to an outstanding operation before the resulting time-out expires, it considers the operation to have failed. The value of the SessTimeout entry can be thought of as a margin for error. If there is an unexpected delay, the redirector permits the operation this extra time to complete.

The redirector adds the value of this entry to the expected response time for a server message block (SMB). The resulting time-out is calculated dynamically, and it is approximately equal to:

[(SMB size + Size of data sent or received) / bytes per second] + SessTimeout.

The default value for this setting is 45 seconds, and can be modified in the range of 10 to 65535 seconds.