Solved

The length of the device name provided exceeds supported limit (maximum length is:259). Reissue the BACKUP statement with a valid device name.

Posted on 2010-08-30
3
2,349 Views
Last Modified: 2012-05-10
Hello,

How can I resolve this error : The length of the device name provided exceeds supported limit (maximum length is:259). Reissue the BACKUP statement with a valid device name.
Thanks

Regards

bibi
0
Comment
Question by:bibi92
3 Comments
 
LVL 18

Accepted Solution

by:
Cluskitt earned 250 total points
ID: 33556870
It would help if you would post the backup statement. Just from that, it seems that your device name is over 259 characters, which would trigger the error. If your device name really is over 259 characters, renaming it to a shorter string would be the way to go.
0
 
LVL 41

Assisted Solution

by:graye
graye earned 250 total points
ID: 33558121
I suspect that the backup file is on a network share (that's typically where  you run into PATH_TOO_LONG errors).   If so, then you can shorten the path by temporarily creating another share that "deeper" into the directory structure.   For example:
Before:  Drive N: might be mapped to \\server\share
After: Drive N: can be mapped to \\server\share\path1\path2\path3
Am I making sense?
0
 

Author Closing Comment

by:bibi92
ID: 33559889
Thanks, I have modified this line on the script :
SET @CurrentDirectory = @Directory -- + CASE WHEN RIGHT(@Directory,1) = '\' THEN '' ELSE '\' END + REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') + '\' + @CurrentDatabaseFS + '\' + UPPER(@CurrentBackupType)
Regards

bibi
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question