[Microsoft][ODBC SQL Server Driver][SQL Server]Write on “XXXX” failed: 665(failed to retrieve text for this error. Reason: 15105)

Error

[Microsoft][ODBC SQL Server Driver][SQL Server]Write on “XXXX” failed: 665(failed to retrieve text for this error. Reason: 15105)

Cause

We’ve found this is caused by a heavily fragmented filesystem on the volume where the spooling folder is located.

Resolution

  1. Run a Windows defrag operation on the volume where the spooling folder is located.
  2. Alternatively, pick a different, less fragmented volume to spool the database to.

References