One or more files in the restored site collection will exceed the maximum supported path length. Ple
2012-08-31 11:20
411 查看
I had a customer encounter an error while trying to restore a site collection using
STSADM -O RESTORE. They had backed up the site collection without error from the same farm, but when they tried to restore the site collection using a new URL to the same farm, STSADM gave them the following error:
One or more files in the restored site collection will exceed the maximum supported path length. Please select a shorter destination site address and try again.
After some investigation I found out, as the error message alludes to, the path we are trying to restore to is violating the 260 character path length restriction in SharePoint. There are a few tables in the database that can trigger a violation of the
path length, in our case it was in the docs table. In our scenario, the original URL was
sites/abc. In this site collection, we have a document library with a nested folder structure, the longest folder path being 259 characters, just under the 260 limit. The URL we used to restore the site collection backup to was
sites/abcxyz, three characters longer than the original URL. These extra three characters made our 259 character folder path in the original URL, 262 characters, which is over the 260 character limit, causing the error to be thrown.
To understand the root of the problem, I kept digging and finally tracked the error down to the
proc_RenameSite stored procedure, which is called AFTER the process restores all the content to the content database. The bad part about the
AFTER statement, is that if you have a large site collection (10’s of GBs), you will likely be waiting a several hours for the restore process to reach this point in the process, have it error out and roll back the restore and exit, leaving
you in a very “happy” mood.
You have a couple courses of action to work around this problem. The easiest, but not always practical, method is to shorten the name of the site collection you are restoring, something like
sites/sweng instead of sites/software_engineering, giving you 15 extra characters in your folder paths. Second, if you still have the original site collection available, you could rename some folders, files, etc, to shrink the URL length
well below the 260 character limit, so you have the extra characters available for your restored site URL. Finally, if you do not have the original site collection available to you, and you cannot choose a shorter URL for your restored site, you could run
the restore processing again, choosing a temporary short site collection URL, like
sites/x, rename some of the longer paths in your site collection, backup the
sites/x site collection, and try the restore again using your desired URL. It’s not a pretty or easy method, but it may be your only solution.
Here is a bit of SQL that you can use to examine your DOCS table in the content database, to look for long paths. The
Total column is the combination that cannot exceed 260 characters.
SELECT
LEN(DirName +
N’/' + LeafName)
AS Total,
DirName,
LeafName
FROM
Docs WITH (NOLOCK)
ORDER BY Total DESC
STSADM -O RESTORE. They had backed up the site collection without error from the same farm, but when they tried to restore the site collection using a new URL to the same farm, STSADM gave them the following error:
One or more files in the restored site collection will exceed the maximum supported path length. Please select a shorter destination site address and try again.
After some investigation I found out, as the error message alludes to, the path we are trying to restore to is violating the 260 character path length restriction in SharePoint. There are a few tables in the database that can trigger a violation of the
path length, in our case it was in the docs table. In our scenario, the original URL was
sites/abc. In this site collection, we have a document library with a nested folder structure, the longest folder path being 259 characters, just under the 260 limit. The URL we used to restore the site collection backup to was
sites/abcxyz, three characters longer than the original URL. These extra three characters made our 259 character folder path in the original URL, 262 characters, which is over the 260 character limit, causing the error to be thrown.
To understand the root of the problem, I kept digging and finally tracked the error down to the
proc_RenameSite stored procedure, which is called AFTER the process restores all the content to the content database. The bad part about the
AFTER statement, is that if you have a large site collection (10’s of GBs), you will likely be waiting a several hours for the restore process to reach this point in the process, have it error out and roll back the restore and exit, leaving
you in a very “happy” mood.
You have a couple courses of action to work around this problem. The easiest, but not always practical, method is to shorten the name of the site collection you are restoring, something like
sites/sweng instead of sites/software_engineering, giving you 15 extra characters in your folder paths. Second, if you still have the original site collection available, you could rename some folders, files, etc, to shrink the URL length
well below the 260 character limit, so you have the extra characters available for your restored site URL. Finally, if you do not have the original site collection available to you, and you cannot choose a shorter URL for your restored site, you could run
the restore processing again, choosing a temporary short site collection URL, like
sites/x, rename some of the longer paths in your site collection, backup the
sites/x site collection, and try the restore again using your desired URL. It’s not a pretty or easy method, but it may be your only solution.
Here is a bit of SQL that you can use to examine your DOCS table in the content database, to look for long paths. The
Total column is the combination that cannot exceed 260 characters.
SELECT
LEN(DirName +
N’/' + LeafName)
AS Total,
DirName,
LeafName
FROM
Docs WITH (NOLOCK)
ORDER BY Total DESC
相关文章推荐
- 关于Struts2报错严重: One or more Filters failed to start. Full details will be found in the appropriate co
- 启动 Tomcat 报错 One or more listeners failed to start. Full details will be found in the appropriate
- One or more Filters failed to start. Full details will be found in the appropriate container log fil
- 【报错】项目启动,仅仅报错 One or more listeners failed to start. Full details will be found in the appropriate container log file
- One or more listeners failed to start. Full details will be found in the appropriate container log
- Debug error:"One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program."
- We are unable to complete the review of your app since one or more of your In App Purchases have not
- SQL Server: Text was truncated or one or more characters had no match in the target code page error
- myeclipse中增加user libraries时出现“ One or more selected libraries are already on the build path”时的解决办法
- UBUNTU 9.10 因断电升级未成功后重启出现“one or more of the mounts listes in /etc/fstab cannot yet be mounted?”?
- SVN:One or more files are in a conflicted state
- Debug error:"One or more breakpoints cannot be set and have been disabled.Execution will stop at the
- 解决svn:"One or more files are in a conflicted state."问题
- SVN之update版本冲突one or more files are in a conflicted state
- One or more breakpoints cannot be set and have been disabled!Execution will stop at the beginning of the program
- One or more files from the Emulator for Windows CE installation is missing.Please reinstall Emulator for Windows CE and try agai
- one or more files from the emulator for windows ce installation is missing 解决方法
- 让人哭笑不得的“Unable to load one or more of the types in the assembly”问题的解决!
- How to solve "one or more projects in the solution were not loaded correctly" problem?
- 让人哭笑不得的“Unable to load one or more of the types in the assembly”问题的解决!