Explore the Statements and Parameters Passed to SQL Server

To find out what statements are running in SQL Server and what parameters have been passed, use SQL Profiler. This tool is included when you install SQL Server Management Studio.

Access SQL Profiler by going to Start ?All Programs ?SQL Server 2005 ?Performance Tools ?SQL Server Profiler. Click the “New Trace” button, connect to the chosen SQL Server and click “Run.” You will see a table with all the events in the server, including any statements and parameters you pass from web and WinForms applications.

For example, suppose you are having problems with a stored procedure that you execute from an application, and you can’t figure out what is going on. SQL Profiler can help you find out exactly what parameters are being passed and even if the stored procedure is executing.

If your SQL Server is being used for many different applications, you will see the event table grow very rapidly and it may be hard to find the exact statement and application that you need. The solution is that when you create the trace, click the Events tab and then the Filter button. Next, enter the neccesary values. Using the SPID, run the trace without any filters, execute something from the application very quickly, and click the Stop button to stop the Trace. Look for the statement you need and find out the exact SPID. When you run the trace again, use that SPID to filter your results before starting the trace.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may