SQL Server Profiler You can detect statements executed on data , In particular, some items are not directly used sql sentence , Use it directly ORM The system of framework deals with the project of database , In the debug sql When the sentence is , It helped a lot .
I wrote about using SQL Server Profiler Articles that track deadlocks 《SQL Server Profiler Track database deadlocks 》, Simply write here SQL Server Profiler Functions commonly used in the process of use .
Use here SQL Server 2008 R2 edition
1. In the installation SQL Server Database time , Please ensure that SQL Server Profiler, By default, all installations will be automatically installed .
2. open SQL Server Management Studio, In the menu , find “ Tools ” menu , find SQL Server Profiler A menu item , As shown in the figure below .
3. choice “ Event selection ”, Check the commonly used items , As shown in the figure below .
4. choice “ Show all columns ”, Then in the list , Check “DatabaseName” term .
5. Set filter , The setting here is only to filter the database name , Because if there are multiple databases in a database instance , Then do not filter the database name , Then all execution statements on the database can be monitored .
You can also set Duration, Filter for different execution times sql sentence , For example, you can filter those that take a long time to execute sql sentence , Choice can optimize sql sentence .
If the same database , Multiple person access , What should I do if I just want to detect my own statements ? You can create a database account for your own login to the database ( This user can be deleted after detection ), after , stay LoginName In the filter , Filter the database account you log in .
Click... After setting 【 function 】 Start monitoring , The monitoring screen is as follows .
For the content of monitoring , It can be saved , On the monitoring interface 【 file 】 The menu , Choose Save as , Select the format you want to save , Next time, if you want to see the data , You can directly open the saved file .
Database monitoring sql More related articles on execution
- The powerful tool of Alibaba database performance diagnosis ——SQL Execute intervention
summary In business database performance problem diagnosis , If you find that a business performance is very poor, you should follow some SQL of , The application connection pool is almost SQL completely fill , At the same time, the database server is also overwhelmed . It's an emergency , Business changes SQL It's too late to redistribute , Operation and maintenance can choose ...
- SQLCLUSTER sql Database monitoring tools
SQLCLUSTER sql Database monitoring tools
- The cursor traverses all the databases and circulates to modify the database sql command
MSSQL There are many similar databases on the database server , We need to modify some tables or commands in these databases , Then you think of traversing with a cursor . Let's start with ideas : 1, First of all, you need to query all the databases : select [name] f ...
- OCM_ Day 15 course :Section6 —》 Database performance tuning _SQL Visit suggestions /SQL Performance Analyzer / Configure baseline template /SQL Executive plan management / Instance restrictions
notes : This is the original work ( The content comes from Tengke education training class ). The following are the precautions for reading this article : 1: Please indicate the source of all articles . 2: This article shall not be used for commercial purposes . Violators will bear corresponding legal liabilities . 3: List of articles in the series : One :&l ...
- SQL monitor :mysql And mssql database SQL Perform process monitoring audit
Reprint Seay_ Master There has been a big change in life recently , So the blog has been shelved for a long time , It seems that blogging has become a habit , There is a sense of crisis when you put it aside for a period of time , I always feel uncomfortable . So from today on, we should continue to pick up the ink pen ( keyboard ), Go on good ...
- C# Retain 2 A summary of several scenarios The cursor traverses all the databases and circulates to modify the database sql command Native js A case study of roulette lottery ( Lucky draw ) javascript Medium typeof And type judgment
C# Retain 2 A summary of several scenarios scene 1: C# Retain 2 Decimal place ,.ToString("f2") It can , But if the number is three decimal places, for example 1.253, Then after transformation, it will become 1.2 ...
- The database cannot be locked with an exclusive lock , To perform the operation . (Microsoft SQL Server, error : 5030)
ALTER DATABASE Test_DB modify name = Howie -- Change database name EXEC sp_renamedb 'Howie' , 'Howie_Wee' -- Change database name ...
- mysql database SQL Execution Analysis , Necessary analysis before optimization
summary Usually we are right mysql Optimize the database , It must be slow sql Only by doing analysis can we start optimization , So what is the method of analysis ? Let's go through the following sql Analyze the execution time and execution situation . One .SQL Execution time analysis By finding the one that takes a long time to execute ...
- AX2012 ERP “ Slow system ” tuning --- track SQL perform , Optimize the code
For users , System is : Slow , Hard to use . You see xxx, How easy to use , How fast , More human . about AX ERP The system is no exception , Tuning is a must , There are several types of tuning : Systematic monitoring is aimed at improving bottle strength , Such as : user -- application server --DB-- ...
- A simple one SQL To perform more than 1000ms, what ?
It is necessary to read this article 2.8 minute . MySQL Said to me, “Too young, too naive!" ▌ About the process In the test environment Docker In the container , When calling services across processes ,A Application passed Du ...
Random recommendation
- SharePoint 2010 Survey Of Export to Spreadsheet Why is the function missing ?
Background information : Recently, the user reported a problem , Said he created Survey Export the results to Excel file (Export to spreadsheet) The button for is missing . Reasons for screening : Under normal circumstances , This function only exists in SharePo ...
- CRLF line terminators Lead to shell Script error :command not found
Linux and Windows The end of line flag of text file is different . stay Linux in , For text files "/n" Indicates enter to wrap , and Windows use "/r/n" Indicates enter to wrap . Sometimes in Wind ...
- Regular expressions :Pattern Class and Matcher Class explanation
One . The concept of capture group Capture groups can be numbered by counting their open brackets from left to right , The number is from 1 At the beginning . for example , In the expression ((A)(B(C))) in , There are four such groups : 1 ((A)(B(C))) 2 (A) 3 ...
- MySQL_ On the nested table calculation can not be 20161205
Calculating the index of summation class , You don't need nested tables , For example, calculate the order amount of each city's product classification . If you want to calculate indicators that are not repeated For example, a user has multiple orders in one day Use this table to calculate how many users place orders a day This user must be de duplication Placing multiple orders should also be considered ...
- require and include The difference between
require How to use it is like require("MyRequireFile.php"); . This function is usually placed in PHP At the front of the program ,PHP Before the program is executed , You read in first require ...
- SQL Table variables and temporary tables
SQL Table variables and temporary tables Table variables : Stored in memory , Scope is during the execution of a script , After the script is executed, the memory is released , It is suitable for data sets with small amount of memory in a short time . advantage : Flexible use , Release immediately after use , No physical storage shortcoming : ...
- swat Mainstream domain files (file.cio) Parameters, —— To quote http://blog.sciencenet.cn/blog-922140-710636.html
% file.clo, The mainstream domain file is used for file management , Include options with the model . Climate input . Database and output control related information . Master Watershed File: file.cio Project Descript ...
- Detailed explanation of file permissions and directory permissions (rwx)
[ file ] r: Can be read , have access to cat Command view file content : w: Can write , You can edit or delete files : x: Executable , It can be submitted to the kernel as a command [ Catalog ] r: You can execute... On this directory ls, List all internal files w: You can create files in this directory ...
- Ants( thinking )
Ants Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 12893 Accepted: 5637 Description ...
- python String splicing
str1 = 'abc' str2 = 'def' str3 = str1 + str2 print(str3) This method only needs to apply for memory once .