Questa pagina fornisce i prerequisiti, la procedura di configurazione e le limitazioni per l'utilizzo di
SSRS in Cloud SQL.
Prima di iniziare
Prima di utilizzare SSRS su Cloud SQL, devi disporre di quanto segue:
Un'istanza Cloud SQL per ospitare il database del server di report
Un host in cui installare ed eseguire SSRS.
Può trattarsi di una VM Compute Engine o di un host che non utilizza Compute Engine.
Per le istruzioni di installazione, consulta
Installare SQL Server Reporting Services.
Un record Cloud DNS per assegnare un nome host all'istanza Cloud SQL.
Puoi creare un nome host utilizzando una delle seguenti opzioni:
Cloud DNS: utilizza Cloud DNS per creare un nome host che rimandi alla tua istanza.
Zona DNS personalizzata: se gestisci la tua zona DNS, crea un record A che mappa il tuo nome host preferito all'indirizzo IP della tua istanza.
Mappatura dei nomi host locali: modifica il file hosts del tuo sistema per creare un alias personalizzato per la tua istanza.
Due accessi Cloud SQL esistenti, un accesso di configurazione e un accesso di servizio.
Per creare un accesso, consulta gcloud sql users create.
Se vuoi utilizzare l'autenticazione Windows, devi utilizzare Managed Active Directory per unire l'istanza SQL Server e l'host che esegue SSRS. Per maggiori informazioni, consulta Utilizzo di Microsoft Active Directory gestito con Cloud SQL.
Procedura
Per configurare SSRS in Cloud SQL, segui questi passaggi:
La tabella seguente descrive i parametri gcloud di questa operazione:
Parametro
Descrizione
Valori consentiti
Valore predefinito
--setup-login
Obbligatorio. L'accesso utilizzato per connettersi all'istanza durante la configurazione di SSRS. Questo è il primo accesso richiesto in Report Server Configuration Manager durante l'impostazione di un database del server di report.
Deve essere un accesso SQL Server esistente, ad esempio sqlserver
Nessuno
--service-login
Obbligatorio. L'accesso SQL Server utilizzato dal server di report per connettersi al database del server di report durante la configurazione di SSRS. Questo è il secondo accesso richiesto in Report Server Configuration Manager durante l'impostazione di un database del server di report.
Deve essere un accesso SQL Server esistente e deve essere diverso dall'accesso di configurazione.
Nessuno.
--report-database
Obbligatorio. Un nome di database del report esistente o nuovo nell'istanza.
Alcuni caratteri speciali non sono consentiti nel nome del database del report, ad esempio spazi, parentesi e caratteri non inglesi.
Nessuno
--duration
Facoltativo. Il numero di ore in cui il lease SSRS è attivo durante le quali puoi eseguire la configurazione di SSRS.
Tra 1 e 12 ore. Ad esempio, 4h
5 ore
REST v1
Utilizzando l'API REST, puoi acquisire un lease SSRS su un'istanza. Per acquisire un lease SSRS, specifica quanto segue:
Due diversi accessi SQL Server, l'accesso alla configurazione e l'accesso al servizio
Il nome del database del report
La durata per cui il contratto di noleggio è attivo
SETUP_LOGIN: l'accesso SQL Server utilizzato per connettersi all'istanza SQL Server durante la configurazione di SSRS. Questo è il primo accesso richiesto in Gestione configurazione Report Server durante l'impostazione di un database del server di report.
SERVICE_LOGIN: l'accesso a SQL Server utilizzato dal server di report per connettersi al database del server di report durante la configurazione di SSRS. Questo è il secondo accesso richiesto in Report Server Configuration Manager durante l'impostazione di un database del server di report.
REPORT_DATABASE: il nome di un database dei report esistente o nuovo nell'istanza.
Microsoft non consente l'utilizzo di determinati caratteri speciali nel nome del database dei report, ad esempio spazi, parentesi e caratteri non inglesi.
DURATION: (Facoltativo). Il numero di ore in cui il lease SSRS è attivo durante le quali puoi eseguire la configurazione di SSRS.
Tra 1 e 12 ore, ad esempio 4h.
SETUP_LOGIN: l'accesso SQL Server utilizzato per connettersi all'istanza SQL Server durante la configurazione di SSRS. Questo è il primo accesso richiesto in Gestione configurazione Report Server durante l'impostazione di un database del server di report.
SERVICE_LOGIN: l'accesso a SQL Server utilizzato dal server di report per connettersi al database del server di report durante la configurazione di SSRS. Questo è il secondo accesso richiesto in Report Server Configuration Manager durante l'impostazione di un database del server di report.
REPORT_DATABASE: il nome di un database dei report esistente o nuovo nell'istanza.
Microsoft non consente l'utilizzo di determinati caratteri speciali nel nome del database dei report, ad esempio spazi, parentesi e caratteri non inglesi.
DURATION: (Facoltativo). Il numero di ore in cui il lease SSRS è attivo durante le quali puoi eseguire la configurazione di SSRS.
Tra 1 e 12 ore, ad esempio 4h.
Apri Reporting Services Configuration Manager sull'host in cui è installato SSRS.
Connettiti all'istanza locale del server di report.
Fai clic su Cambia database.
Inserisci il nome host SQL Server creato in Cloud DNS e le credenziali di accesso SQL Server per l'accesso alla configurazione utilizzato per il lease SSRS.
Inserisci il nome di un nuovo database del server di report o di un database di report esistente utilizzato per il lease SSRS.
Inserisci le credenziali di accesso a SQL Server per l'accesso al servizio utilizzato per il lease SSRS.
Fai clic su Avanti e completa l'ultimo passaggio.
Se non sono già impostati, configura l'URL del servizio web e l'URL del portale web. Il portale web dovrebbe caricarsi correttamente in pochi secondi.
Rilasciare un contratto di locazione SSRS
Puoi rilasciare un lease manualmente oppure attendere la sua scadenza automatica. Il rilascio del lease è necessario per ripristinare le autorizzazioni elevate necessarie per la configurazione e per consentire l'accesso al servizio per connettersi al database dei report.
L'accesso al servizio non può accedere al database dei report finché il lease non scade o non viene rilasciato manualmente.
Il seguente comando rilascia un lease SSRS.
gcloud
Utilizza il seguente comando per rilasciare un lease:
Utilizzando l'API REST, puoi rilasciare un lease SSRS per un'istanza. Come mostrato nell'esempio di richiesta seguente, devi fornire solo il nome dell'istanza e l'ID progetto.
Utilizzando l'API REST, puoi rilasciare un lease SSRS per un'istanza. Come mostrato nell'esempio di richiesta seguente, devi fornire solo il nome dell'istanza e l'ID progetto.
Gli accessi ad Active Directory non sono supportati per la configurazione del database dei report.
Il nome del database del report può contenere solo caratteri alfanumerici e trattini.
Devi acquisire un lease per modificare l'accesso utilizzato per connetterti al database dei report tramite Report Server Configuration Manager.
Per un database elaborato da un accesso al servizio, le operazioni di importazione dei file SQL ed eliminazione del database replicato possono non riuscire tra il completamento della configurazione di SSRS e il rilascio del lease.
Devi eliminare e ricreare l'utente del database per l'accesso al servizio in un database dei report importato. Questo perché l'utente esistente nel database importato non appartiene alla nuova istanza.
Quando aggiungi nuovi server di report per un deployment di scale out in SSRS, devi acquisire e rilasciare il lease SSRS per ogni nuova VM Windows che ospita un server di report. Ogni istanza Cloud SQL richiede la configurazione del nuovo database dei report utilizzando il database dei report esistente.
Devi creare un nuovo lease ogni volta che vuoi modificare le credenziali di accesso per il database del server di report in Gestione configurazione server di report.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# SQL Server Reporting Services (SSRS)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nCloud SQL supports [SQL Server Reporting Services (SSRS)](https://learn.microsoft.com/en-us/sql/reporting-services/create-deploy-and-manage-mobile-and-paginated-reports?view=sql-server-ver16) which helps you create, deploy, and manage paginated reports.\n\nThis page provides the prerequisites, setup procedure, and limitations for using\nSSRS in Cloud SQL.\n\nBefore you begin\n----------------\n\nBefore using SSRS on Cloud SQL, you must have the following:\n\n- A Cloud SQL instance to host the report server database\n- A host where you install and run SSRS. It can be either a Compute Engine VM or a host that doesn't use Compute Engine. For installation instructions, see [Install SQL Server Reporting Services](https://learn.microsoft.com/en-us/sql/reporting-services/install-windows/install-reporting-services?view=sql-server-ver16).\n- A Cloud DNS record to assign a hostname for your Cloud SQL instance.\n You can create a hostname by using one of the following options:\n\n - Cloud DNS: Use [Cloud DNS](/dns/docs/overview) to create a hostname that points to your instance.\n - Custom DNS zone: If you manage your own DNS zone, then [create an A record](/dns/docs/records) that maps your preferred hostname to the IP address of your instance.\n - Local hostname mapping: Modify your system's `hosts` file to create a custom alias for your instance.\n- Two existing Cloud SQL logins, a setup login and a service login.\n To create a login, see [`gcloud sql users create`](/sdk/gcloud/reference/sql/users/create).\n\n | **Note:** Cloud SQL doesn't support using Windows logins for SSRS.\n\n If you want to use Windows authentication, then you must use Managed Active Directory to join the SQL Server instance and the host running SSRS. For more information, see [Use Managed Microsoft AD with Cloud SQL](/sql/docs/sqlserver/configure-ad).\n\nProcedure\n---------\n\nTo set up SSRS in Cloud SQL, perform the following steps:\n\n1. [Acquire an SSRS lease](/sql/docs/sqlserver/ssrs#acquire).\n2. [Set up SSRS](/sql/docs/sqlserver/ssrs#setup).\n3. [Release an SSRS lease](/sql/docs/sqlserver/ssrs#release).\n\n### Acquire an SSRS lease\n\nSSRS requires elevated permissions during setup. To acquire an SSRS lease for your instance, use the following command: \n\n### gcloud\n\nUse the following command to acquire a lease: \n\n```bash\ngcloud sql instances acquire-ssrs-lease INSTANCE_NAME \\\n--project=PROJECT_NAME \\\n--setup-login=SETUP_LOGIN \\\n--service-login=SERVICE_LOGIN \\\n--report-database=REPORT_DATABASE \\\n--duration=DURATION \\\n```\n\n\nThe following table describes this operation's\n`gcloud` parameters:\n\n### REST v1\n\nUsing the REST API, you can acquire an SSRS lease on an instance. To acquire an SSRS lease, specify the following:\n\n- Two different SQL Server logins, the setup login and service login\n- The report database name\n- The duration for which the lease is active\n\n\nOnly the `DURATION` field is optional. For more information, see\n[AcquireSsrsLeaseContext](/sql/docs/sqlserver/admin-api/rest/v1/instances#AcquireSsrsLeaseContext):\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance.\n- \u003cvar translate=\"no\"\u003eSETUP_LOGIN\u003c/var\u003e: the SQL Server login that's used to connect to the SQL Server instance during SSRS setup. This the first login that is requested in Report Server Configuration Manager when setting a report server database.\n- \u003cvar translate=\"no\"\u003eSERVICE_LOGIN\u003c/var\u003e: the SQL Server login that's used by report server to connect to the report server database during SSRS setup. This is the second login that is requested in Report Server Configuration Manager when setting a Report Server Database.\n- \u003cvar translate=\"no\"\u003eREPORT_DATABASE\u003c/var\u003e: an existing or a new report database name on the instance. Microsoft doesn't allow certain special characters in the report database name, such as spaces, brackets, non-English characters.\n- \u003cvar translate=\"no\"\u003eDURATION\u003c/var\u003e: Optional. The number of hours that the SSRS lease is active during which you can perform the SSRS setup. Between 1 and 12 hours, for example, `4h`.\n\n\nHTTP method and URL: \n\n```bash\nPOST https://sqladmin.googleapis.com/sql/v1/projects/PROJECT_ID/instances/INSTANCE_NAME/acquireSsrsLease\n```\n\n\nRequest JSON body: \n\n```json\n{\n \"acquireSsrsLeaseContext\": {\n \"setupLogin\": SETUP_LOGIN,\n \"serviceLogin\": SERVICE_LOGIN,\n \"reportDatabase\": REPORT_DATABASE,\n \"duration\": DURATION,\n }\n}\n```\n\n### REST v1beta4\n\nUsing the REST API, you can acquire an SSRS lease on an instance. To acquire an SSRS lease, specify the following:\n\n- Two different SQL Server logins, the setup login and service login\n- The report database name\n- The duration for which the lease is active\n\nOnly the `DURATION` field is optional. For more information, see\n[AcquireSsrsLeaseContext](/sql/docs/sqlserver/admin-api/rest/v1beta4/instances#AcquireSsrsLeaseContext):\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance.\n- \u003cvar translate=\"no\"\u003eSETUP_LOGIN\u003c/var\u003e: the SQL Server login that's used to connect to the SQL Server instance during SSRS setup. This the first login that is requested in Report Server Configuration Manager when setting a report server database.\n- \u003cvar translate=\"no\"\u003eSERVICE_LOGIN\u003c/var\u003e: the SQL Server login that's used by report server to connect to the report server database during SSRS setup. This is the second login that is requested in Report Server Configuration Manager when setting a Report Server Database.\n- \u003cvar translate=\"no\"\u003eREPORT_DATABASE\u003c/var\u003e: an existing or a new report database name on the instance. Microsoft doesn't allow certain special characters in the report database name, such as spaces, brackets, non-English characters.\n- \u003cvar translate=\"no\"\u003eDURATION\u003c/var\u003e: Optional. The number of hours that the SSRS lease is active during which you can perform the SSRS setup. Between 1 and 12 hours, for example, `4h`.\n\n\nHTTP method and URL: \n\n```bash\nPOST https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME/acquireSsrsLease\n```\n\n\nRequest JSON body: \n\n```json\n{\n \"acquireSsrsLeaseContext\": {\n \"setupLogin\": SETUP_LOGIN,\n \"serviceLogin\": SERVICE_LOGIN,\n \"reportDatabase\": REPORT_DATABASE,\n \"duration\": DURATION,\n }\n}\n```\n\n### Set up SSRS\n\n| **Note:** To automate the setup process described in this section, you can use any scripting solution, such as PowerShell.\n\nTo perform the SSRS setup, follow these steps:\n\n1. Open Reporting Services Configuration Manager on the host where SSRS is installed.\n2. Connect to your local report server instance.\n3. Click **Change Database** .\n 1. Enter the SQL Server hostname created in Cloud DNS and the SQL Server login credentials for the setup login used for the SSRS lease.\n 2. Enter the name of a new report server database or existing report database used for the SSRS lease.\n 3. Enter the SQL Server login credentials for the service login used for the SSRS lease.\n 4. Click **Next** and finish through the last step.\n4. If not already set, then configure the **Web Service URL** and **Web Portal URL**. The Web Portal should load successfully within a few seconds.\n\n### Release an SSRS lease\n\nYou can release a lease manually, or you can wait until the lease automatically expires. Releasing the lease is required to revert any elevated permissions needed for setup and to allow the service login to connect to the report database.\nThe service login can't access the report database until the lease expires or is released manually.\nThe following command releases an SSRS lease. \n\n### gcloud\n\nUse the following command to release a lease: \n\n```bash\ngcloud sql instances release-ssrs-lease INSTANCE_NAME \\\n--project=PROJECT_NAME\n```\n\n### REST v1\n\n\nUsing the REST API, you can release an SSRS lease for an instance. As shown in the following request example, you only need to provide the instance name and project ID.\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance.\n\n\nHTTP method and URL: \n\n```bash\nPOST https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_NAME/releaseSsrsLease\n```\n\n### REST v1beta4\n\n\nUsing the REST API, you can release an SSRS lease for an instance. As shown in the following request example, you only need to provide the instance name and project ID.\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the instance.\n\n\nHTTP method and URL: \n\n```bash\nPOST https://sqladmin.googleapis.com/sql/v1beta4/projects/PROJECT_ID/instances/INSTANCE_NAME/releaseSsrsLease\n```\n\nLimitations\n-----------\n\n- Active Directory logins are not supported for setting up the report database.\n- The report database name can contain only alphanumeric characters and hyphens.\n- You must acquire a lease for changing the login used to connect to the report database through Report Server Configuration Manager.\n- For a database that is processed by a service login, the import sql files and delete replicated database operations can fail between the completion of the SSRS setup and the release of the lease.\n- You must delete and recreate the database user for the service login on an imported report database. This is because the existing user in the imported database doesn't belong to the new instance.\n- When adding new report servers for a scale-out deployment in SSRS, you must acquire and release the SSRS lease for every new Windows VM hosting a report server. Each Cloud SQL instance requires that you configure the new report database by using the existing report database.\n- You must create a new lease every time you want to change the login credentials for the report server database in Report Server Configuration Manager."]]