Script example for SQL Trace

Code example:
The following code does not handle transactions or errors, so it can be simple and understandable.
It is better to add transactions and error handlers in the real environments.

→ Here is what the DTS package would look like:


For your convenience, this next section is available in a clickable Microsoft Word document.

    Requires Free Membership to View

Click here to view or download the DTS steps and SQL script.



Targeting SQL Profiler to determine performance problems
 Home: Introduction
 Step 1: Tracing statements in SQL Server 2000
 Step 2: Tracing statements in SQL Server 2005
 Step 3: How to use SQL Trace definition
 Step 4: Script example for SQL Trace
 Step 5: SQL Trace results in SQL Profiler

ABOUT THE AUTHOR:   
Michelle Gutzait works as a senior databases consultant for ITERGY International Inc., an IT consulting firm specializing in the design, implementation, security and support of Microsoft products in the enterprise. Gutzait has been involved in IT for 20 years as a developer, business analyst and database consultant. For the last 10 years, she has worked exclusively with SQL Server. Her skills include database design, performance tuning, security, high availability, disaster recovery, very large databases, replication, T-SQL coding, DTS packages, administrative and infrastructure tools development, reporting services and more.
Copyright 2007 TechTarget

More on SearchSQLServer.com

  • Step-by-Step Guide: How to interpret performance metrics in SQL Server 2005
  • Using SQL Server Profiler with Analysis Services
  • FAQ: DTS packages in SQL Server
  • This was first published in March 2007

    Join the conversationComment

    Share
    Comments

      Results

      Contribute to the conversation

      All fields are required. Comments will appear at the bottom of the article.