Collect and Analyze Troubleshooting Data
Collect and Analyze Troubleshooting Data
Introduction
Tools for Troubleshooting Data
Summary
Introduction
The Collect and Analyze Troubleshooting Data module provides you with the
instruction and server hardware to develop your hands on skills in the defined topics.
This module includes the following exercises:
Lab Diagram
During your session you will have access to the following lab configuration. Depending
on the exercises you may or may not use all of the devices, but they are shown here in the
layout to get an overall understanding of the topology of the lab.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 1/26
7/23/2019 Print content
In this module you will be working on the following equipment to carry out the steps
defined in each exercise.
To start, simply choose a device and click Power on. In some cases, the devices may
power on automatically.
For further information and technical support, please see our Help and Support
page.
Copyright Notice
This document and its content is copyright of Practice-IT - © Practice-IT 2014. All rights reserved. Any
redistribution or reproduction of part or all of the contents in any form is prohibited other than the
following:
1) You may print or download to a local hard disk extracts for your personal and non-commercial use
only.
2) You may copy the content to individual third parties for their personal use, but only if you
acknowledge the website as the source of the material. You may not, except with our express written
permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any
other website or other form of electronic retrieval system.
In this exercise, you will learn the following about Microsoft SQL Server 2012:
Monitoring data and server access by creating audit and other controls
Using Data Collector tools
Step 1
Ensure you have powered on the required devices and Connect to PLABSQL01.
Click Start, click All Programs, select Microsoft SQL Server 2012, select
Performance Tools and then select SQL Server Profiler.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 3/26
7/23/2019 Print content
After the connection is successful, the Trace Properties dialog box is displayed.
Click the Event Selection tab. Ensure all check boxes are selected. Then, click the
General tab.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 4/26
7/23/2019 Print content
In the Name text box, enter PLAB. Select Enable trace stop time and click Run.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 5/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 6/26
7/23/2019 Print content
Step 1
From PLABSQL01 open SQL Server Management Studio from the shortcut on the
desktop.
In the Connect to Server dialog box, enter PLABSQL01, , in the Server name text
box, if already not entered, and click Connect.
Check if SQL Server Agent is running. If not, right-click and then select Start.
The Microsoft SQL Server Management Studio dialog box is displayed. Click Yes.
After SQL Server Agent is started, select Alerts. Note that there is no alert defined.
You will need to first define an alert.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 7/26
7/23/2019 Print content
From the Severity drop-down list, select any of the fatal errors. For this task, you can
select 019 - Fatal Error in Resource.
Select Execute job and select PLAB. Note that this job was created in the previous task.
If you do not have this job readily available, create a job with the name PLAB.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 8/26
7/23/2019 Print content
Step 1
From Microsoft SQL Server Management Studio.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 9/26
7/23/2019 Print content
Note that there is data being reflected in the Activity Monitor. You can now execute one
or more queries to ensure data is being captured.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 10/26
7/23/2019 Print content
Note: Ignore any error in the query. The intent is to execute a query and generate data in
the Activity Monitor.
Switch back to Activity Monitor. Note that the graphs now show some amount of data:
Step 1
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 11/26
7/23/2019 Print content
Right-click the instance name, PLABSQL01, and select New Query. The new query
window opens in the right pane.
You can use different dynamic management views to return the status of the performance
of a specific instance.
Let’s see how long a task had to wait for a specific wait_type since the SQL Server
instance started.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 12/26
7/23/2019 Print content
You can use different dynamic management views to extract different types of data.
Step 1
From Microsoft SQL Server Management Studio.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 13/26
7/23/2019 Print content
You can enable auditing at different levels. Note that in the Login auditing section,
auditing is enabled only for Successful logins only. Select Failed logins only.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 14/26
7/23/2019 Print content
In the Options section, select Enable Common Criteria compliance and Enable
C2 audit tracing and then click OK.
The Microsoft SQL Server Management Studio dialog box is displayed. Click OK
to close.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 15/26
7/23/2019 Print content
Step 1
From Microsoft SQL Server Management Studio.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 16/26
7/23/2019 Print content
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 17/26
7/23/2019 Print content
Note: The remaining two role memberships will automatically get selected when you
select mdw_admin.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 18/26
7/23/2019 Print content
Step 1
From Microsoft SQL Server Management Studio.
From the Audit drop-down list, select the audit that you created in the previous task. If
you didn't created an audit, then first create it now.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 20/26
7/23/2019 Print content
From the Audit Action Type column, select DELETE from the drop-down list.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 21/26
7/23/2019 Print content
Click ... next to the Object Name column. The Select Objects dialog box is displayed.
In the Enter the object names to select text box, enter AdventureWorks2012 and
click Check Names. Then, click OK to close the dialog box.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 22/26
7/23/2019 Print content
Click ... next to the Principal Name column. The Select Objects dialog box is
displayed.
In the Enter the object names to select text box, enter db_owner and click Check
Names. Then, click OK to close the dialog box.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 23/26
7/23/2019 Print content
Note that PLAB is created under the Database Audit Specifications node. Right-
click PLAB and select Enable Database Audit Specification. The Enable
Database Audit Specification dialog box is displayed.
Click Close.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 24/26
7/23/2019 Print content
Shutdown all virtual machines used in this lab, by using the power functions located in
the Tools bar before proceeding to the next module. Alternatively you can log out of the
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 25/26
7/23/2019 Print content
lab platform.
Summary
In this exercise, you learnt the following about Microsoft SQL Server 2012:
Also try
Using the current lab setup, you can perform the following tasks at your own pace.
Using dynamic management views to gather server statistics like job waits
Configuring auditing at the server level
Using the Activity Monitor, run multiple queries in parallel and find the result in the
Activity Monitor
Creating multiple alerts for fatal errors
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 26/26