optimization and monitoring of SQL (SQL Server Profiler)

Source: Internet
Author: User
Tags how to use sql server how to use sql management studio sql server management sql server management studio

0. Introduction

SQL Server Supply number Daquan SQL stalking and things told to oversee the database engine in the Seizure keyword mining tool.

By documenting what you specify, SQL stalking can help you deal with functional questions, review database activity, collect sample data for test environments, debug Transact-SQL sentences and stored processes, and collect data for utility profiling. SQL stalking can be visited through SQL Server Profiler (a graphical user interface) or a transact system stored process entered at the command line.

When it runs, SQL Stalker captures things when things happen in the database engine. The thing you capture is an instance of the class that you choose to supervise in a process called a trace. Each thing class contains one thing title and multiple data columns (used to describe the characteristics of the class of events that occur under a particular situation). When a certain thing in the event class is in the stalking, the SQL stalker will record the title and the relevant data into the stalking file.

Typically, SQL Server Profiler is used to call for the use of SQL stalking. You can also use the Transact-SQL system storage process to pay a visit. SQL Server Profiler is able to use all of the things that SQL is stalking to capture functionality and to increase the ability to keep track of table information, retain the tracking definition as a template, get query scenarios and deadlocks as a separate XML file, and replay the stalking results for diagnosis and optimization.

Things tell you to send information about many of the same things that SQL stalking captures to service Broker service. But something tells you that unlike stalking, it can be used to echo things within SQL Server fulfillment operations. Because things tell asynchronous fulfillment, these operations do not occupy any capital of immediate business definition.

The following topics explain how to use SQL Server Profiler, SQL stalking, and things to tell to monitor things.

Introduction to SQL Server Profiler

SQL Server Profiler is something that is used to capture SQL Server things from an efficient Laure. Things remain in a stalking file, which can be parsed in the future, and used to replay a series of steps in an attempt to diagnose a doubt. SQL Server Profiler is used in the following activities:

Gradually analyze queries in question to find the cause of the doubt.

Find and diagnose slow-running queries.

Capture a series of Transact-SQL sentences that cause a doubt. Then use the retained stalking to copy the question on a test server, and then confirm the question on the test service.

Oversee the function of SQL Server to optimize the job load. For information about optimizing physical database planning for database job loads, see Database Engine Tuning Staff overview.

Make a function counter relevant to a confirmed question

SQL Server Profiler also supports reviewing operations performed on instances of SQL Server. Review will record security-related operations for future review by security administrators.

How to create stalking

On the File menu, click New Stalking, and connect to the instance of SQL Server. At this point, the "Stalking feature" dialog box appears.

In the "Stalking title" box, type the title of the stalking.

In the "Apply Template" list, pick a stalking template for this, and if you don't want to use the template, choose "blank".

To preserve the stalking results, perform one of the following actions:

Click "Keep to File" to capture the stalking to the file. Specify a value that sets the maximum size of the file. The default value is 5 MB. Perhaps, choose "Enable file rollover update" to facilitate the file size to reach the maximum value when the initiative to create a new file. It is also possible to select the "service-handling stalking data", which is handled by a running-tailed service rather than a client application to dispose of the stalking data. When the service device is disposing of the data, it will not cross things even under stressful conditions, but the function of the service device may be affected.

Click Keep to table to capture the stalking into the database table.

If necessary, you can click Set maximum number of rows and specify a value.

Optionally, select the Enable Stalking Abort check box, and then specify the date and time of the abort.

To add or delete a thing, data column, or picker, click the Things to Pick tab. For more information, see: How to specify things and data columns for stalking files (SQL Server Profiler)

Click "Run" to start the stalking function.

Pay attention

If you do not keep the stalking results in a file or table, you can check for stalking when the SQL Server Profiler is opened. However, after aborting the tail and enclosing the SQL Server Profiler, the stalking results are lost. To prevent this loss of stalking, you can preserve results by clicking Hold on the File menu before enclosing SQL Server Profiler.

Optionally, select the Enable Stalking Abort check box, and then specify the date and time of the abort.

To add or delete a thing, data column, or picker, click the Things to Pick tab. For more information, see: How to specify things and data columns for stalking files (SQL Server Profiler)

Click "Run" to start the stalking function.

In SQL Server 2008, you can use the expansion to get rid of functional questions. Expanding things can deepen the exploration of SQL Server's internal workings, and can be used in complex fault-sweeping situations. For more information, see SQL Server to expand your business.

Topic clarified

An introduction to SQL Stalking illustrates how SQL stalking works and how to use a stored process to create a stalking.

An introduction to SQL Server Profiler illustrates how to use SQL Server Profiler for stalking.

The function of optimizing practical things and things introduces the service that can improve the function of utility and things through optimization.

Optimize the function of the service to clarify how to optimize SQL Server to improve the function of the service device.

Things to tell about how things are told and how to use things to tell and monitor and echo databases and service things

Use SQL Server Management Studio Oversight to clarify how SQL Server Management Studio is used to oversee SQL Server functionality.

Monitoring the Fault log illustrates how SQL Server fault logs and Microsoft Windows application logs are used to oversee SQL Server activity.

Use Transact-SQL sentence supervision to clarify how to use Transact-SQL sentences to supervise SQL Server instances.

See

SQL Server Things class see

-Indexread arguments from command-line "http://www.shoudashou.com"

-Indexread arguments from command-line "http://www.4lunwen.cn"

-Indexread arguments from command-line "http://www.zx1234.cn"

-Indexread arguments from command-line "http://www.penbar.cn"

-Indexread arguments from command-line "http://www.whathappy.cn"

-Indexread arguments from command-line "Http://www.lunjin.net"

-Indexread arguments from command-line "http://www.ssstyle.cn"

-Indexread arguments from command-line "http://www.91fish.cn"

-Indexread arguments from command-line "http://www.fanselang.com"

Other capital

Things to tell (Database engine)

Assistance and information

Get SQL Server 2008 assistance

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.