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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

756 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