This topic describes how to enable SQL Server Reporting Services (SSRS) for ApsaraDB for MyBase.

Prerequisites

  • SQL Server is selected as the engine of an ApsaraDB for MyBase dedicated cluster.
  • A MyBase for SQL Server instance of the High-availability Edition is created. The privileged account sysadmin is created for the instance. For more information, see Host permissions.
  • A bastion host is configured for the instance and the Windows server account associated with the bastion host is granted the system administrative rights. For more information, see Access a Windows host from a bastion host.
  • SSRS is available only for a primary instance.

Note

SSRS can be enabled for the ApsaraDB for MyBase for SQL Server instance of the High-availability Edition. In some cases, the SSRS service can be unavailable and unstable. For example, the service or the MyBase for the SQL Server instance is unavailable if the application for this instance fails to install or the application configuration is invalid. In these cases, the service downtime in the ApsaraDB for MyBase service-level agreement (SLA) does not include the time when the SSRS service is unavailable.

Step 1: Use a bastion host to log on to a host

  1. Log on to the ApsaraDB for MyBase console.
  2. In the upper-left corner of the page, select the region where you want to deploy the dedicated cluster.
  3. In the left-side navigation tree, click Bastion Hosts. Find the bastion host that you want to manage, and click Associate with Bastion Host in the Actions column.
    s
  4. In the Import Host step, import a host that is deployed in the dedicated cluster and create an account for the primary instance that is deployed on the host.
    Note Configure Username and Password. You must set Account Type to Administrator. Otherwise, you cannot enable SSIS.
  5. After you create an account for the primary instance, click Next to go to the Authorize Host step.
    Note For more information about how to connect to a host from a bastion host, see Access a Windows host from a bastion host.
  6. Start RDC on your local host.
  7. Enter <Bastionhost O&M address>:63389 and click Connect.
    Start RDC
  8. Enter a username and password to log on to the bastion host.
    Note Use the username and password that you specified when you created the bastion host.
  9. Find the primary instance that you want to connect, and double-click the instance name. This way, you can connect to the instance by using the Remote Desktop client on Windows.
    Note On the Instances page in the ApsaraDB for MyBase console, you can view the details about the primary instance . For more information, see View host details.

Step 2: Obtain the instance name used in the dedicated cluster

  1. Return to the ApsaraDB for MyBase console.
  2. Find the dedicated cluster that you want to manage and click Details in the Actions column.
  3. In the left-side navigation tree, click Instances. On the page that appears, find the instance that you want to manage and click the instance name to go to the instance details page.
  4. In the left-side navigation pane, click Database Connection. On the page that appears, click Log On to Database. You are redirected to the Data Management (DMS) console.
    Log on to a database instance
  5. In the dialog box that appears, click Login.
    s
  6. After you log on to the instance, you are redirected to the SQLConsole tab. Then, run the following command:
    use master
    go
    SELECT value_data FROM sys.dm_server_registry WHERE registry_key LIKE '%\MSSQLServer\SuperSocketNetLib\Tcp\IPAll' and value_name = 'TcpPort'
    go
  7. Record the return value.
    a
    Note The instance name used in the dedicated cluster is in the format of <hostname>\MS<value_data>, as shown in the preceding figure.

Step 3: Configure SSRS for your primary instance

  1. Log on to the Windows server from which you can connect to your primary instance. Then, download and install Microsoft SQL Server Management Studio (SSMS).
  2. Use SSMS to connect to the primary instance.
  3. In the window that appears, choose Server Objects > Triggers. Then, right-click _$$_tr_$$_rds_alter_database and select Disable from the shortcut menu.
  4. Configure Report Server Configuration Manager Database.
    1. On the left side of the taskbar, open the Start menu and select your SQL Server version. On the menu that appears, right-click Reporting Services Configuration Manager and choose More > Run as administrator.
      x
      Note Select the SQL Server version that you specified when you created the instance.
    2. In the window that appears, configure Server Name and Report Server Instance. Then, click Connect.
      2
      Note Set Server Name to the instance name used in the dedicated cluster. You obtained the instance name in Step 2.
    3. On the left side of the window that appears, click Database. Then, click Change Database on the right side.
      66
    4. In the Change Database window, click Action and select Create a new report server database. Then, click Next.
      x
    5. In the Change Database window, configure the parameters. Then, click Test Connection to verify that the configured parameters are valid.
      Parameter Description
      Server Name The name of the instance used in the dedicated cluster. The name is in the format of <hostname>\MS<value_data>.
      Authentication Type The authentication type. By default, SQL Server Account is selected.
      Username The username that is used to log on to the instance.
      Note In this example, the privileged account sysadmin is used to log on to the instance. For more information, see Host permissions.
      Password The password that is used to log on to the instance.
    6. On the left side of the window, click Database and configure Database Name. Then, click Next.
      Note By default, Database Name is set to ReportServer.
    7. Click Progress and Finish, retain the default settings, and then click Finish. Reporting Services Configuration Manager is configured.
  5. Configure Web Service URL for Report Server Configuration Manager.
    1. In the Report Server Configuration Manager window, click Web Service URL on the left side. After you configure and confirm the parameter settings, click Apply.
    2. Verify that the report server is configured. You can enter the URL that you configure for Report Server Configuration Manager in the address bar of your browser. If you can connect to the URL, the report server is configured.
  6. Verify that the image of the report server is built.
    1. After you configure the report server, run the following command:
      USE [master]
      
      GO
      
      ALTER DATABASE [ReportServerTempDB] SET RECOVERY FULL WITH NO_WAIT
      
      GO
      Note Set the recovery model to Full.
    2. Wait until the operation is complete.

Configure an ECS instance (optional)

If SSRS is configured and you do not want to connect to your database instance from a bastion host, you can create an Elastic Compute Service (ECS) instance. This way, you can connect to the database instance in which SSRS is enabled from the ECS instance.

  1. Log on to the ECS console.
  2. Select a region in the top navigation bar. In the left-side navigation pane, choose Instances & Images > Instances. On the page that appears, click Create Instance in the upper-right corner.
    s
    Note For more information, see Create an ECS instance.
  3. On the Custom Launch tab, complete the Basic Configurations, Networking, and System Configurations (Optional) steps. After you complete the settings, click Next.
    Note
    • In the Basic Configurations step, select a network type for the ECS instance that you created. The ECS instance and the MyBase for SQL Server instance in the ApsaraDB for MyBase dedicated cluster must be deployed in the same virtual private cloud (VPC).
    • In the Networking step, select a security group for the ECS instance that you created. The ECS instance and the MyBase for SQL Server instance in the ApsaraDB for MyBase dedicated cluster must be deployed in the same security group.
  4. In the Cloud Resource Access Authorization dialog box, click Authorized. Then, click Next to go to the Grouping (Optional) step.
  5. Click Preview and complete the subsequent operations.
  6. Return to the Instances page. You can view the IP address of the ECS instance that you created.
  7. To configure a firewall that enables access to the report server, obtain the IP address of the ECS instance that you created and submit a ticket.
  8. Verify that you can connect to the report server after the firewall is configured. The ECS instance that you configure runs the report server. On Windows, you can enter http://<IP address of the primary ECS instance>:<Port>/Reports in the address bar of your browser and enter a system administrator account and its password to connect to the report server.