-
Notifications
You must be signed in to change notification settings - Fork 225
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
SqlRS: Does not work when reporting database machine is renamed #860
Comments
Do I understand your the scenario correctly.
|
Yes, that is pretty much the scenario, except 'A' and 'B' are actually the same computer in my environment. That is, the reporting DB and Reporting Services are both on the same computer. After some further experimentation, it seems that in the case of a rename, all that needs to be done to fix the settings is to call SetDatabaseConnection() with the new name on the MSReportServer_ConfigurationSetting WMI object. |
In a multiserver environment (or in a single server environment) I would typically don't use the computer name as the host name, but use a DNS host name (CNAME-record, or an A-record so Kerberos double hop works) so it easy to move the databases to a new environment. That said. If possible, it should be possible to change the parameter if desired state is something else than the configured value. Thanks for determine the possible solution! Articles for reference: |
Details of the scenario you tried and the problem that is occurring:
I am trying to use xSQLServerRSConfig to set SSRS's database connection after the machine with the reporting database has been renamed. There are two problems:
xSQLServerRSConfig is running the database creation scripts even though the database is already created, resulting in errors when trying to recreate it. This is because it is checking isInitialized to determine if the DB should be created, but this variable seems to only indicate if the encryption keys have been generated, which in my case have not, probably due to the rename.
Immediately after setting the new database connection and initializing the report server, xSQLServerRSConfig tests the resource values again and fails because isInitialized is still $false. This value only becomes $true after 30 seconds or so in my environment. It seems like there needs to be come sort of wait here for the initialization to complete. Also, I am not sure if reinitializing a report server like this will cause encrypted data to be lost. Maybe if a rename is detected the keys should be backed up and restored?
The DSC configuration that is using the resource (as detailed as possible):
This should be reproducible with a barebones configuration where the SQL Server with the reporting database has been renamed:
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
Windows Server 2012 R2 6.3.9600
SQL Server 2016 SP1 13.0.4001.0
PowerShell:
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
SqlServer 21.0.17178
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
8.2.0.0
The text was updated successfully, but these errors were encountered: