Tips – Connecting to Profiler using command prompt

We all know that we can connect to the SQL Server Profile from the programs in the start menu. Following are the steps to connect in Windows 7

1. Click on Start
2. Click on All Programs
3. Click on Microsoft SQL Server 2008 R2
4. Click on Performance Tools
5. Click on SQL Server Profiler

It looks like we can connect othe SQL Server Profiler in 5 steps. Please check the screenshot below

Let us check is there any other way we can connect to the SQL Server Profiler using minimum number of steps. We have option to connect using command prompt which few will already know this. This post is for someone who does not have any idea about the other ways.

Following are the steps to connect to SQL Server Profile using command prompt

1. Press Windows button + R
2. Type cmd and press enter it opens windows command prompt
3. Type Profiler and press enter

Now you can see that you are connected to SQL Server Profiler in 3 steps. Please check the screen shot below

Along with this there are number of options that you can use to start a SQL server trace  or Analysis Server Trace.

Let us check what are the combinations that are available

Connect to the Profiler using the Windows Integrated Security

1. open Command Prompt
2. Type Profiler -E and press enter

It connects to the profiler with the Integrated security and starts the default trace. Please check the screenshot below

Connect to the Profiler and start the trace of the SQL Server

1. Open Command Prompt
2. Type Profiler -E -S <<Server Name>> and press enter

It connects to the profiler with the integrated security and start the SQL Server Trace. Please check the image below

Connect to the profiler and start the trace of Analysis Services

1. Open Command Prompt
2. Type Profiler -E -A <<Server Name>> and press enter

It connects to the profiler with the integrated security and start the Analysis server trace. Please check the image below

how do I findout what are the other options that are available?

1. Open Command Prompt
2. Type Profiler /? and press enter

Please check the image below

Hope that you enjoyed connecting to the SQL Server profiler using the command prompt.. If you have any other better way of doing it share it with me by leaving a comment..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s