Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1509] SSRS 2019 initialization fix. #1698

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- SqlSetup
- Fixed integration tests for SQL Server 2016 and SQL Server 2017.
- SqlRS
- Fixed SSRS 2019 initialisation [issue #1509](https://github.com/dsccommunity/SqlServerDsc/issues/1509).

## [15.1.1] - 2021-02-12

Expand Down
16 changes: 16 additions & 0 deletions source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,18 @@ function Set-TargetResource

Invoke-RsCimMethod @invokeRsCimMethodParameters

<#
When initializing SSRS 2019, the call to InitializeReportServer
always fails, even if IsInitialized flag is $false.
It also seems that simply restarting SSRS at this point initializes
it.

We will ignore $SuppressRestart here.
#>
Write-Verbose -Message $script:localizedData.Restart
Restart-ReportingServicesService -InstanceName $InstanceName -WaitTime 30
$restartReportingService = $false

$reportingServicesData = Get-ReportingServicesData -InstanceName $InstanceName

<#
Expand All @@ -473,6 +485,8 @@ function Set-TargetResource
#>
if ( -not $reportingServicesData.Configuration.IsInitialized )
{
$restartReportingService = $true

$invokeRsCimMethodParameters = @{
CimInstance = $reportingServicesData.Configuration
MethodName = 'InitializeReportServer'
Expand All @@ -488,6 +502,8 @@ function Set-TargetResource
{
Write-Verbose -Message "Changing value for using SSL to '$UseSsl'."

$restartReportingService = $true

$invokeRsCimMethodParameters = @{
CimInstance = $reportingServicesData.Configuration
MethodName = 'SetSecureConnectionLevel'
Expand Down