Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home SQL Server How To Check Which Stored Procedures Or SQL Commands Are Running On SQL Server

How To Check Which Stored Procedures Or SQL Commands Are Running On SQL Server

In Microsoft SQL Server, there is a tool called SQL Server Profiler which allow to capture and see which Stored procedures or SQL statements are called or submitted to your SQL Server. It’s very useful while you’re developing your application in debugging mode on your staging environment or to see which Commands are affecting your server’s performance with slow queries or executions on production server.

Using SQL Server Profiler, you can do the following:

  • Create a trace that is based on a reusable template
  • Watch the trace results as the trace runs
  • Store the trace results in a table
  • Start, stop, pause, and modify the trace results as necessary
  • Replay the trace results

To run the SQL Server Profiler, you can follow either of methods below:

1. From Start Menu

Click Start menu => go to All Programs => Microsoft SQL Server 2008 R2 (it may be Microsoft SQL Server 2008 on your box) => Performance Tools => SQL Server Profiler

Start SQL Server Profiler From Start Menu

Start SQL Server Profiler From Start Menu

2. From Microsoft SQL Server Management Studio

Open the SQL Server Management Studio from your shortcut or Start menu then go to Tools and click on SQL Server Profiler.

Start SQL Server Profiler From Management Studio

Start SQL Server Profiler From Management Studio

Start tracing Stored Procedures and SQL commands

After start the SQL Server Profiler, click on the New Trace icon on the top-left menu or go to File menu then click on New Trace … sub menu. It will display a Connect to Server box, simply enter login detail to a SQL Server instance you want to connect and click Connect button.

New Trace and Login to SQL Server Profiler

New Trace and Login to SQL Server Profiler

After logged in to your SQL Server, it will display the Trace Properties box. On General tab, you can specify some information such as Name, Save to file or Time to stop your tracing,etc. Let’s ignore this step, I usually focus on Events Selection tab. As we want to trace and check which stored procedures and sql commands are running behind our application so, let un-check the options Audit Login, Audit Logout and ExistingConnections then click Run button to see what’s running behind the sense.

SQL Server Profiler Events Selection

SQL Server Profiler Events Selection

There are a lot of options and configurations you should play around, that’s all I need for my daily works. Hope it’s useful for you.

May 5, 2011Hoan Huynh
Get Or Read AppSettings Item Value From The Web.Config FileHow To Filter DataBase Name And Login Username In SQL Server Profiler
You Might Also Like:
  • How To Filter DataBase Name And Login Username In SQL Server Profiler
  • How To Check And Start An Application If It Is Not Running In Windows
  • Capture And Display Execution Time Of SQL Query In SQL Server
  • Export/Import Data From Local Database To Remote Database With MS SQL Server 2008
  • Consider SQL Server Express 2008 Limitations
  • Free Mysql Profiler similar to Microsoft SQL Server Profiler – LogMonitor
  • Install ASP On Microsoft Windows Server 2008 IIS 7.0 and IIS 7.5
  • ASP.NET Store Session In MS SQL Server Database
  • Check Up Time In Windows Server 2008 – 7 – Vista – XP
  • Free Web Admin For Microsoft SQL Server And Oracle – 1ClickDBPro
Hoan Huynh

Hoan Huynh is the founder and head of 4rapiddev.com. Reach him at [email protected]

11 years ago SQL ServerHow To, SQL Server Profiler756
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
24,542 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
21,885 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
17,736 views
JQuery Allow only numeric characters or only alphabet characters in textbox
15,059 views
C# Read Json From URL And Parse/Deserialize Json
11,789 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • Things to Learn about Installingderm Loan Type S
  • Online Photo Editor – Free Photoediting Software
  • A Guide to Finding the Best Paper Sellers
  • Photoediting in Home Isn’t Hard to Do!

  • Free Photo Editor Online
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (27)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (647)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development