9.1 Creating a New SQL Trace

Table of Contents Previous Next


9 SQL Profiling and Analysis : 9.1 Creating a New SQL Trace

SQL Profiler captures and displays a specific SQL workload for analysis in a SQL trace. You can start and review captured SQL traces immediately, or save captured traces for review at a later time. You can use SQL Profiler to create and store up to 15 named traces; use menu options to create and manage traces.
You can use the Create trace... dialog to define a SQL Trace for any database on which SQL Profiler has been installed and configured. installed and configured. To access the dialog, highlight the name of the database in the PEM client tree control; navigate through the Management menu to the SQL Profiler pull-aside menu, and select Create trace....
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\10287ac6\sp_create_new_trace.png
Use the fields on the Trace options tab (see Figure 9.1) to specify details about the new trace:
Click in the User filter field to specify the roles whose queries will be included the trace; optionally, check the box next to *Select All* to include queries from all roles.
Click in the Database filter field to specify which databases to trace; optionally, check the box next to Select All to include queries against all databases.
Specify a trace size in the Maximum Trace File Size field; SQL Profiler will terminate the trace when it reaches approximately the size specified.
Specify Yes in the Run Now field to start the trace when you select the Create button; select No to enable fields on the Schedule tab.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\149132e7\sp_create_new_trace_schedule.png
Use the fields on the Schedule tab (see Figure 9.2) to specify scheduling details for the new trace:
Use the Start time field to specify the starting time for the trace.
Use the End time field to specify the ending time for the trace.
Specify Yes in the Repeat? field to indicate that the trace should be repeated every day at the times specified; select No to enable fields on the Periodic job options tab.
C:\Users\susan\AppData\Local\Temp\vmware-susan\VMwareDnD\4b67997b\sp_create_new_trace_periodic_job.png
Fields on the Periodic job options tab (see Figure 9.3) specify scheduing details about a recurring trace. Use fields in the Days section to specify the days on which the job will execute:
Click in the Week days field to select the days of the week on which the trace will execute.
Click in the Month days field to select the days of the month on which the trace will execute.
Click in the Months field to select the months in which the trace will execute.
Use fields in the Times section to specify a time schedule for the trace execution:
Click in the Hours field to select the hours at which the trace will execute.
Click in the Minutes field to select the hours at which the trace will execute.
When you've completed the Create trace... dialog, click Create to start the newly defined trace or to schedule the trace for a later time.
C:\Users\susan\Desktop\sp_open_existing_trace_sptab.png

9 SQL Profiling and Analysis : 9.1 Creating a New SQL Trace

Table of Contents Previous Next