FIX: Restore Command That Uses Large File Names May Cause Access Violation

Article translations Article translations
Article ID: 275615 - View products that this article applies to.
This article was previously published under Q275615
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 58121 (SQLBUG_70)
Expand all | Collapse all

SYMPTOMS

If you use char or nchar variables greater than 260 characters in length to specify the file names in a RESTORE command, or if a string literal greater than 260 characters is specified, the command may cause an access violation and the RESTORE request is not processed.

WORKAROUND

The file name must be 260 characters or shorter. If necessary, rename or move the file so that it uses a shorter file name.

If you use a variable to specify the file name, use a varchar or nvarchar variable instead of char or nchar. The char and nchar datatypes are padded out with spaces that count as part of the file name, while the varchar and nvarchar variables are not padded out with these spaces, which typically results in a shorter valid file name.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.

MORE INFORMATION

With this fix, any file name that is greater than 260 characters in length is truncated. If the length of the file name actually exceeds 260 characters, this could result in the file not being found during the RESTORE and the following error message occurs:
Server: Msg 3201, Level 16, State 2, Line 7 Cannot open backup device 'very long file name specified here'

Properties

Article ID: 275615 - Last Review: October 21, 2013 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB275615

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com