首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Powershell在SSRS 2008中上载多个报表RDL时出错

使用Powershell在SSRS 2008中上载多个报表RDL时出错
EN

Stack Overflow用户
提问于 2012-08-09 08:28:06
回答 2查看 1.7K关注 0票数 1

我有Windows2008Server64位,2008 R2。我使用ReportService web服务上传RDLs文件。我使用脚本ps1 Powershell上传报告,如:

http://randypaulo.wordpress.com/2012/02/21/how-to-install-deploy-ssrs-rdl-using-powershell/

上传报告时会出错。第一个5 rdls上传正确,但下一个错误。REP_ACCESO_AIRNET04_R_09,REP_ACCESO_AIRNET04_R_10,REP_ACCESO_AIRNET04_R_11REP_ACCESO_AIRNET04_R_12都上传对了。

REP_ACCESO_AIRNET04_R_13没有,那么我就得到了错误。

如果使用3-4报告rdl,没有问题.但是使用更多的rdls文件,我会发现错误。

我检查,它正在运行

我在powershell中得到了几个错误,这些错误使用我的脚本ps1在SSRS中安装- upload reports rdls:

代码语言:javascript
复制
Exception of type 'System.OutOfMemoryException' was thrown.

Failed. The error was: 'Error al procesar los datos de un comando remoto. Mensa
je de error: <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/w
smanfault" Code="3762507597" Machine="DESCASRPSW01"><f:Message><f:ProviderFault
 provider="microsoft.powershell" path="C:\Windows\system32\pwrshplugin.dll"></f
:ProviderFault></f:Message></f:WSManFault> Para obtener m s informaci¢n, consul
te el tema de la Ayuda about_Remote_Troubleshooting.'.


Failed. The error was: 'Error al procesar los datos de un comando remoto. Mensa
je de error: The WSMan provider host process did not return a proper response. 
 A provider in the host process may have behaved improperly. Para obtener m s i
nformaci¢n, consulte el tema de la Ayuda about_Remote_Troubleshooting.'.

并记录在c:\Program \Microsoft中。

library!ReportServer_0-107!1118!08/09/2012-08:46:59::对SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12).的调用 webserver!ReportServer_0-107!7fc!08/09/2012-08:47:11::I信息: Reporting停止了appdomainmanager!DefaultDomain!14c!08/09/2012-08:47:16::i信息:appdomainmanager!DefaultDomain!14c!08/09/2012-08:47:16:::152 ReportServer_REPORTING_0-107-129889682211300455未注册。

我的活动详细日志和这条消息的关键为我:

  • ReportServerReport0-1-129889760220267707即将被卸载。
  • ShutDownMessage:更改关键目录的通知。bin dir更改或目录重命名
  • HostingEnvironment启动关机
  • 更改关键目录的通知。
  • 信息:报告Web服务器已停止
  • ReportServer_REPORTING_0-1-129889760220267707未注册。

pipeline=0x0000000000F1FA30,id=13907115651467581232,connid=13907115650930710318 .

runningrequests!ReportServer_0-1!123c!08/09/2012-11:06:57::v详细:用户地图‘’DESCASRPSW01 01\分期代理REPORTING/ReportService2005.asmx?WSDL1‘

rshost!rshost!123c!08/09/2012-11:06:57:v详细:Http管线EndOfRequest::EndOfRequest():继续pipeline=0x0000000000F1FA30。

rshost!rshost!e3c!08/09/2012-11:06:57::v详细: HttpPipeline::DisconnectCallback: pipeline=0x0000000000F1FA30释放。

rshost!rshost!fbc!08/09/2012-11:06:57:V详细: ThreadContinuePipeline: pipeline=0x0000000000F1FA30、state=2、IOError=0、node=0上的处理请求。

pipeline=0x0000000000F1FA30!rshost!fbc!08/09/2012-11:06:57:V详细:状态机断开连接的state=4。

rshost!rshost!fbc!08/09/2012-11:06:57:v详细: HttpPipeline::DoStateDisconnected: releasing pipeline=0x0000000000F1FA30。

rshost!rshost!fbc!08/09/2012-11:06:57:v详细: HttpPipeline::ReleaseOnce: pipeline=0x0000000000F1FA30。

公司名称:rshost!rshost!fbc!08/09/2012-11:06:57:v详细:销毁pipeline=0x0000000000F1FA30,callback=0x0000000000F1C660

ReportServer_0-1-129889760220267707即将被卸载。

ShutDownMessage:更改关键目录的通知。

bin dir更改或目录重命名

HostingEnvironment启动关机

更改关键目录的通知。

bin dir更改或目录重命名

更改关键目录的通知。

bin dir更改或目录重命名

更改关键目录的通知。

bin dir更改或目录重命名

webserver!ReportServer_0-1!13e4!08/09/2012-11:07:03::I信息:已停止

appdomainmanager!DefaultDomain!b30!08/09/2012-11:07:08::i信息: Appdomain:3 ReportServer_Report0-1-129889760220267707未注册。

rshost!rshost!b30!08/09/2012-11:07:08:08:I INFO:应用程序域类型ReportServer统计:创建: 1,卸载: 1,失败:

UPDATE:问题是对RDL文件的get字节使用PSRemoting和get内容。没有ps1的脚本PSRemoting是正确的。

对于一些RDL文件,我在使用psremoting时出错。

代码语言:javascript
复制
#Load the RDL Binary 
[Byte[]]$rptContent = Get-Content $rptReference -Encoding byte

解决方案:使用System.IO.File::ReadAllBytes($sourceFile)

参考文献:

http://www.vistax64.com/powershell/203663-get-content-encoding-byte-problem-v1-v2-ctp3.html

在加载二进制文件时,Get内容非常缺乏内存,效率很低。每个字节都被包装为intoPSObject。我建议使用.Net函数(.Net v4有File.ReadAllBytes方法)-@ use 1578107

Powershell FTP Send large file System.OutOfMemoryException

“我自己也遇到了一个类似的问题,内存的使用击中了GB的上传3MB文件,我发现替换:”

代码语言:javascript
复制
 $content = gc -en byte $sourceFile

通过以下方式:

代码语言:javascript
复制
 $content = [System.IO.File]::ReadAllBytes($sourceFile)
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-08-13 07:10:15

使用System.IO.File::ReadAllBytes($sourceFile)

参考文献:

在加载二进制文件时,Get内容非常缺乏内存,效率很低。每个字节都被包装为intoPSObject。我建议使用.Net函数(.Net v4有File.ReadAllBytes方法)-@ use 1578107

http://www.vistax64.com/powershell/203663-get-content-encoding-byte-problem-v1-v2-ctp3.html

“我自己也遇到了一个类似的问题,内存的使用击中了GB的上传3MB文件,我发现替换:”

代码语言:javascript
复制
 $content = gc -en byte $sourceFile

通过以下方式:

代码语言:javascript
复制
 $content = [System.IO.File]::ReadAllBytes($sourceFile)
票数 1
EN

Stack Overflow用户

发布于 2012-08-10 00:58:44

这不是由重命名文件或文件夹的人造成的。

主要问题是您的脚本导致了System.OutOfMemoryException

尝试以小批量上传报表,或者在尝试上传之间插入等待。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11879465

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档