Passaggi manuali per configurare SQL Server Reporting Services
Importante
Questa versione di Service Manager ha raggiunto la fine del supporto. È consigliabile eseguire l'aggiornamento a Service Manager 2022.
Durante la distribuzione del server di gestione del data warehouse Service Manager, è possibile specificare il server in cui verrà distribuito Microsoft SQL Server Reporting Services (SSRS). Per impostazione predefinita, verrà selezionato il computer che ospita il server di gestione di data warehouse. Se si specifica un computer diverso per ospitare SSRS, verrà richiesto di seguire questa procedura per preparare il server. La preparazione del computer remoto per ospitare SSRS richiede i passaggi seguenti, che vengono descritti in dettaglio nella presente sezione:
Copiare Microsoft.EnterpriseManagement.Reporting.Code.dll dal supporto di installazione di Service Manager nel computer che ospita SSRS.
Aggiungere un segmento di codice al file di configurazione "rssrvpolicy" nel computer che ospita SSRS.
Aggiungere un tag Extension al segmento Data esistente nel file di configurazione rsreportserver sullo stesso computer.
Se è stata usata l'istanza predefinita di SQL Server, usare Esplora risorse per trascinare Microsoft.EnterpriseManagement.Reporting.Code.dll (che si trova nella cartella Prerequisiti nel supporto di installazione Service Manager) nella cartella \Programmi\Microsoft SQL Server\MSRS13. MSSQLSERVER\Reporting Services\ReportServer\Bin nel computer che ospita SSRS. Se non è stata usata l'istanza predefinita di SQL Server, il percorso della cartella richiesta è \Programmi\Microsoft SQL Server\MSRS13.<>INSTANCE_NAME\Reporting Services\ReportServer\Bin. Nella procedura seguente viene utilizzato il nome dell'istanza predefinita.
Copiare il file Microsoft.EnterpriseManagement.Reporting.Code.dll
Eseguire la procedura descritta di seguito:
Nel computer in cui è ospitato l'SSRS remoto, aprire un'istanza di Esplora risorse.
Per SQL Server 2016, individuare la cartella \Programmi\Microsoft SQL Server\MSRS13. MSSQLSERVER\Reporting Services\ReportServer\Bin.
Avviare una seconda istanza di Esplora risorse, individuare l'unità contenente il supporto di installazione di Service Manager e quindi aprire la cartella Prerequisiti.
Nella cartella Prerequisiti selezionare Microsoft.EnterpriseManagement.Reporting.Code.dlle trascinarla nella cartella che si trova nel passaggio 2.
Aggiungere un segmento di codice al file rssrvpolicy.config
Eseguire la procedura descritta di seguito:
Nel computer che ospiterà SSRS individuare il file rssrvpolicy.config in \Programmi\Microsoft SQL Server\MSRS13. Cartella MSSQLSERVER\Reporting Services\ReportServer per SQL Server 2016.
Aprire il file rssrvpolicy.config con un editor XML (ad esempio Blocco note).
Scorrere il file rssrvpolicy.config e individuare i segmenti di codice
<CodeGroup>
. Il codice seguente mostra un segmento<CodeGroup>
di esempio.<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust"> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="$CodeGen$/*" /> </CodeGroup>
Aggiungere il seguente segmento
<CodeGroup>
intero nella stessa sezione degli altri segmenti<CodeGroup>
.<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Microsoft System Center Service Manager Reporting Code Assembly" Description="Grants the SCSM Reporting Code assembly full trust permission."> <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9" /> </CodeGroup>
Salvare le modifiche e chiudere l'editor XML.
Aggiungere un tag Di estensione al segmento Dati nel file rsreportserver.conf
Eseguire la procedura descritta di seguito:
Nel computer che ospita SSRS individuare il file rsreportserver.config in \Programmi\Microsoft SQL Server\MSRS13. Cartella MSSQLSERVER\Reporting Services\ReportServer per SQL Server 2016.
Utilizzando un editor XML di propria scelta (ad esempio Blocco note) aprire il file rsreportserver.config.
Scorrere il file rsreportserver.config e individuare il segmento di codice
<Data>
. In questo file è presente un<Data>
solo segmento di codice.Aggiungere il seguente tag
Extension
al segmento di codice<Data>
dove tutti gli altri tagExtension
sono:<Extension Name="SCDWMultiMartDataProcessor" Type="Microsoft.EnterpriseManagement.Reporting.MultiMartConnection, Microsoft.EnterpriseManagement.Reporting.Code" />
Salvare le modifiche e chiudere l'editor XML.
Verificare l'installazione di SSRS
Nella versione Service Manager Data Warehouse (DW) 2016 e versioni successive viene rilevato il problema noto seguente:
Nel Service Manager Data Warehouse (DW), viene rilevato il problema noto seguente:
Se SQL Server Reporting Services (SSRS) è in esecuzione in locale nel server di gestione Data Warehouse e SSRS è 2017 o versione successiva, l'installazione di Data Warehouse viene completata correttamente, ma potrebbe non configurare correttamente l'istanza locale di SSRS specificata.
Usare lo script seguente per verificare se l'installazione di LOCAL SSRS è configurata correttamente e può essere usata con il Service Manager Data Warehouse.
Nota
Questo script di PowerShell può essere eseguito dopo un'installazione di Service Manager Data Warehouse. Lo script non apporta modifiche alla configurazione, ma lo verifica. È possibile eseguire lo script tutte le volte necessario.
#region function definitions
function SelfElevate() {
#got from http://www.expta.com/2017/03/how-to-self-elevate-powershell-script.html and changed a bit
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-WmiObject -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
$CommandLine = "-File `"" + $Script:MyInvocation.MyCommand.Path + "`" " + $Script:MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
Exit
}
}
}
function EndScriptExecution() {
Write-Host ""
Read-Host "Press ENTER to stop execution"
Exit
}
#endregion
#region Init
SelfElevate
#endregion
#region Select SSRS service
$ssrsServicesAvailable = gwmi win32_service | ?{ $_.DisplayName -like 'SQL Server Reporting Services*' }
if ($ssrsServicesAvailable -eq $null) {
Write-Host "No SSRS service(s) detected on this machine. " -NoNewline
Write-Host "Aborting ..." -ForegroundColor Yellow
EndScriptExecution
}
if ( ($ssrsServicesAvailable | Measure-Object).Count -eq 1) {
$ssrsServiceToVerify = ($ssrsServicesAvailable | Select-Object -Property DisplayName, State, PathName) | Select-Object -First 1
}
else {
$ssrsServiceToVerify = $ssrsServicesAvailable | Select-Object -Property DisplayName, State, PathName | Out-GridView -Title 'Select the SSRS service to verify and then click OK...' -OutputMode Single
if ($ssrsServiceToVerify -eq $null) {
Write-Host "No SSRS service selected to verify. " -NoNewline
Write-Host "Aborting ..." -ForegroundColor Yellow
EndScriptExecution
}
}
#endregion
#region Preparation
Write-Host "--------------------------------------------------------------------"
Write-Host "Verifiying selected SSRS service : " -NoNewline
Write-Host "'$($ssrsServiceToVerify.DisplayName)'" -ForegroundColor Cyan
Write-Host "--------------------------------------------------------------------"
Write-Host ""
$ssrsExePath = $ssrsServiceToVerify.PathName.Replace('"','')
$ssrsExeFileVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ssrsExePath)
$ssrsMajorVersion = $ssrsExeFileVersion.ProductMajorPart
$ssrsVersionDisplayName = switch ($ssrsMajorVersion)
{
11 {"2012"}
12 {"2014"}
13 {"2016"}
14 {"2017"}
15 {"2019"}
default {""}
}
if ($ssrsVersionDisplayName -eq "") {
Write-Host "Unknown SSRS Version detected. " -NoNewline
Write-Host "Aborting ..." -ForegroundColor Yellow
EndScriptExecution
}
[System.IO.DirectoryInfo]$ssrsReportServerFolder = (Get-Item -Path $ssrsExePath).Directory.Parent
if ($ssrsMajorVersion -ge 14) {
$ssrsReportServerFolder = Join-Path $ssrsReportServerFolder.FullName "ReportServer"
}
[string]$ssrsReportServerFolder = $ssrsReportServerFolder.FullName
[string]$ssrsReportServerBinFolder = Join-Path $ssrsReportServerFolder "bin"
#endregion
#region Checking DLL
$scsmDllFileExists = $false
$scsmDllFileName = "Microsoft.EnterpriseManagement.Reporting.Code.dll"
$scsmDllFilePath = Join-Path $ssrsReportServerBinFolder $scsmDllFileName
$scsmDllFileExists = (Test-Path -Path $scsmDllFilePath)
if (-not $scsmDllFileExists) {
Write-Host "ERROR: " -ForegroundColor Yellow -NoNewline
Write-Host "The file '$scsmDllFileName' does *NOT* exist in '$ssrsReportServerBinFolder'"
}
else {
Write-Host " Pass: The file '$scsmDllFileName' does exist in '$ssrsReportServerBinFolder'"
}
Write-Host ""
#endregion
#region Checking rssrvpolicy.config
$rssrvpolicy_configIsCorrect = $false
$rssrvpolicy_configFileName = "rssrvpolicy.config"
$rssrvpolicy_configFilePath = Join-Path $ssrsReportServerFolder $rssrvpolicy_configFileName
$rssrvpolicy_configFileExists = (Test-Path -Path $rssrvpolicy_configFilePath)
if (-not $rssrvpolicy_configFileExists) {
Write-Host "$rssrvpolicy_configFileName does *NOT* exist in $ssrsReportServerFolder" -ForegroundColor Yellow
}
if ($rssrvpolicy_configFileExists) {
[xml]$xml = Get-Content $rssrvpolicy_configFilePath
$tagNameToFind = "CodeGroup"
$attributeNameToFind = "Name"
$attributeValueToFind = "Microsoft System Center Service Manager Reporting Code Assembly"
$nodeToFind = Select-Xml -XPath "//$tagNameToFind[@$attributeNameToFind='$attributeValueToFind']" -Xml $xml
if ($nodeToFind -eq $null) {
Write-Host "ERROR: " -ForegroundColor Yellow -NoNewline
Write-Host "The file '$rssrvpolicy_configFileName' in '$ssrsReportServerFolder' does *NOT* contain the correct <$tagNameToFind> node."
}
else {
$CodeGroup_NodeToVerify = [System.Xml.XmlNode]$nodeToFind.Node
$IMembershipCondition_NodeToVerify = [System.Xml.XmlNode]$CodeGroup_NodeToVerify.IMembershipCondition
$rssrvpolicy_configIsCorrect = ( $CodeGroup_NodeToVerify.class -eq "UnionCodeGroup" `
-and $CodeGroup_NodeToVerify.version -eq "1" `
-and $CodeGroup_NodeToVerify.PermissionSetName -eq "FullTrust" `
-and $IMembershipCondition_NodeToVerify.class -eq "StrongNameMembershipCondition" `
-and $IMembershipCondition_NodeToVerify.version -eq "1" `
-and $IMembershipCondition_NodeToVerify.PublicKeyBlob -eq "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9"
)
if (-not $rssrvpolicy_configIsCorrect) {
Write-Host "ERROR: " -ForegroundColor Yellow -NoNewline
Write-Host "The <$tagNameToFind> node in '$rssrvpolicy_configFileName' in '$ssrsReportServerFolder' does exists but its content is *NOT* correct."
}
else {
Write-Host " Pass: The content of '$rssrvpolicy_configFileName' in '$ssrsReportServerFolder' is correct."
}
}
}
Write-Host ""
#endregion
#region Checking rsreportserver.config
$rsreportserver_configIsCorrect = $false
$rsreportserver_configFileName = "rsreportserver.config"
$rsreportserver_configFilePath = Join-Path $ssrsReportServerFolder $rsreportserver_configFileName
$rsreportserver_configFileExists = (Test-Path -Path $rsreportserver_configFilePath)
if (-not $rsreportserver_configFileExists) {
Write-Host "$rsreportserver_configFileName does *NOT* exist in $ssrsReportServerFolder" -ForegroundColor Yellow
}
if ($rsreportserver_configFileExists) {
[xml]$xml = Get-Content $rsreportserver_configFilePath
$tagNameToFind = "Extension"
$attributeNameToFind = "Name"
$attributeValueToFind = "SCDWMultiMartDataProcessor"
$nodeToFind = Select-Xml -XPath "//$tagNameToFind[@$attributeNameToFind='$attributeValueToFind']" -Xml $xml
if ($nodeToFind -eq $null) {
Write-Host "ERROR: " -ForegroundColor Yellow -NoNewline
Write-Host "The file '$rsreportserver_configFileName' in '$ssrsReportServerFolder' does *NOT* contain the correct <$tagNameToFind> node."
}
else {
$Extension_NodeToVerify = [System.Xml.XmlNode]$nodeToFind.Node
$rsreportserver_configIsCorrect = ( $Extension_NodeToVerify.Type.Replace(" ","") -eq "Microsoft.EnterpriseManagement.Reporting.MultiMartConnection, Microsoft.EnterpriseManagement.Reporting.Code".Replace(" ","") )
if (-not $rsreportserver_configIsCorrect) {
Write-Host "ERROR: " -ForegroundColor Yellow -NoNewline
Write-Host "The <$tagNameToFind> node in '$rsreportserver_configFileName' in '$ssrsReportServerFolder' does exists but its content is *NOT* correct."
}
else {
Write-Host " Pass: The content of '$rsreportserver_configFileName' in '$ssrsReportServerFolder' is correct."
}
}
}
Write-Host ""
#endregion
#region Conclusion
""
Write-Host "Conclusion:" -ForegroundColor Cyan
Write-Host "==========="
if ($scsmDllFileExists -and $rsreportserver_configIsCorrect -and $rssrvpolicy_configIsCorrect) {
Write-Host "The selected SSRS instance is configured correctly."
}
else {
Write-Host "The selected SSRS instance is " -NoNewline
Write-Host "*NOT* configured correctly." -ForegroundColor Yellow
Write-Host "Please follow the steps at " -NoNewline
Write-Host "https://learn.microsoft.com/system-center/scsm/config-remote-ssrs" -ForegroundColor Yellow
}
EndScriptExecution
#endregion
Passaggi successivi
- Per usare i gruppi di disponibilità AlwaysOn con Service Manager per supportare un ambiente di failover, vedere Usare SQL Server gruppi di disponibilità AlwaysOn per supportare il failover.
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per