Upload
edmundo-lozada
View
229
Download
0
Embed Size (px)
Citation preview
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
1/13
Module 15:Monitoring
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
2/13
Overview
Formulate requirements and identify resources tomonitor in a database environment
Types of monitoring that can be carried out to ensure:
Maximum availability
Optimal performance
Error-free operations
Availability of tools for monitoring
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
3/13
Monitoring Availability
Monitoring should cover availability, errors, andperformance of all components of the databaseenvironment
Components to be monitored for availability are:
Node or server
server hardware and all components inthe path from the client
Database listener in SQL Server the listener is part of
the database service
Database monitoring
High-level checks for existence of instance
Low-level ensures work can be performed on the database
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
4/13
Monitoring Errors
The database and its components return status whensuccessful and error messages of when failure or eventsare encountered
Error messages in Oracle have an error code made up of
a number and a descriptive error messageError messages in SQL Server are composed of:
Unique message number
Severity level
Error state number identifies source
Error message description
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
5/13
Error Logs
Oracle alert file (alert.log) has equivalent in error logs ofSQL Server
Logs can be read using SQL Server Management Studio
or any text editor
Previous 6 error log files are kept by default but you canconfigure to keep more up to 99
Trace files are not created by default but can be createdmanually using Performance Monitor or Profiler
SQL Server also writes the useful information to theMicrosoft Windows Application log which can be readusing the Event Viewer
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
6/13
Demonstration: Viewing Logs and Events
In this demonstration you will learn to:
Locate and Review SQL Server Logs
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
7/13
Demonstration: Error Messages
In this demonstration you will learn to:
Create custom error messages
Use Try..Catch Blocks
Simulate data validation
Review SQL Server Log Entries
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
8/13
Monitoring Performance
Database server has to be monitored for CPU, memory, processes,virtual memory, network, I/O, and storage
Tools and utilities for monitoring server resources are:
Microsoft Windows Task Manager, Performance Monitor, WindowsExplorer
Monitoring database storage: Database Files size, growth, free space, status, archiving of logs
Tablespaces or Filegroups size, growth, fragmentation, status
Extents size and number of extents allocated to objects,performance of rollback, temporary and sort space
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
9/13
Monitoring Performance Database and Instance
Monitoring of database instance: Memory performance of subcomponents of SGA
(Oracle) and memory pool (SQL Server)
Processes performance of background and server
processes (Oracle) or worker threads (SQL Server) Sessions and Transactions number and activity of
sessions and resource usage by transactions
Locks and Latches waits for locks and latches, and
deadlocks Parsing parsing activity indicating performance of SQL
and cursors
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
10/13
Monitoring Tools
Third-Party Tools BMC Software
Performance
Manager for
Databases
Embarcadero
DBArtisan
Computer
Associates
Unicenter
Quest Software
Spotlight
Idera Diagnostic
Manager
Microsoft Windows /SQL Server Tools
Activity Monitor
Performance Data Collector
Management Data Warehouse
DBCC commands Dynamic Management Objects
Extended Events
Performance Monitor
SQL Server Agent
SQL Profiler
System Center Advisor
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
11/13
Demonstration: Activity Monitor
In this demonstration you will learn to:Use SQL Server Activity Monitor toobserve specific resources and queries.
D t ti S tti Al t t A t t
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
12/13
Demonstration: Setting Alerts to AutomateMonitoring
In this demonstration you will learn to:Create an Alert based on SQL Serverperformance counter
7/27/2019 M_15_1.00 Monitoring with Demos and Labs 2012.pdf
13/13
Review
We learned that server, database listener, and databaseare the components that need to be monitored
We learned the types of monitoring cover availability,errors, and performance
We saw the operating system tools to checkperformance of server hardware and operating systemcomponents
We learned how the various subcomponents of thedatabase and instance can be monitored using countersand logs
We were introduced to tools for monitoring SQL Serverdatabase and servers such as Performance Monitor, theData Collector and Performance Data Warehouse, SQLServer Agent, and SQL Profiler