Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 148 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
148
Dung lượng
7,03 MB
Nội dung
[...].. .SQL Server Profiler • SQLServer Profiler is a tool for monitoring real-time queries issued against your server – “Old Faithful” - been around for years – Requires sysadmin or ALTER TRACE server permission p 10 SQLServer Profiler p 11 SQLServer Profiler • DBAs use traces to monitor statements sent to SQLServer – We’ve already seen how SQLServer uses “default traces”... Profiler! p 18 Chapter 9: MonitoringandPerformance Course 157: SQL Server2008Database Administration Presented by Scott Whigham 19 p 19 • Chapter Introduction • Tools for Monitoring • SQLServer Profiler Monitoring Overview What We’re Going to Cover • Understanding and Using the DMVs • PerfMon • Data Collector p 20 Dynamic Management Views • DBAs use Dynamic Management Views (“DMVs”) and Dynamic Management... WHERE schema_id=4 AND name LIKE 'dm_%‘ ORDER BY name p 27 DMV and DMF Query Results p 28 Database Category • Database category: – 16+ DMVs and DMFs SELECT name, type_desc FROM sys.system_objects WHERE schema_id=4 AND name LIKE 'dm_db%' p 29 In the next video… • We’ll take a look at a few categories and examples p 30 Chapter 9: MonitoringandPerformance Course 157: SQL Server2008Database Administration... Tools for Monitoring • SQLServer Profiler Monitoring Overview What We’re Going to Cover • Understanding and Using the DMVs • PerfMon • Data Collector p 32 Dynamic Management Views • Reminder: the more popular categories for performancemonitoring Category DMx prefix Database sys.dm_db_ Execution/Sessions sys.dm_exec_ IO sys.dm_io_ OS sys.dm_os_ Transactions sys.dm_tran_ p 33 Database Category • Database. .. in Chapter 7 • Running traces will have an impact on serverperformance – How much? It depends on how much you trace p 12 SQLServer Profiler • SQL Server Profiler is the GUI for defining, viewing, and replaying traces – It does not have to be running to create a trace – Many DBAs create their traces via Profiler and then script out to jobs p 13 SQL Server Profiler • Running Profiler on a “live” system... real-time reporting? Can do trend analysis and historical reporting? Can view SQL issued? Provides detail-level view or summary? Can be used to diagnose performance problems? Level of impact on server Difficulty level p 22 Dynamic Management Views • There are too many DMxs to cover each one so we’ll cover concepts and core DMxs – Over 130 DMVs and DMFs in SQL Server 2008! • It is important for DBAs to maintain... interactively on the server • If you must run Profiler against a “live” server, run it remotely • Adds network overhead but this is almost never an issue today p 14 SQLServer Profiler • Trace data can be stored: – In a trc file (fastest) – In a SQLServer table • trc files can be configured to rollover to a new file after a certain threshold • Can load trc file contents into SQLServer table after trace... Transactions sys.dm_tran_ p 33 Database Category • Database category: – 16+ DMVs and DMFs SELECT name, type_desc FROM sys.system_objects WHERE schema_id=4 AND name LIKE 'dm_db%‘ ORDER BY name p 34 Database Category • From a performance standpoint, you will spend a lot of time in the Database category – Primarily looking at table, index, and partition information • Size, fragmentation • Missing indexes • Index... for maximum flexibility! p 15 SQLServer Profiler • After trace is complete, you can export results p 16 SQLServer Profiler • Tips on working with Profiler – Traces can have filters to help minimize the noise • The better you filter, the less of an impact you put on the server – Being able to write queries against the trace results can help you identify many common trends and problems • This requires... categorize them – Below are the more popular categories for performancemonitoring Category DMx prefix Database sys.dm_db_ Execution/Sessions sys.dm_exec_ IO sys.dm_io_ OS sys.dm_os_ Transactions sys.dm_tran_ p 24 Dynamic Management Views • Intellisense can help you greatly! p 25 Dynamic Management Views • Object Explorer can also help p 26 DMV and DMF Query • You can also query system views for full . table!
SQL Server Profiler
p. 18
• Let’s play with Profiler!
In the next video…
p. 19
Chapter 9: Monitoring and
Performance
19
Course 157: SQL Server 2008 Database. for
Monitoring
• SQL Server
Profiler
Monitoring
• Understanding
and Using the
DMVs
• PerfMon
• Data Collector
What We’re Going to Cover
p. 10
• SQL Server