TencentDB for SQL Server enables the collection of blocking events and deadlock events by default. When log data for blocking events and deadlock events is generated, you can manually create and download the latest blocking events and deadlock events. This document describes how to manually create and download the latest blocking and deadlock events in the console.
Note:
Only SQL Server 2012 Enterprise and later editions support manually creating the latest blocking and deadlock events. SQL Server 2008 R2 Enterprise does not support this feature.
The log time defaults to Beijing time. If the default time zone is modified, the storage time of log data will be displayed in the time zone of the instance server, while the console will show Beijing (UTC+8) time.
Scenarios
Log data for blocking events and deadlock events in TencentDB for SQL Server generates a file each time it accumulates to 10 MB. The maximum size of a single file is fixed at 10 MB, and the time span for generating a single file is not fixed but depends on the speed at which logs are generated. You can generate blocking event and deadlock event files immediately when needed and when log data is already available. For example, if the latest log data has reached 5 MB within the 10 MB limit of a single file, you can use the feature of manually creating the latest blocking and deadlock events to download this 5 MB log file immediately.
Manually Create Latest Blocking and Deadlock Events
2. Select a region at the top, find the target instance, click Instance ID or click Manage in its Operation column to go to the instance management page.
3. On the instance management page, select the Operation Log tab.
4. Click Create Latest Log.
5. In the pop-up window, click Save.
Note:
Creating the latest log immediately cuts off, packages, and uploads the file that is still being generated and has not met the packaging time. Specifically, the collection frequency is to generate a log file each time 10 MB is accumulated. If the latest file has only collected 5 MB, clicking "Create Latest Log" immediately cuts off, packages, and uploads the current 5 MB log for download. Subsequent log files continue to be generated from the cut-off time according to the specified collection frequency.
|
Log Type | By default, both blocking events and deadlock events are supported. Currently, you can only create both types together; creating blocking events or deadlock events separately is not supported. |
Collection Threshold | Executed SQL statements that exceed the collection threshold are recorded as blocked SQL statements and deadlock SQL statements. |
Retention Period | By default, it is 7 days. |
Subsequent Operations
FAQs
Why Can't I Click the Create Latest Log Feature Option in the Console?
1. Your instance may not have generated any blocking event or deadlock event log data.
2. Your instance may be running SQL Server 2008 R2 Enterprise. Only SQL Server 2012 Enterprise and later editions support manually creating the latest blocking event and deadlock event logs.
How Do I Modify the Collection Threshold?
You can make modifications in Operation Log > Operation Log Settings.