Halaman ini menyediakan prasyarat, prosedur penyiapan, dan batasan untuk menggunakan
SSRS di Cloud SQL.
Sebelum memulai
Sebelum menggunakan SSRS di Cloud SQL, Anda harus memiliki hal berikut:
Instance Cloud SQL untuk menghosting database server laporan
Host tempat Anda menginstal dan menjalankan SSRS.
Host ini dapat berupa VM Compute Engine atau host yang tidak menggunakan Compute Engine.
Untuk mengetahui petunjuk penginstalan, lihat
Menginstal SQL Server Reporting Services.
Data Cloud DNS untuk menetapkan nama host bagi instance Cloud SQL Anda.
Anda dapat membuat nama host menggunakan salah satu opsi berikut:
Cloud DNS: Gunakan Cloud DNS untuk membuat nama host yang mengarah ke instance Anda.
Zona DNS kustom: Jika Anda mengelola zona DNS sendiri, buat data A yang memetakan nama host pilihan Anda ke alamat IP instance Anda.
Pemetaan nama host lokal: Ubah file hosts sistem Anda untuk membuat alias kustom untuk instance Anda.
Dua login Cloud SQL yang ada, yaitu login penyiapan dan login layanan.
Untuk membuat login, lihat gcloud sql users create.
Jika ingin menggunakan autentikasi Windows, Anda harus menggunakan Managed Active Directory untuk bergabung dengan instance SQL Server dan host yang menjalankan SSRS. Untuk mengetahui informasi selengkapnya, lihat Menggunakan Microsoft AD Terkelola dengan Cloud SQL.
Prosedur
Untuk menyiapkan SSRS di Cloud SQL, lakukan langkah-langkah berikut:
Tabel berikut menjelaskan parameter
gcloud operasi ini:
Parameter
Deskripsi
Nilai yang diizinkan
Nilai default
--setup-login
Wajib. Login yang digunakan untuk terhubung ke instance selama penyiapan SSRS. Ini adalah login pertama yang diminta di Report Server Configuration Manager saat menyetel database server laporan.
Ini harus berupa login SQL Server yang ada, seperti sqlserver
Tidak ada
--service-login
Wajib. Login SQL Server yang digunakan oleh server laporan untuk terhubung ke database server laporan selama penyiapan SSRS. Ini adalah login kedua yang diminta di Report Server Configuration Manager saat menyetel database server laporan.
Ini harus berupa login SQL Server yang ada dan harus berbeda dengan login penyiapan.
Tidak ada.
--report-database
Wajib. Nama database laporan yang ada atau baru di instance.
Karakter khusus tertentu tidak diizinkan dalam nama database laporan, seperti spasi, tanda kurung, karakter non-Inggris.
Tidak ada
--duration
Opsional. Jumlah jam masa berlaku sewa SSRS selama Anda dapat melakukan penyiapan SSRS.
Antara 1 dan 12 jam. Contoh, 4h
5 jam
REST v1
Dengan menggunakan REST API, Anda dapat memperoleh sewa SSRS pada instance. Untuk mendapatkan sewa SSRS, tentukan hal berikut:
Dua login SQL Server yang berbeda, yaitu login penyiapan dan login layanan
Nama database laporan
Durasi masa berlaku sewa
Hanya kolom DURATION yang bersifat opsional. Untuk mengetahui informasi selengkapnya, lihat
AcquireSsrsLeaseContext:
PROJECT_ID: ID project.
INSTANCE_NAME: nama instance.
SETUP_LOGIN: login SQL Server yang digunakan untuk terhubung ke instance SQL Server selama penyiapan SSRS. Ini adalah login pertama yang diminta di Report Server Configuration Manager saat menyetel database server laporan.
SERVICE_LOGIN: login SQL Server yang digunakan oleh server laporan untuk terhubung ke database server laporan selama penyiapan SSRS. Ini adalah login kedua yang diminta di Report Server Configuration Manager saat menyetel Database Server Laporan.
REPORT_DATABASE: nama database laporan yang ada atau baru di instance.
Microsoft tidak mengizinkan karakter khusus tertentu dalam nama database laporan, seperti spasi, tanda kurung, karakter non-Inggris.
DURATION: Opsional. Jumlah jam masa berlaku sewa SSRS selama Anda dapat melakukan penyiapan SSRS.
Antara 1 dan 12 jam, misalnya, 4h.
Dengan menggunakan REST API, Anda dapat memperoleh sewa SSRS pada instance. Untuk mendapatkan sewa SSRS, tentukan hal berikut:
Dua login SQL Server yang berbeda, yaitu login penyiapan dan login layanan
Nama database laporan
Durasi masa berlaku sewa
Hanya kolom DURATION yang bersifat opsional. Untuk mengetahui informasi selengkapnya, lihat
AcquireSsrsLeaseContext:
PROJECT_ID: ID project.
INSTANCE_NAME: nama instance.
SETUP_LOGIN: login SQL Server yang digunakan untuk terhubung ke instance SQL Server selama penyiapan SSRS. Ini adalah login pertama yang diminta di Report Server Configuration Manager saat menyetel database server laporan.
SERVICE_LOGIN: login SQL Server yang digunakan oleh server laporan untuk terhubung ke database server laporan selama penyiapan SSRS. Ini adalah login kedua yang diminta di Report Server Configuration Manager saat menyetel Database Server Laporan.
REPORT_DATABASE: nama database laporan yang ada atau baru di instance.
Microsoft tidak mengizinkan karakter khusus tertentu dalam nama database laporan, seperti spasi, tanda kurung, karakter non-Inggris.
DURATION: Opsional. Jumlah jam masa berlaku sewa SSRS selama Anda dapat melakukan penyiapan SSRS.
Antara 1 dan 12 jam, misalnya, 4h.
Untuk melakukan penyiapan SSRS, ikuti langkah-langkah berikut:
Buka Reporting Services Configuration Manager di host tempat SSRS diinstal.
Hubungkan ke instance server laporan lokal Anda.
Klik Ubah Database.
Masukkan nama host SQL Server yang dibuat di Cloud DNS dan kredensial login SQL Server untuk login penyiapan yang digunakan untuk sewa SSRS.
Masukkan nama database server laporan baru atau database laporan yang ada yang digunakan untuk sewa SSRS.
Masukkan kredensial login SQL Server untuk login layanan yang digunakan untuk sewa SSRS.
Klik Berikutnya dan selesaikan hingga langkah terakhir.
Jika belum ditetapkan, konfigurasikan URL Layanan Web dan URL Portal Web. Web Portal akan berhasil dimuat dalam beberapa detik.
Melepaskan sewa SSRS
Anda dapat melepaskan sewa secara manual, atau Anda dapat menunggu hingga sewa otomatis berakhir. Melepaskan sewa diperlukan untuk mengembalikan izin yang ditingkatkan yang diperlukan untuk penyiapan dan untuk mengizinkan login layanan terhubung ke database laporan.
Login layanan tidak dapat mengakses database laporan hingga masa berlaku sewa berakhir atau dilepaskan secara manual.
Perintah berikut akan melepaskan sewa SSRS.
Dengan menggunakan REST API, Anda dapat melepaskan sewa SSRS untuk instance. Seperti yang ditunjukkan dalam contoh permintaan berikut, Anda hanya perlu memberikan nama instance dan project ID.
Dengan menggunakan REST API, Anda dapat melepaskan sewa SSRS untuk instance. Seperti yang ditunjukkan dalam contoh permintaan berikut, Anda hanya perlu memberikan nama instance dan project ID.
Login Active Directory tidak didukung untuk menyiapkan database laporan.
Nama database laporan hanya boleh berisi karakter alfanumerik dan tanda hubung.
Anda harus mendapatkan sewa untuk mengubah login yang digunakan untuk terhubung ke database laporan melalui Pengelola Konfigurasi Server Laporan.
Untuk database yang diproses oleh login layanan, operasi impor file SQL dan hapus database yang direplikasi dapat gagal antara penyelesaian penyiapan SSRS dan pelepasan sewa.
Anda harus menghapus dan membuat ulang pengguna database untuk login layanan di database laporan yang diimpor. Hal ini karena pengguna yang ada di database yang diimpor bukan milik instance baru.
Saat menambahkan server laporan baru untuk deployment scale-out di SSRS, Anda harus mendapatkan dan melepaskan sewa SSRS untuk setiap VM Windows baru yang menghosting server laporan. Setiap instance Cloud SQL mengharuskan Anda mengonfigurasi database laporan baru menggunakan database laporan yang ada.
Anda harus membuat sewa baru setiap kali ingin mengubah kredensial login untuk database server laporan di Pengelola Konfigurasi Server Laporan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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."]]