SQL Server Profiler Replay function

Recently I wanted to see how a server behaves running some SQL Statements parallel against a database on it. I wanted to simulate a real user session, so I decided to record a scenario locally, and run that against the server. I planed it using the Replay function of the SQL Server Profiler. For recording a “Replayable” session few settings are to be made, which differ from the Standard (default) template:

  • When starting a new trace go to the Events Selection Tab
  • Check the Show all eventscheckbox and add the following events:
    • Cursors group
      • CursorExecute
      • CursorOpen
      • CursorPrepare
    • Stored Procedures group
      • RPC Output Parameter
      • RPC: Starting
    • TSQL group
      • Exec Prepared SQL
      • Prepare SQL
  • Uncheck the Show all events
  • Check the Show all columns
  • For every event checkthefollowingcheckboxes in the grid
    • DatabaseID
    • DatabaseName

There you go. You can start then replay sessions :)

Advertisements

About Tamas Nemeth

Husband and proud father of two daughters in Nürnberg. I'm working as a Senior Software Developer and an enthusiastic Clean-Coder. I spend most of my free time with my family (playing, hiking, etc...). I also play table-tennis and badminton sometimes...
This entry was posted in Technical Interest and tagged , , , , . Bookmark the permalink.

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