Microsoft SQL Server 2017 Reporting Services - 14.0.600.1763 (x64)
RSPortal!reportserverwebapp!RSPortal.exe!3d!12/01/2021-21:06:18:: e ERROR: OData exception occurred: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: An unexpected error occurred in Report Processing. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Guid batchId, Warning[]& Warnings)at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]& Warnings)at Microsoft.ReportingServices.Library.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, String expectedItemTypeName, Property[] Properties, Warning[]& Warnings)at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)at Microsoft.SqlServer.ReportingServices2010.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties)at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetItemDefinition(String itemPath, Byte[] definition, Property[] properties)at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithWindowsAuth[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.UpdateReport(IPrincipal userPrincipal, String origItemPath, Report item, Boolean renameOrMove, String[] delta)at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.Update(IPrincipal userPrincipal, String origItemPath, CatalogItem catalogItem, String[] delta)at Microsoft.ReportingServices.Portal.ODataWebApi.V2.Controllers.CatalogItemsController.PutEntity(String key, CatalogItem entity)at Microsoft.ReportingServices.Portal.ODataWebApi.Controllers.Reflection.EntitySetReflectionODataController`1.Put(ODataPath oDataPath, T value)at lambda_method(Closure , Object , Object[] )at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown ---
Need assistance with converting IF block/blocks to CASE statements: declare @startDate as datetime declare @endDate as datetime declare @currentMonth int select @currentMonth = datepart(mm, getdate()) --Show the current last week for the month.if @wkStartDate is null and @wkEndDate is nullbeginif @currentMonth = @monthNamebeginselect @startDate = DATEADD(wk, 0, DATEADD(wk, DATEDIFF(wk, 0,getdate()), -2))select @endDate = dateadd(dd, 6, @startDate)end--Show the last week of the month that was choosen.if @currentMonth <> @monthNamebeginselect @endDate = max(TheDate) from hlxlookup.dbo.Lookup_date_calendar where datepart(yyyy, TheDate) = @year AND DATEPART(mm, TheDate) = @monthNameselect @startDate = TheDate from hlxlookup.dbo.Lookup_date_calendar where TheDate < @endDate and TheDayOfWeek = 7end end elsebeginselect @startDate = @wkStartDateselect @endDate = @wkEndDate end This was an interesting error which I received while trying to uninstall SQL Server. In this blog, we would learn how to fix error Index was outside the bounds of the array, which might come during uninstallation of SQL Server. I must say this was an unfortunate situation where my machine got crashed while SQL Server install was in progress. To get rid of the “incomplete” installation, I decided to remove it and install it again. I went to add/remove program and selected “uninstall” for SQL Server 2017 as I was welcomed by error – Index was outside the bounds of the array. I looked into Summary.txt file and found below. Overall summary: Further, I could see below in the same log. This was the exception Exception type: System.IndexOutOfRangeException Detail.txt also showed similar information (06) 2018-11-25 09:48:24 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\Instance Names WORKAROUND/SOLUTIONIt was clear from the log that installation didn’t reach to the stage where it has to be configured. That’s why we are seeing <UNCONFIGURED> for the instance name. Instead of UI, I decided to use the command line to install. So, I went to below folder. C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\SQL2017 And use below the line in command prompt. SETUP.EXE /ACTION=UNINTSALL This time, I was able to get to the UI and choose “<UNCONFIGURED>” instance … and remove SQL successfully. I was unable to find out this trick on the internet. Hopefully, this would help someone who needs it. Reference: Pinal Dave (https://blog.sqlauthority.com) |