Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
2,501 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
Cluskitt earned 1000 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 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

636 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