microsoft / ReportingServicesTools

Reporting Services Powershell Tools
MIT License
458 stars 213 forks source link

Set-RsDatabase failing for SSRS 2022 for "ReportingServicesTools" Module version os 0.0.9.0 #425

Open awsrams opened 6 months ago

awsrams commented 6 months ago

Do you want to request a feature or report a bug? Yes reporting bug

What is the current behavior? ReportingServicesTools module for latest version available of 0.0.8.0 is supported until SSRS 2019 versions. The unpublished module of 0.0.9.0 though SSRS 2022 is updated but it's not working as expected and is failing with "Exception calling "SetDatabaseConnection" : """ Errrors.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Yes reporting bug. "Set-RsDatabase" is failing for the SSRS 2022 with the below error. The configuration of ReportServer database for SQL Server Reporting Services is working as expected for SSRS 2019 with the $ssrsVersionValue for 15. But for SSRS 2022 configuration with the $ssrsVersionValue of 16 is failing with the exception on SetDatabaseConnection.

    Set-RsDatabase `
    -ReportServerVersion $ssrsVersionValue `
    -ReportServerInstance $ssrsInstance `
    -DatabaseServerName localhost `
    -Name 'ReportServer' `
    -DatabaseCredentialType 'SQL' `
    -DatabaseCredential $ssrsUserCreds `
    -AdminDatabaseCredentialType 'Windows' `
    -AdminDatabaseCredential $domainAdminCreds `
    -Confirm:$false `
    -Verbose

https://github.com/microsoft/ReportingServicesTools/blob/master/ReportingServicesTools/Functions/Admin/Set-RsDatabase.ps1

Reproduce steps: The above Set-RsDatabase for SSRS 2019 is working for 0.0.9.0 versions with $ssrsVersionValue=15 & $ssrsInstance=SSRS values for configuring SSRS on SQL Server EC-2 Machine with the latest 2022 Standard Edition of public AMI.

The configuration of Set-RsDatabase for SSRS 2022 is FAILING for 0.0.9.0 with $ssrsVersionValue=16 and ssrsInstance=SSRS values for configuring SSRS on SQL Server EC-2 Machine with the latest 2022 Standard Edition of public AMI.

Error: VERBOSE: Changed database context to 'ReportServerTempDB'. VERBOSE: Changed database context to 'ReportServer'. VERBOSE: Executing database rights script... Complete! VERBOSE: Updating Reporting Services to connect to new database... Exception calling "SetDatabaseConnection" : ""

What is the expected behavior? The expected behavior is for SSRS 2022 and ssrsVersionValue of 16 should work same as SSRS 2019

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts? https://github.com/microsoft/ReportingServicesTools/releases/tag/0.0.9.0

The previous version of 0.0.8.0 is not supported for SSRS 2022, however when tried the unpublished module of ReportingServicesTools for release tag 0.0.9.0 is not working as expected for SSRS 2022.

vlad-guerreiro commented 2 months ago

Any update on this issue?