tencent cloud

Feedback

Manual Creation of the Latest Blocking and Deadlock Events

Last updated: 2024-07-31 09:44:54
    TencentDB for SQL Server supports manually creating the latest blocking and deadlock events, provided the collection of blocking and deadlock events is enabled. You can immediately create and download the blocking and deadlock event files when needed. This document introduces how to manually create the latest blocking and deadlock events through the console.
    Note:
    Only Enterprise editions 2012, 2014, 2016, 2017, 2019, and 2022 support manually creating the latest blocking and deadlock events. The 2008 R2 Enterprise edition does not support this feature.
    The log time is set to Beijing Time (UTC+8) by default. If the default timezone is modified, the log data storage time will be displayed in the instance server's timezone, but the console will show Beijing Time (UTC+8).

    Operation Scenarios

    After the collection of blocking and deadlock events is enabled for TencentDB for SQL Server, the blocking and deadlock event files are collected every 5 minutes by default. That is, within every 5-minute interval, all SQL executions exceeding the collection threshold will be recorded and a file generated. You can also manually generate and download the blocking and deadlock event files immediately as needed. For example, within a log file generation cycle (every 5 minutes), if the latest log has been collected for 3 minutes, you can immediately download the generated log files for these 3 minutes using the manual creation feature.
    

    Prerequisites

    Manually Creating the Latest Blocking and Deadlock Events

    1. Log in to the SQL Server console.
    2. Select the region at the top, find the target instance, click Instance ID or click Manage in its Operation column to enter 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 will immediately cut off and upload the currently generating file that has not yet met the packaging time. For example: if the collection frequency is set to generate one log file every 5 minutes, and the latest file has only been collected for 3 minutes, clicking Create Latest Log will immediately cut off, package, and upload the current 3-minute log for the user to download. Subsequent log files will continue to be generated from the cut-off time according to the predetermined collection frequency.
    Parameter
    Description
    Log type
    The default values are blocking events and deadlock events. Currently, only simultaneous creation is supported; creating blocking events or deadlock events individually is not supported.
    Collection threshold
    SQL executions beyond the collection threshold will be recorded as Blocking SQL and Deadlock SQL. By default, the threshold here is the same as the settings when enabling blocking and deadlock events.
    Retention Period
    The default is 7 days.

    Subsequent Operations

    FAQs

    Why is the feature option for creating the latest log not clickable in the console?

    1. Your instance may not have collection of blocking and deadlock events enabled. You need to enable event collection first. Please refer to Enabling Collection of Blocking and Deadlock Events.
    2. Your instance version may be 2008 R2 Enterprise edition. Currently, only 2012, 2014, 2016, 2017, 2019, 2022 Enterprise editions support manual creation of the latest blocking and deadlock logs.

    How to modify the collection threshold?

    Due to the SQL collection threshold recorded in the manually created latest log files being related to the settings when enabling the collection of blocking and deadlock events, you can modify it in Operation Log > Operation Log Settings.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support