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,282 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now