SQL Server black Box tracing--Introduction

Source: Internet
Author: User

SQL Server black Box Tracking--Introduction

Problem Description:

Have you ever encountered these problems: A query caused SQL Server to crash, or the server was unavailable because the CPU soared to 100%?

Solution:

SQL Server provides another out-of-the-box background trace that is the black box trace (Blackbox traces). This trace is designed to resemble a black box on an airplane, and a SQL Server black box is a record of running data. The black box records all queries sent to SQL Server, as well as useful records of similar error messages, to help diagnose intermittent server crashes, or to know what errors occurred before the CPU soared.

What events did it track?

It is larger than the default trace and contains the following information:

    • The execution of the stored procedure "sp:starting".

    • T-SQL Executes "sql:batchstarting".

    • Error and warning events "Exception" and "Attention".

For these events, the following information is tracked:

    • Query or error message executed

    • Log and time of execution

    • User who executes a query or stored procedure

    • The database in which the event occurred

    • The server or workstation that sent the query or caused the error

    • Application name that implements the query


The black box is written to the 128K block file. In other words, when you start a black box until it has 128K of valuable data written, it is always 0K. This architecture makes it a very efficient process and uses a minimum of CPU resources. So, we can run it in a lot of time, without worrying that it will degrade server performance. If you stop the SQL Server service, SQL Server will write the data in the cache to this trace file.

This article is from the "Dripping Stone Wear" blog, please be sure to keep this source http://ultrasql.blog.51cto.com/9591438/1582870

SQL Server black Box tracing--Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.