Database Autonomy Service (DAS) provides the SQL Explorer and Audit feature for ApsaraDB RDS for SQL Server. The SQL Explorer and Audit feature is developed based on the full request analysis and security audit capabilities and is integrated with the search feature and the SQL Explorer feature. You can query information about SQL statements and use the information to troubleshoot various performance issues.
Prerequisites
DAS Professional Edition is purchased by using your Alibaba Cloud account. For more information about how to purchase DAS Professional Edition, see Purchase DAS Professional Edition.
The RDS instance runs one of the following RDS editions and resides in one of the following regions.
RDS edition
Region
RDS High-availability Edition and RDS Cluster Edition
China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), China (Zhangjiakou), China (Hohhot), China (Chengdu), China (Guangzhou), China (Heyuan), China (Ulanqab), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta)
If you use the credentials of a RAM user to use the search feature, make sure that the AliyunRDSReadOnlyWithSQLLogArchiveAccess policy is attached to the RAM user. For more information about how to grant permissions to a RAM user, see Use RAM to manage ApsaraDB RDS permissions.
NoteYou can also create a custom policy to grant the RAM user the permissions to use the search feature, including the log export feature. For more information, see What do I do if I do not have permissions to access DAS as a RAM user?
Billing rules
For more information, see Billing.
After the SQL Explorer and Audit feature is enabled, ApsaraDB RDS stops billing for the SQL Audit feature. The fees that you must pay for the SQL Explorer and Audit feature are billed to DAS Professional Edition. For more information, see Use the SQL Audit feature on an ApsaraDB RDS for SQL Server instance.
Features
Search: This feature is used to query and export the SQL statements that are executed and the information about the SQL statements. The information includes the database, status, and execution duration of each SQL statement.
SQL Explorer: This feature is used to diagnose the health statuses of SQL statements, troubleshoot performance issues, and analyze business traffic.
Enable SQL Explorer and Audit
- 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 of the page that appears, choose Autonomy Service > SQL Explorer and Audit.
If the SQL Explorer and Audit feature is disabled, click Enable. In the dialog box that appears, click Enable Professional Edition.
NoteIf the page that appears contains the Search and SQL Explorer tabs, the SQL Explorer and Audit feature is enabled.
Use the search feature
- 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 of the page that appears, choose Autonomy Service > SQL Explorer and Audit.
On the page that appears, click the Search tab. Then, specify the search conditions based on which you want to query the relevant information. For more information about the Search feature, see Search.
You can click Export and configure the Exported Fields parameter to export logs. You can configure the Export Time Range parameter based on your business requirements to export logs generated in a large time range.
Use the SQL Explorer feature
- 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 of the page that appears, choose Autonomy Service > SQL Explorer and Audit.
On the page that appears, click the SQL Explorer tab. Then, view the relevant information of the RDS instance. For more information about the SQL Explorer feature, see SQL Explorer.