Home > Targeting SQL Profiler to determine performance problems
Step-by-Step Guide:
EMAIL THIS LICENSING & REPRINTS

Targeting SQL Profiler to determine performance problems

19 Mar 2007 | By Michelle Gutzait

Expert advice on database development
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google

If you are a database administrator, you probably wish you could keep track of the badly performing commands within SQL Server instances in order to analyze them, or even send them to the development teams on a regular basis.

Do these laments sound familiar?

  • "Our SQL Server environment reaches 100% CPU for more than 10 minutes every day and we have to restart the instance."
  • "Our users complain that the applications' performance degrades every day at lunch time."
  • "The new version of the application was deployed in production and suddenly we have performance problems."
  • This article explains how to use SQL Profiler and SQL Traces to determine application inefficiencies and how to assist development teams that capture them.

    What should I trace?
    If you have a lot of activity in your SQL Server instance, you should trace only T-SQL commands that use comparably more resources (CPU, IO, Duration). This way, you will end up with a list of just the badly performing commands. Your choice of filter threads will depend on your specific environments.

    My advice is to run Profiler with initial threads of:

  • CPU > 500
  • Duration > 500 (half a second)
  • Reads > 10,000
  • Writes > 5000

    Test how many commands you are getting with these filters and change the threads accordingly until you get at least one event traced in five minutes. Also, if you get too many rows, it will be difficult to analyze the output.

    It might be necessary to adjust the threads later according to the results. For example, if the worst-performing commands were already tuned, you might want to capture commands using fewer resources than you did initially.

    Save trace definition to a file:
    It is so easy to save a trace definition. Just open SQL Profiler, choose the events, columns and filters and script trace, as described next.



    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


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


    RELATED CONTENT
    SQL Server performance and tuning
    Virtual database storage for SQL Server: Friend or foe?
    Tutorial: SQL Server 2005 Analysis Services
    Tutorial: Migrating to SANs from local SQL Server disk storage
    SQL Server memory configurations for procedure cache and buffer cache
    Using the OUTPUT clause for practical SQL Server applications
    Check SQL Server database and log file size with this stored procedure
    SQL Server PerfMon counters for access methods and buffer manager
    Find size of SQL Server tables and other objects with stored procedure
    Monitor SQL Server disk I/O with PerfMon counters
    SQL Server tempdb best practices increase performance

    SQL Server data warehousing/business intelligence
    Manage traces in SQL Server 2005 Analysis Services with XMLA commands
    Tutorial: SQL Server 2005 Analysis Services
    Top 10 SQL Server Integration Services (SSIS) and DTS tips
    Open SSIS packages without validation using these SQL properties
    How to process SQL Server 2005 Analysis Services for data availability
    Export SQL Server data to an Excel file using SSIS and Visual Studio
    Five steps to event handlers in SQL Server Integration Services (SSIS)
    Workaround to Reporting Services error in SQL Server Express
    Optimize SAN setup for improved SQL Server performance
    Table partitioning with SQL Server 2005

    SQL Server availability
    Upgrade live applications to SQL Server 2005 for high availability
    SQL Server high availability when upgrading to SQL Server 2005
    Tutorial: Migrating to SANs from local SQL Server disk storage
    How to restore SQL Server database to transition server during upgrade
    SQL Server memory configurations for procedure cache and buffer cache
    Upgrade Active/Active cluster to SQL Server 2005 and Windows 2003
    SQL Server backups using SAN database snapshots
    Tips for moving from SQL Server local disk storage to SANs
    How to process SQL Server 2005 Analysis Services for data availability
    SQL Server 2005 log shipping setup using the wizard
    SQL Server availability Research

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    contiguity  (SearchSQLServer.com)
    contiguous  (SearchSQLServer.com)
    drilldown  (SearchSQLServer.com)
    hashing  (SearchSQLServer.com)
    hybrid online analytical processing  (SearchSQLServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary


    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts