You can user SQL Server Profiler. It will be installed on the server or anywhere you have SQL Sever Management Tools installed. Normally something like this:
"C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\PROFILER.EXE"
- Start SQL Profiler
- Enter the server info, click Connect
- Choose a template. I suggest you choose "Duration" because by default it only logs commands that have completed.
- Click RUN.
- Click around in your application and you'll see your SQL statements execute.
If there's a lot happening on your server. You will see a TON of stuff go by and realize it's too much to comprehend. So my suggestion is:
- Update your connection string to include:
"Application Name=MyAppNameHere;"
- Before Step 4, go under the "Events Selection" tab.
- Check "Show all columns"
- Place a checkmark under "ApplicationName"
- Click "Column Filters" button
- Select "Application Name" on left.
- under "Like" enter "MyAppNameHere".
- Click Run
Now when you click around in your application it will only log things that you are doing.
You can have this data dropped to a table or a file or you can just look at what is outputted to the screen.
You may find it's helpful to add other columns or events.