SlideShare una empresa de Scribd logo
1 de 17
Smiling and ProfilingA Potpourri of profiler utility SQL Server 2005/2008
What We Will Cover What is Profiler Typical uses: Developer DBA Simple application debugging Capture submitted parameters View executed queries ORM/Code Generators Lazy? Or not… Nhibernate, Subsonic, Linq Execution plans Performance Monitoring
What is Profiler It is the GUI for the server Trace utility: Database Engine, Analysis Services, Integration Services Capture and save data about each (selected) event for analysis Can use Profiler to generate scripts to start Traces manually or with SQL Agent Save to .trc, XML, database Replay traces (same server/instance or different) Use the traces as input to Database Engine Tuning Advisor
Events TSQL statements (SELECT, INSERT, UPDATE, DELETE, etc.) login/out Start/complete execute of SP’s opened cursors lock acquired/released on a db object Start/complete of a SQL batch Many others…
Typical uses - DBA Performance optimization/tuning Long running queries Most used queries Resource utilization Before/after tuning comparisons Baselining/Benchmarking Locating cause of locks/blocks Root cause of slowdowns (by application, user, query, etc.)
Deadlock graph
Deadlock events Deadlock graph Lock: Deadlock Lock: Deadlock Chain RPC:Completed SP:StmtCompleted SQL:BatchCompleted SQL:BatchStarting
Typical uses? - Developer Finding Caching opportunities Debugging Data access layer issues Approximate performance measurement Benchmarking query performance before/after query or index changes Finding redundant/unnecessary hits to the database (Handles Mybase.Load, Me.Load).
Application debugging Replicate query w/ paramsin Query Analyzer Difficult to debug AJAX applications Reporting Services queries Sharepoint  Services Linq queries Nhibernate, Subsonic, Entity Framework calls Access front-end/MSSQL backend Linked servers
Nhibernate Lazy-loading Demo DEMO
SP Parameter sniffing demo
Execution plan demo
Correlation to Perfmon
Database debugging Multi-query Transactions
References http://geertverhoeven.blogspot.com/2007/01/combining-sql-server-profiler-and.html http://www.simple-talk.com/sql/learn-sql-server/how-to-track-down-deadlocks-using-sql-server-2005-profiler/ http://sqlserverpedia.com/wiki/Profiler_Trace_Templates http://wardyit.com/blog/blog/archive/2005/12/12/65.aspx How to become a Profiler Master – Brad McGeheeRed-gate software. Download from IndyTechFest.org 2008 session
Thank you! Websites http://www.SysteMental.com Blog http://dean-o.blogspot.com/ Email dean@systemental.com
About Me Dean Willson Work for Systemental, Inc as a Consultant and Software Developer (not a DBA) President, Professional Association for SQL Server - Fort Wayne Chapter fwpass.org Six Sigma Black Belt, Certified Software development to support business process improvement since 1999 Mfg. Eng. Technology degrees from Ball State University

Más contenido relacionado

Más de Dean Willson

Intro to Powershell
Intro to PowershellIntro to Powershell
Intro to PowershellDean Willson
 
Continuous improvement in a professional organization
Continuous improvement in a professional organizationContinuous improvement in a professional organization
Continuous improvement in a professional organizationDean Willson
 
Database Source Control
Database Source ControlDatabase Source Control
Database Source ControlDean Willson
 
Career Transitions - Ball State University, Six Sigma Speakers Series
Career Transitions - Ball State University, Six Sigma Speakers SeriesCareer Transitions - Ball State University, Six Sigma Speakers Series
Career Transitions - Ball State University, Six Sigma Speakers SeriesDean Willson
 
Introduction to SQL Server 2008 Management Data Warehouse (MDW)
Introduction to SQL Server 2008 Management Data Warehouse (MDW)Introduction to SQL Server 2008 Management Data Warehouse (MDW)
Introduction to SQL Server 2008 Management Data Warehouse (MDW)Dean Willson
 
Implementing ASP.NET Role Based Security
Implementing ASP.NET Role Based SecurityImplementing ASP.NET Role Based Security
Implementing ASP.NET Role Based SecurityDean Willson
 
Introduction to SSRS Report Builder
Introduction to SSRS Report BuilderIntroduction to SSRS Report Builder
Introduction to SSRS Report BuilderDean Willson
 
Data Mining with SQL Server 2005
Data Mining with SQL Server 2005Data Mining with SQL Server 2005
Data Mining with SQL Server 2005Dean Willson
 
Designing For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDesigning For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDean Willson
 

Más de Dean Willson (9)

Intro to Powershell
Intro to PowershellIntro to Powershell
Intro to Powershell
 
Continuous improvement in a professional organization
Continuous improvement in a professional organizationContinuous improvement in a professional organization
Continuous improvement in a professional organization
 
