Error Uploading Reports using PowerShell and ReportService webService  SSRS 2008
I have Windows 2008 Server, Sql Server Reporting Services 2008 R2. I use ReportService web Service to upload RDLs files. I use script ps1 Powershell. I get errors when uploading reports. The first 5 rdls is uploaded right, but next wrong. In log, c:\Program Files\Microsoft SQL Server\MSRS10_50.REPORTING\Reporting Services\LogFiles I can see "Reporting Web Server stopped", why ?? library!ReportServer_0-107!1118!08/09/2012-08:46:59:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12). webserver!ReportServer_0-107!7fc!08/09/2012-08:47:11:: i INFO: Reporting Web Server stopped appdomainmanager!DefaultDomain!14c!08/09/2012-08:47:16:: i INFO: Appdomain:152 ReportServer_REPORTING_0-107-129889682211300455 unregistered. any suggestions about it ? Full Log: appdomainmanager!DefaultDomain!248!08/09/2012-08:43:41:: i INFO: Appdomain:152 ReportServer_REPORTING_0-107-129889682211300455 started. appdomainmanager!ReportServer_0-107!248!08/09/2012-08:43:44:: i INFO: RS authentication mode is 4; effective ASP.NET authentication mode is Windows. vdir=/ReportServer_REPORTING. appdomainmanager!DefaultDomain!248!08/09/2012-08:43:44:: i INFO: Appdomain:152 ReportServer_REPORTING_0-107-129889682211300455 initialized (#85). webserver!ReportServer_0-107!248!08/09/2012-08:44:09:: i INFO: Reporting Web Server started resourceutilities!ReportServer_0-107!248!08/09/2012-08:44:09:: i INFO: Reporting Services starting SKU: Enterprise resourceutilities!ReportServer_0-107!248!08/09/2012-08:44:09:: i INFO: Maximum memory limit is 2097152Mb library!ReportServer_0-107!248!08/09/2012-08:44:15:: Call to CreateReportAction(REP_ACCESO_AIRNET04, /Reale, True). library!ReportServer_0-107!248!08/09/2012-08:44:15:: i INFO: Catalog SQL Server Edition = Enterprise crypto!ReportServer_0-107!248!08/09/2012-08:44:15:: i INFO: Initializing crypto as user: CASTELLANA\adminbbdd crypto!ReportServer_0-107!248!08/09/2012-08:44:15:: i INFO: Exporting public key crypto!ReportServer_0-107!248!08/09/2012-08:44:15:: i INFO: Performing sku validation crypto!ReportServer_0-107!248!08/09/2012-08:44:15:: i INFO: Importing existing encryption key library!ReportServer_0-107!248!08/09/2012-08:44:18:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04). library!ReportServer_0-107!248!08/09/2012-08:44:18:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04). library!ReportServer_0-107!248!08/09/2012-08:44:20:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_1, /Reale, True). library!ReportServer_0-107!248!08/09/2012-08:44:20:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_1). library!ReportServer_0-107!248!08/09/2012-08:44:20:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_1). library!ReportServer_0-107!248!08/09/2012-08:44:24:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_10, /Reale, True). library!ReportServer_0-107!248!08/09/2012-08:44:24:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_10). library!ReportServer_0-107!248!08/09/2012-08:44:24:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_10). library!ReportServer_0-107!248!08/09/2012-08:44:27:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_11, /Reale, True). library!ReportServer_0-107!248!08/09/2012-08:44:27:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_11). library!ReportServer_0-107!248!08/09/2012-08:44:27:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_11). library!ReportServer_0-107!f2c!08/09/2012-08:44:29:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_12, /Reale, True). library!ReportServer_0-107!248!08/09/2012-08:44:29:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12). library!ReportServer_0-107!f2c!08/09/2012-08:44:29:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12). library!ReportServer_0-107!fb8!08/09/2012-08:46:48:: Call to CreateReportAction(REP_ACCESO_AIRNET04, /Reale, True). library!ReportServer_0-107!1118!08/09/2012-08:46:49:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04). library!ReportServer_0-107!fb8!08/09/2012-08:46:49:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04). library!ReportServer_0-107!1118!08/09/2012-08:46:51:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_1, /Reale, True). library!ReportServer_0-107!1118!08/09/2012-08:46:51:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_1). library!ReportServer_0-107!1118!08/09/2012-08:46:51:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_1). library!ReportServer_0-107!1118!08/09/2012-08:46:55:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_10, /Reale, True). library!ReportServer_0-107!1118!08/09/2012-08:46:55:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_10). library!ReportServer_0-107!1118!08/09/2012-08:46:55:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_10). library!ReportServer_0-107!1118!08/09/2012-08:46:57:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_11, /Reale, True). library!ReportServer_0-107!fb8!08/09/2012-08:46:57:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_11). library!ReportServer_0-107!1118!08/09/2012-08:46:57:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_11). library!ReportServer_0-107!1118!08/09/2012-08:46:59:: Call to CreateReportAction(REP_ACCESO_AIRNET04_R_12, /Reale, True). library!ReportServer_0-107!fb8!08/09/2012-08:46:59:: Call to GetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12). library!ReportServer_0-107!1118!08/09/2012-08:46:59:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12). webserver!ReportServer_0-107!7fc!08/09/2012-08:47:11:: i INFO: Reporting Web Server stopped appdomainmanager!DefaultDomain!14c!08/09/2012-08:47:16:: i INFO: Appdomain:152 ReportServer_REPORTING_0-107-129889682211300455 unregistered. rshost!rshost!14c!08/09/2012-08:47:16:: i INFO: Application domain type ReportServer statistics: created: 85, unloaded: 85, failed: 0, timed out: 0. library!WindowsService_43!7fc!08/09/2012-08:52:56:: i INFO: Call to CleanBatch() library!WindowsService_43!7fc!08/09/2012-08:52:56:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 10 snapshots, 10 chunks, 0 running jobs, 0 persisted streams, 16 segments, 16 segment mappings, 0 edit sessions. library!WindowsService_43!7fc!08/09/2012-08:52:56:: i INFO: Call to CleanBatch() ends www.kiquenet.com/profesional
August 9th, 2012 3:11am

Hi Alham ! Please verify that your Report Server is running on which you are trying to deploy the reports; To verify, Go to Run -> services.msc -> SQL Server Reporting Services Check if this is started or not. Please let me know if this doesnt work for you. Hope I have answered you correctly. Thanks, Hasham Niaz
Free Windows Admin Tool Kit Click here and download it now
August 9th, 2012 3:58am

Yes, I check SQL Server Reporting Services and it is running I use ReportService web Service to upload RDLs files. I use script ps1 Powershell for upload reports like: http://randypaulo.wordpress.com/2012/02/21/how-to-install-deploy-ssrs-rdl-using-powershell/ I get errors when uploading reports. The first 5 rdls is uploaded right, but next wrong. **REP_ACCESO_AIRNET04_R_09, REP_ACCESO_AIRNET04_R_10, REP_ACCESO_AIRNET04_R_11**, `REP_ACCESO_AIRNET04_R_12` are uploaded right. `REP_ACCESO_AIRNET04_R_13` not, then I get the error. If use 3-4 reports rdl, not problem. But using more rdls files, I get errors. I check SQL Server Reporting Services and it is running I get several errors in powershell, that uses my script ps1 to install - upload reports rdls in SSRS: 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 informacin, 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 nformacin, consulte el tema de la Ayuda about_Remote_Troubleshooting.'. And logs in c:\Program Files\Microsoft SQL Server\MSRS10_50.REPORTING\Reporting Services\LogFiles > library!ReportServer_0-107!1118!08/09/2012-08:46:59:: Call to > SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12). > > webserver!ReportServer_0-107!7fc!08/09/2012-08:47:11:: i INFO: > Reporting Web Server stopped > appdomainmanager!DefaultDomain!14c!08/09/2012-08:47:16:: i INFO: > Appdomain:152 ReportServer_REPORTING_0-107-129889682211300455 > unregistered. I active VERBOSE log and this messages key for me: - ReportServer_REPORTING_0-1-129889760220267707 is about to be unloaded. - ShutDownMessage: Change Notification for critical directories. bin dir change or directory rename - HostingEnvironment initiated shutdown - Change Notification for critical directories. - INFO: Reporting Web Server stopped - ReportServer_REPORTING_0-1-129889760220267707 unregistered. pipeline=0x0000000000F1FA30, id=13907115651467581232, connid=13907115650930710318 ... runningrequests!ReportServer_0-1!123c!08/09/2012-11:06:57:: v VERBOSE: User map'<Users><User><Name>DESCASRPSW01\instalador</Name><Paths> <Path>http://descasrpsw01/ReportServer_REPORTING/ReportService2005.asmx?WSDL</Path><NrReq>1</NrReq></Paths></User></Users>' rshost!rshost!123c!08/09/2012-11:06:57:: v VERBOSE: HttpPipelineCallback::EndOfRequest(): continue pipeline=0x0000000000F1FA30. rshost!rshost!e3c!08/09/2012-11:06:57:: v VERBOSE: HttpPipeline::DisconnectCallback: releasing pipeline=0x0000000000F1FA30. rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: ThreadContinuePipeline: processing request on pipeline=0x0000000000F1FA30, state=2, IOError=0, node=0. rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: State machine disconnected pipeline=0x0000000000F1FA30, state=4 ... rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: HttpPipeline::DoStateDisconnected: releasing pipeline=0x0000000000F1FA30. rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: HttpPipeline::ReleaseOnce: releasing pipeline=0x0000000000F1FA30. rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: Destroying pipeline=0x0000000000F1FA30, callback=0x0000000000F1C660 ... appdomainmanager!ReportServer_0-1!13e4!08/09/2012-11:07:03:: v VERBOSE: Appdomain:3 ReportServer_REPORTING_0-1-129889760220267707 is about to be unloaded. ShutDownMessage: Change Notification for critical directories. bin dir change or directory rename HostingEnvironment initiated shutdown Change Notification for critical directories. bin dir change or directory rename Change Notification for critical directories. bin dir change or directory rename Change Notification for critical directories. bin dir change or directory rename webserver!ReportServer_0-1!13e4!08/09/2012-11:07:03:: i INFO: Reporting Web Server stopped appdomainmanager!DefaultDomain!b30!08/09/2012-11:07:08:: i INFO: Appdomain:3 ReportServer_REPORTING_0-1-129889760220267707 unregistered. rshost!rshost!b30!08/09/2012-11:07:08:: i INFO: Application domain type ReportServer statistics: created: 1, unloaded: 1, failed:
August 9th, 2012 4:32am

Solution: Use [System.IO.File]::ReadAllBytes($sourceFile) References: Get-Content is very memory hungry and inefficient when loading binary file. Every byte gets wrapped intoPSObject. I suggest to use .Net functions (.Net v4 has File.ReadAllBytes method) @user1578107 http://www.vistax64.com/powershell/203663-get-content-encoding-byte-problem-v1-v2-ctp3.html "Having hit a similar issue myself with RAM usage hitting the GB's uploading a 3MB file, I found that replacing:" $content = gc -en byte $sourceFile With: $content = [System.IO.File]::ReadAllBytes($sourceFile)www.kiquenet.com/profesional
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2012 4:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics