This topic explains how to use a host account to log on to an ApsaraDB RDS for SQL Server instance host. After you log on to the host, you can use SQL Server Reporting Services (SSRS) to manage and operate SQL Server databases.
Background information
The ApsaraDB RDS for SQL Server WebShell feature lets you log on to the operating system of an RDS SQL Server instance through a web interface. You can then perform operations such as running commands and transferring files. WebShell provides a convenient way to manage and maintain your instance, especially when an SSH client is unavailable.
SQL Server Reporting Services (SSRS) is an enterprise-level reporting service from Microsoft. It helps you generate various types of reports, such as tables, charts, matrices, and multidimensional reports, from SQL Server databases and other data sources. You can connect SSRS to an ApsaraDB RDS for SQL Server database and use it as a data source to generate various reports. This integration helps enterprises and users manage and analyze data more efficiently to support business decisions.
Scenarios
Assume that you are a database administrator for a small or medium-sized enterprise, responsible for managing the company's SQL Server databases. As the business grows, database traffic increases. To better manage and optimize the database, you need to use SSRS to analyze and monitor the database. However, you cannot log on to the host directly because it is not on-premises.
You can then use the ApsaraDB RDS console to create a host account and log on to the RDS SQL Server instance host through WebShell. After you log on to the host, you can use SSRS to easily manage and operate your SQL Server database and monitor its status to better support your business.
Prerequisites
-
The RDS for SQL Server instance must meet all of the following requirements:
Requirement Supported Not supported Instance edition Basic Edition, High-availability Edition (SQL Server 2012 and later), Cluster Edition -- Instance type General-purpose, Dedicated Shared Billing method Subscription, pay-as-you-go Serverless Network type Virtual private cloud (VPC) Classic network -
Log on to the console with an Alibaba Cloud account, not a RAM user.
-
A System Admin account has been created on the User Account tab.
-
A host account of the System Admin Account type has been created on the Host Account tab.
Impacts
The System Admin account used in this topic has the highest privileges for the SQL Server database, and the host account has the highest privileges for the host. Because operations performed by these accounts are beyond the control of ApsaraDB RDS for SQL Server, an RDS SQL Server instance is no longer covered by the SLA after such an account has been created. The operating environment of the instance is managed by you. However, the normal use of the instance and after-sales support are not affected. Instances for which this type of account has not been created remain fully covered by the SLA.
Step 1: Log on to the host via WebShell
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the left-side navigation pane, click Accounts.
-
Click the Host Account tab. In the Actions column of the target account, click Remote Connection (Primary).
-
In the Remote Connection dialog box, enter the host account's password.
-
Click OK.
After clicking OK, the system generates a WebShell logon URL and automatically logs you on to the SQL Server instance host. A new WebShell page opens in a pop-up window. If your browser blocks pop-ups, allow pop-ups from this site to ensure the page displays correctly.
After a successful logon, a Windows desktop environment appears with Recycle Bin and Cygwin64 Terminal shortcut icons in the upper-left corner. This indicates a successful connection to the SQL Server instance host.
Step 2: Configure and use SSRS
Prerequisites
Before you configure SSRS on the SQL Server host, make sure the SQL Server Reporting Services (MSSQLSERVER) service is enabled and running. To view or modify the SSRS service status, see View or modify the SSRS service status.
Confirm that the service's Log On As account is set to an NT Service account.
Considerations
For High-availability Edition or Cluster Edition instances, SSRS configuration may fail because the database is in a mirroring or Always On availability group state. If this issue occurs, use a System Admin account to log on to the SQL Server instance and run the following commands to resolve the issue.
RDS instances regularly set up mirroring or availability groups. You may therefore encounter multiple configuration errors during SSRS setup. Each time a configuration error occurs, you must log on to the SQL Server instance with a System Admin account and run the following commands to resolve it.
-- For High-availability Edition instances (turn off database mirroring)
ALTER DATABASE [ReportServer] SET PARTNER OFF;
ALTER DATABASE [ReportServerTempDB] SET PARTNER OFF;
-- For Cluster Edition instances (remove databases from the ag-rds availability group)
ALTER AVAILABILITY GROUP [ag-rds] REMOVE DATABASE [ReportServer];
ALTER AVAILABILITY GROUP [ag-rds] REMOVE DATABASE [ReportServerTempDB];
These operations ensure that SSRS can be configured and run properly. For Cluster Edition instances, to ensure high availability and normal backup and recovery, after the SSRS configuration is complete, use a System Admin account to log on to the SQL Server instance and run the following commands to add the databases back to the availability group.
ALTER AVAILABILITY GROUP [AG-RDS] ADD DATABASE [ReportServer]
ALTER AVAILABILITY GROUP [AG-RDS] ADD DATABASE [ReportServerTempDB]
Procedure
-
Log on to the SQL Server instance with a System Admin account and run the following command.
DISABLE TRIGGER [_$$_tr_$$_rds_alter_database] ON ALL SERVER;NoteFor information about how to connect to an SQL Server instance, see Connect to an ApsaraDB RDS for SQL Server instance.
-
Click the Start icon
>Reporting Services Configuration Manager. -
In the dialog box that appears, confirm the report server name and click Connect.
In the Report Server Instance drop-down list, confirm that the instance is MSSQLSERVER.
NoteIf your RDS SQL Server instance is a High-availability Edition or Cluster Edition instance, the connection may fail due to database mirroring or availability groups. If this issue occurs, see Considerations in this topic.
-
In the left-side navigation pane, configure Service Account and Web Service URL.
NoteFor more information about the configuration methods, see the official Microsoft documentation.
-
In the left-side navigation pane, select Database, and then click Change Database to create a report server database on the host.
-
Select Create a new report server database and click Next.
-
Confirm the server name, configure the following parameters, and then click Next.
Parameter
Description
Server Name
The server name. This is a fixed value and does not need to be modified.
Authentication Type
Select SQL Server Account.
Username
Enter the username of the System Admin account that was created on the User Account tab of the RDS SQL Server instance.
Password
Enter the password of the System Admin account on the User Account tab.
-
Enter a name for the report server database, select a language, and then click Next.
In the Database Name field, enter
ReportServer. From the Language drop-down list, select Chinese (Simplified, PRC). -
Set the credentials for the account to connect to the report server and click Next.
-
Confirm the summary, click Next, wait for the report server database to be created, and then click Finish.
-
-
Log on to the SQL Server instance by using a System Admin account and run the following commands.
USE [master] GO -- Change the recovery model of the database to FULL and use the NO_WAIT parameter to make the change take effect immediately. ALTER DATABASE [ReportServer] SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE [ReportServerTempDB] SET RECOVERY FULL WITH NO_WAIT GO -- Enable a specific trigger on all databases on the server. ENABLE TRIGGER [_$$_tr_$$_rds_alter_database] ON ALL SERVER; -
Subsequent operations, such as creating a data source, depend on your business requirements. For more information, see the official Microsoft documentation or Report Builder in SQL Server.
View or modify SSRS service status
-
Log on to the SQL Server host. In the search box, enter
services.mscto open the Services window. -
In the Services window, check the status of
SQL Server Reporting Services (MSSQLSERVER).Confirm that the service's Status is Running, its Startup Type is Automatic, and its Log On As account is NT Service\....
NoteSSRS startup types:
-
Manual: The service must be started manually. It does not start automatically when the system starts.
-
Automatic: The service starts automatically when the system starts.
-
Automatic (Delayed Start): The service starts automatically a short time after the system starts.
-
Disabled: The service is disabled and cannot be started.
-
-
(Optional) Configure and start the SSRS service.
-
Double-click the service. In the dialog box that appears, modify the Startup type.
Set it to Automatic, and then click OK.
-
Right-click the service and click Start.
-
Check the SSRS service status again.
Confirm that the Status of the SQL Server Reporting Services (MSSQLSERVER) service is Running and the Startup Type is Automatic.
-