Database Source Control
Database Source ControlDatabase Source Control
Database Source Control
 
Career Transitions - Ball State University, Six Sigma Speakers Series
Career Transitions - Ball State University, Six Sigma Speakers SeriesCareer Transitions - Ball State University, Six Sigma Speakers Series
Career Transitions - Ball State University, Six Sigma Speakers Series
 
Introduction to SQL Server 2008 Management Data Warehouse (MDW)
Introduction to SQL Server 2008 Management Data Warehouse (MDW)Introduction to SQL Server 2008 Management Data Warehouse (MDW)
Introduction to SQL Server 2008 Management Data Warehouse (MDW)
 
Implementing ASP.NET Role Based Security
Implementing ASP.NET Role Based SecurityImplementing ASP.NET Role Based Security
Implementing ASP.NET Role Based Security
 
Introduction to SSRS Report Builder
Introduction to SSRS Report BuilderIntroduction to SSRS Report Builder
Introduction to SSRS Report Builder
 
Data Mining with SQL Server 2005
Data Mining with SQL Server 2005Data Mining with SQL Server 2005
Data Mining with SQL Server 2005
 
Designing For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDesigning For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps Slideshare
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Smiling and Profiling-SQL Server Profiler Utility

  • 1. Smiling and ProfilingA Potpourri of profiler utility SQL Server 2005/2008
  • 2. What We Will Cover What is Profiler Typical uses: Developer DBA Simple application debugging Capture submitted parameters View executed queries ORM/Code Generators Lazy? Or not… Nhibernate, Subsonic, Linq Execution plans Performance Monitoring
  • 3. What is Profiler It is the GUI for the server Trace utility: Database Engine, Analysis Services, Integration Services Capture and save data about each (selected) event for analysis Can use Profiler to generate scripts to start Traces manually or with SQL Agent Save to .trc, XML, database Replay traces (same server/instance or different) Use the traces as input to Database Engine Tuning Advisor
  • 4. Events TSQL statements (SELECT, INSERT, UPDATE, DELETE, etc.) login/out Start/complete execute of SP’s opened cursors lock acquired/released on a db object Start/complete of a SQL batch Many others…
  • 5. Typical uses - DBA Performance optimization/tuning Long running queries Most used queries Resource utilization Before/after tuning comparisons Baselining/Benchmarking Locating cause of locks/blocks Root cause of slowdowns (by application, user, query, etc.)
  • 7. Deadlock events Deadlock graph Lock: Deadlock Lock: Deadlock Chain RPC:Completed SP:StmtCompleted SQL:BatchCompleted SQL:BatchStarting
  • 8. Typical uses? - Developer Finding Caching opportunities Debugging Data access layer issues Approximate performance measurement Benchmarking query performance before/after query or index changes Finding redundant/unnecessary hits to the database (Handles Mybase.Load, Me.Load).
  • 9. Application debugging Replicate query w/ paramsin Query Analyzer Difficult to debug AJAX applications Reporting Services queries Sharepoint Services Linq queries Nhibernate, Subsonic, Entity Framework calls Access front-end/MSSQL backend Linked servers
  • 15. References http://geertverhoeven.blogspot.com/2007/01/combining-sql-server-profiler-and.html http://www.simple-talk.com/sql/learn-sql-server/how-to-track-down-deadlocks-using-sql-server-2005-profiler/ http://sqlserverpedia.com/wiki/Profiler_Trace_Templates http://wardyit.com/blog/blog/archive/2005/12/12/65.aspx How to become a Profiler Master – Brad McGeheeRed-gate software. Download from IndyTechFest.org 2008 session
  • 16. Thank you! Websites http://www.SysteMental.com Blog http://dean-o.blogspot.com/ Email dean@systemental.com
  • 17. About Me Dean Willson Work for Systemental, Inc as a Consultant and Software Developer (not a DBA) President, Professional Association for SQL Server - Fort Wayne Chapter fwpass.org Six Sigma Black Belt, Certified Software development to support business process improvement since 1999 Mfg. Eng. Technology degrees from Ball State University

Notas del editor

  1. How many people here have used Profiler before?
  2. What do you use it for?
  3. Run trace on Nhibernate project, Linq project. Show saved trace from Subsonic project.Show differences between traces. Nhibernate without lazy loading, Subsonic metadata polling, Linq
  4. VS 2005 Basic sample
  5. LPMLearn course list filter , Consensus=linq, DowntimeTracker = subsonic (MSSQL 2000 – show recorded trace with metadata polling)
  6. Consensus – view report (exclude Report Server)LPMLearn – Show Plan XML (long running queries template)
  7. LPMLearn – previously recorded traceCombine Profiler trace with Perfmon data capture. Very cool!