Microsoft limitation:
“Database name” is limited to 128 (SQL limitation) and is the databases’ name.
DETAILS: http://msdn.microsoft.com/en-us/library/ms176061.aspx
“Filename” is limited to 260 (the “max_path” of the windows OS) and is the path and name of the database MDF or NDF files.
DETAILS:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
http://windows.microsoft.com/en-us/windows/file-names-extensions-faq#1TC=windows-7
Workaround:
Change the path to lower it to the 260 max character limit or manually change the filename to be lower than the max character limit.
EXAMPLE:
exec master.dbo.xp_restore_headeronly @filename = N'\\127.0.0.1\backups\somefile.bak
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center