【发布时间】:2016-03-11 18:19:03
【问题描述】:
我正在尝试从 SharePoint 2010 导出网站,通过 powershell 从根网站集中导出,并且每个 Export-SPWeb 命令都失败并显示此消息。
Export-SPWeb : String or binary data would be truncated.
The statement has been terminated.
我测试过的任何网站集中的任何网站都会发生这种情况,而不仅仅是网络应用程序根目录。
据我了解,这是一个错误,表明 URL 的长度超过 260 个字符。但是,即使站点中没有文件,也会发生这种情况。如果相关,地址的 FQDN 为 28 个字符。
这是我尝试过的一个实际示例(当然使用不同的主机名)。
> new-spweb http://sharepoint.example.com/a
Url
---
http://sharepoint.example.com/a
> export-spweb http://sharepoint.example.com/a -path "a.cmp"
Export-SPWeb : String or binary data would be truncated.
The statement has been terminated.
At line:1 char:13
+ export-spweb <<<< http://sharepoint.example.com/a -path "a.cmp"
+ CategoryInfo : InvalidData: (Microsoft.Share...CmdletExportWeb:SPCmdletExportWeb) [Export-SPWeb], SqlException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletExportWeb
有谁知道发生这种情况的原因,以及由于错误消息似乎不正确而可能如何解决?
【问题讨论】:
-
该 cmdlet 应在与导出包相同的位置生成一个导出日志文件。您是否检查过日志文件以查看它是否提供了更多信息?您可能还想尝试使用 different parameters 运行它,例如 -NoFileCompression 和 -Force
-
抱歉耽搁了,我确实试过了。但是,它似乎在今天早上应用最新的 CU 后立即修复。可能是已修复的未记录错误。如果所有测试都成功,我会解决这个问题。
-
最新的 CU 出现后也会出现同样的错误。
标签: powershell sharepoint sharepoint-2010