tencent cloud

Log-Related
Last updated:2026-02-02 12:11:48
Log-Related
Last updated: 2026-02-02 12:11:48

What is the slow query collection threshold in TencentDB for SQL Server?

The default slow query collection threshold in TencentDB for SQL Server is one second. SQL statements whose execution duration exceeds one second will be recorded into slow logs.

Is the Slow Query Collection Threshold for TencentDB for SQL Server Modifiable?

The default threshold for slow query collection in TencentDB for SQL Server is 1,000 milliseconds. It can be modified via the console. For detailed operations, see Querying and Downloading Slow Query Log.

Do Slow Query Logs in TencentDB for SQL Server Occupy User Space?

Slow queries in TencentDB for SQL Server do not occupy user storage space.

Can TencentDB for SQL Server View the Slow SQL Table?

You can log in to the SQL Server console, go to the instance list, click the instance ID, and enter the slow query log page to Querying and Downloading Slow Query Log. The slow SQL table in TencentDB for SQL Server is not open to the public by default. You can use SSMS to connect to the instance and view it yourself. If you have insufficient permissions, please submit a ticket to apply for elevated database account permissions.

How to Analyze Slow SQL in TencentDB for SQL Server?

You can log in to the SQL Server console, go to the instance list, click the instance ID, and enter the slow query log page. For details, see Querying and Downloading Slow Query Log. Download slow logs in the console. The downloaded slow log files are in xel format. Use SSMS to open xel files to view specific slow SQL. If you need to optimize slow SQL, copy the slow SQL, enable the execution plan to see the specific execution plan, and optimize the slow SQL based on this execution plan. For details, see Display an Actual Execution Plan.

Is the Transaction Log of TencentDB for SQL Server Automatically Cleaned?

The transaction logs of TencentDB for SQL Server are automatically cleaned up every 10 minutes.

Does TencentDB for SQL Server Support Viewing the Audit Log?

TencentDB for SQL Server does not currently support viewing audit logs.

Does TencentDB for SQL Server Support Viewing Error Logs?

TencentDB for SQL Server currently does not support viewing error logs in the console. You can directly check the instance's logs via SSMS.

How to Obtain Error Logs for TencentDB for SQL Server via Command?

Log in to the SQL Server client and execute the following query in the query window to view the error logs.
Exec master.sys.sp_readerrorlog FileID,LogType,FilterText
FileID: The log file number of the Error Log, where 0 indicates the most recent log.
LogType: Log type. A value of 1 indicates that the queried log type is error logs, and a value of 2 indicates that the queried log type is Agent logs.
FilterText: Query keyword, which can be NULL.
Example:
exec master.sys.sp_readerrorlog 0,1,'error'

What Types of Operation Logs Can Be Viewed in the Console for TencentDB for SQL Server?

TencentDB for SQL Server allows you to view slow query logs, blocking events, deadlock events, and primary/replica switch logs via the console.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback