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,320 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Webservices in T-SQL 3 31
Querying data from 3 SQL tables 2 32
T-SQL: "HAVING CASE" Clause 1 25
sql server query 6 9
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
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 …
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

772 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