IT tutorials
 
Technology
 

SharePoint 2010 : Performance Monitoring - Using SQL Profiler

8/17/2013 3:34:48 PM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire

SQL Profiler is not necessarily a SharePoint Administrator's tool. It is associated with the Database Administrator. However, due to SharePoint's reliance on SQL Server, it is important that an administrator understand the tool and its use.

SQL Profiler is a tool that captures every event going to SQL and saves the information in a trace file. Using the built-in recorder, the administrator can capture information and then stop when enough has been collected.

This information can be critical to debugging and performance tuning. With SQL Profiler, you can monitor SQL statements and stored procedures, slow performance, and audit and review activities.

This recipe shows how to instantiate SQL Profiler against SharePoint 2010.

Getting ready

You must have administrator permissions to connect to a specific instance of SQL Server and have permissions to execute Profiler stored procedures. You must have SQL Server Client Tools loaded to your machine.

How to do it...

  1. Select Start | All Programs | Microsoft SQL Server 2008.

  2. Select Performance Tools | SQL Server Profiler.

  3. Select File | New Trace.

  4. Select the server name and click Connect.

  5. The following dialog appears:

    Fill in the required information.

    • Trace Name: SPTrace.

    • Use the template: Leave it to the default value: Standard.

    • Save to file: Check this box. A filename automatically appears; save this location.

  6. Click Run.

  7. Add a list item to a list in your SharePoint team site.

  8. Click on the Stop Selected Trace button on the menu.

How it works...

SQL Profiler attaches to an instance of your database. It can then interrogate and report on every event that takes place in that database. We need to be aware that Profiler will show activity on all the databases, which includes everything from the social databases to managed metadata to search — a lot of information to collect.

When you first clicked Run in the sixth step, the trace began immediately. You may have noticed how much communication there was between SharePoint 2010 and the SQL Server; even the shortest of traces produces voluminous data.

Here is a sample statement related to a particular timer job:

exec dbo.proc_CompleteTimerRunningJob @ServiceId='168D1873-BC36-4E51-AF85-8E1C7162C389',@VirtualServerId=
'AA272A38-214B-4CE3-8F71-2FC2BC670E7E',@JobId='A6EBD258-6575-45B4-AFB2-A6038345974F',@ServerId=
'C17285C9-27C8-4C88-A989-86B5DFDDA25B',@Status=2,@RequestGuid='9D6166F7-81F7-4813-B3EC-16581C6EBD6B'

It shows the timer job being completed. If the GUID were translated, we would have some powerful information at our disposal, which otherwise may not be possible through Central Administration.&;

There's more...

There is a second tab called Events, on the definition of a trace shown in step 5 of this recipe. An event is an action generated by SQL Server. Each event is part of a category. By leveraging templates, certain events such as locks and permissions can be grouped. This presents, in a simplified way, the data we have been tracing.

 
Others
 
- SharePoint 2010 : Performance Monitoring - Enabling HTTP Request Monitoring and Throttling
- SharePoint 2010 : Monitoring and Reporting - Enabling the Developer Dashboard
- SharePoint 2010 : Monitoring and Reporting - Troubleshooting with correlation IDs
- SharePoint 2010 : Monitoring and Reporting - Viewing web analytics reports
- Managing Windows Server 2012 : Managing Server 2012 Remotely - Installing RSAT
- Managing Windows Server 2012 : Server Manager (part 2) - Multiserver management and groups
- Managing Windows Server 2012 : Server Manager (part 1) - Launching and Working with Server Manager - Adding server roles and features
- Windows Phone 8 : Background Agents (part 3) - Audio Agent
- Windows Phone 8 : Background Agents (part 2) - Resource-Intensive Agent
- Windows Phone 8 : Background Agents (part 1) - Periodic Agent
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS