Bài giảng Cơ sở dữ liệu nâng cao - Chapter 8: Monitoring SQL server
Số trang: 47
Loại file: ppt
Dung lượng: 1.01 MB
Lượt xem: 14
Lượt tải: 0
Xem trước 5 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Bài giảng Cơ sở dữ liệu nâng cao - Chapter 8: Monitoring SQL server. Chương này trình bày một số nội dung: The goal of monitoring, performance monitor, dynamic management views, monitoring events, event notifications,...
Nội dung trích xuất từ tài liệu:
Bài giảng Cơ sở dữ liệu nâng cao - Chapter 8: Monitoring SQL serverMonitoringSQLServerThe Goal of MonitoringThegoalofmonitoringdatabasesistosee: What’sgoingoninsideSQLServer, HoweffectivelySQLServerisusingtheserverresources (CPU,Memory,I/O).TheinformationenablesDBAidentifyabnormalactivitiesThe Goal of MonitoringOnceyoudefineyourmonitoringgoalsyoushouldselect theappropriatetoolsformonitoring.Thefollowinglistdescribesbasicmonitoringtoolsto viewthecurrentactivities: PerformanceMonitor:ausefultoolthattracksresourceuse onMicrosoftoperatingsystems. Itcanmonitorresourceusagefortheserverandprovide informationspecifictoSQLServereitherlocallyorfora remoteserver SQLProfiler:agraphicalapplicationthatenablesyouto captureatraceofeventsthatoccurredinSQLServer.The Goal of MonitoringThefollowinglistdescribesthebasicmonitoringtools: SQLTrace:theTSQLstoredprocedurewaytoinvokea SQLServertracewithouthavingtostartuptheSQL Profilerapplication.Itrequiresalittlemoreworktosetup, butit’salightweightwaytocaptureatrace It’sscriptableenablestheautomationoftracecapture Defaulttrace:alightweighttracethatrunsinacontinuous loopandcapturesasmallsetofkeydatabaseandserver events. usefulindiagnosingeventsthatmayhaveoccurredwhenno othermonitoringwasinplace.The Goal of MonitoringThefollowinglistdescribesthebasicmonitoringtools: ActivityMonitor:atoolgraphicallydisplaysthefollowing information: ProcessesrunningonaninstanceofSQLServer Locks Useractivity Blockedprocesses Dynamicmanagementviews:returnserverstate informationthatcanbeusedtomonitorthehealthofa serverinstance,diagnoseproblems,andtuneperformance. TransactSQL:Somesystemstoredproceduresprovide usefulinformationforSQLServermonitoring,suchas sp_who,sp_who2,sp_lock,andseveralothers.Performance MonitorPerformanceMonitorisanimportanttoolbecauseit enablestoknow: HowSQLServerisperforming HowWindowsisperforming.Threeserverresourcesneedstobemonitored: CPU Memory I/OPerformance MonitorCPUResourceCounters: SeveralcountersshowthestateoftheavailableCPU resources. BottlenecksduetoCPUresourceshortagesarefrequently causedbyproblemssuchas: Moreusersthanexpected Oneormoreusersrunningveryexpensivequeries Routineoperationalactivitiessuchasindexrebuilding.Performance MonitorCPUResourceCounters: Thefollowingcounterswillhelptofindthecauseofthe bottlenecksothattoidentifythatthebottleneckisaCPU resourceissue: Processor:%ProcessorTime:displaysthetotalpercentageof timespentprocessingnonidlethreads.Onamultipleprocessor machine,eachindividualprocessorcanbemonitored independently. Process:%ProcessorTime(sqlservr):canbeusedtodetermine howmuchofthetotalprocessingtimecanbeattributedtoSQL Server. System:ProcessorQueueLength:displaysthenumberof threadswaitingtobeprocessedbyaCPU.Performance MonitorDiskActivity: SQLServerreliesontheWindowsoperatingsystemto performI/Ooperations. Thedisksystemhandlesthestorageandmovementofdata onyoursystem.DiskI/Oisfrequentlythecauseof bottlenecksinasystem. Needtoobservemanyfactorsindeterminingthe performanceofthedisksystem SeveraldiskcountersreturndiskReadandWrite performanceinformation,aswellasdatatransfer information,foreachphysicaldiskoralldisks.Performance MonitorMemoryCounters: UsedbytheDBAtogetanoverallpictureofdatabaseI/O. Alackofmemorywillhaveadirectimpactondiskactivity. Whenoptimizingaserver,addingmemoryshouldalways beconsidered. ThesearesomeMemorycounters: Memory:Pages/Sec:measuresthenumberofpagespersecond thatrepagedoutofmemorytodiskorpagedintomemoryfrom disk. Memory:AvailableBytes:indicateshowmuchmemoryis availabletoprocesses. Process:WorkingSet(sqlservr)TheSQLServerinstanceof theWorkingSetcountershowshowmuchmemoryisinuseby SQLServer.Performance MonitorMemoryCounters: SQLServer:BufferManager:BufferCacheHitRatio measuresthepercentageoftimethatdatawasfoundinthe bufferwithouthavingtobereadfromdisk. Thiscountershouldbeveryhigh,optimally90%orbetter. When ...
Nội dung trích xuất từ tài liệu:
Bài giảng Cơ sở dữ liệu nâng cao - Chapter 8: Monitoring SQL serverMonitoringSQLServerThe Goal of MonitoringThegoalofmonitoringdatabasesistosee: What’sgoingoninsideSQLServer, HoweffectivelySQLServerisusingtheserverresources (CPU,Memory,I/O).TheinformationenablesDBAidentifyabnormalactivitiesThe Goal of MonitoringOnceyoudefineyourmonitoringgoalsyoushouldselect theappropriatetoolsformonitoring.Thefollowinglistdescribesbasicmonitoringtoolsto viewthecurrentactivities: PerformanceMonitor:ausefultoolthattracksresourceuse onMicrosoftoperatingsystems. Itcanmonitorresourceusagefortheserverandprovide informationspecifictoSQLServereitherlocallyorfora remoteserver SQLProfiler:agraphicalapplicationthatenablesyouto captureatraceofeventsthatoccurredinSQLServer.The Goal of MonitoringThefollowinglistdescribesthebasicmonitoringtools: SQLTrace:theTSQLstoredprocedurewaytoinvokea SQLServertracewithouthavingtostartuptheSQL Profilerapplication.Itrequiresalittlemoreworktosetup, butit’salightweightwaytocaptureatrace It’sscriptableenablestheautomationoftracecapture Defaulttrace:alightweighttracethatrunsinacontinuous loopandcapturesasmallsetofkeydatabaseandserver events. usefulindiagnosingeventsthatmayhaveoccurredwhenno othermonitoringwasinplace.The Goal of MonitoringThefollowinglistdescribesthebasicmonitoringtools: ActivityMonitor:atoolgraphicallydisplaysthefollowing information: ProcessesrunningonaninstanceofSQLServer Locks Useractivity Blockedprocesses Dynamicmanagementviews:returnserverstate informationthatcanbeusedtomonitorthehealthofa serverinstance,diagnoseproblems,andtuneperformance. TransactSQL:Somesystemstoredproceduresprovide usefulinformationforSQLServermonitoring,suchas sp_who,sp_who2,sp_lock,andseveralothers.Performance MonitorPerformanceMonitorisanimportanttoolbecauseit enablestoknow: HowSQLServerisperforming HowWindowsisperforming.Threeserverresourcesneedstobemonitored: CPU Memory I/OPerformance MonitorCPUResourceCounters: SeveralcountersshowthestateoftheavailableCPU resources. BottlenecksduetoCPUresourceshortagesarefrequently causedbyproblemssuchas: Moreusersthanexpected Oneormoreusersrunningveryexpensivequeries Routineoperationalactivitiessuchasindexrebuilding.Performance MonitorCPUResourceCounters: Thefollowingcounterswillhelptofindthecauseofthe bottlenecksothattoidentifythatthebottleneckisaCPU resourceissue: Processor:%ProcessorTime:displaysthetotalpercentageof timespentprocessingnonidlethreads.Onamultipleprocessor machine,eachindividualprocessorcanbemonitored independently. Process:%ProcessorTime(sqlservr):canbeusedtodetermine howmuchofthetotalprocessingtimecanbeattributedtoSQL Server. System:ProcessorQueueLength:displaysthenumberof threadswaitingtobeprocessedbyaCPU.Performance MonitorDiskActivity: SQLServerreliesontheWindowsoperatingsystemto performI/Ooperations. Thedisksystemhandlesthestorageandmovementofdata onyoursystem.DiskI/Oisfrequentlythecauseof bottlenecksinasystem. Needtoobservemanyfactorsindeterminingthe performanceofthedisksystem SeveraldiskcountersreturndiskReadandWrite performanceinformation,aswellasdatatransfer information,foreachphysicaldiskoralldisks.Performance MonitorMemoryCounters: UsedbytheDBAtogetanoverallpictureofdatabaseI/O. Alackofmemorywillhaveadirectimpactondiskactivity. Whenoptimizingaserver,addingmemoryshouldalways beconsidered. ThesearesomeMemorycounters: Memory:Pages/Sec:measuresthenumberofpagespersecond thatrepagedoutofmemorytodiskorpagedintomemoryfrom disk. Memory:AvailableBytes:indicateshowmuchmemoryis availabletoprocesses. Process:WorkingSet(sqlservr)TheSQLServerinstanceof theWorkingSetcountershowshowmuchmemoryisinuseby SQLServer.Performance MonitorMemoryCounters: SQLServer:BufferManager:BufferCacheHitRatio measuresthepercentageoftimethatdatawasfoundinthe bufferwithouthavingtobereadfromdisk. Thiscountershouldbeveryhigh,optimally90%orbetter. When ...
Tìm kiếm theo từ khóa liên quan:
Cơ sở dữ liệu nâng cao Cơ sở dữ liệu Bài giảng Cơ sở dữ liệu nâng cao Monitoring SQL server Performance monitor Dynamic management viewsGợi ý tài liệu liên quan:
-
62 trang 402 3 0
-
Đề thi kết thúc học phần học kì 2 môn Cơ sở dữ liệu năm 2019-2020 có đáp án - Trường ĐH Đồng Tháp
5 trang 378 6 0 -
13 trang 295 0 0
-
Giáo trình Cơ sở dữ liệu: Phần 2 - TS. Nguyễn Hoàng Sơn
158 trang 294 0 0 -
Phân tích thiết kế hệ thống - Biểu đồ trạng thái
20 trang 289 0 0 -
Tài liệu học tập Tin học văn phòng: Phần 2 - Vũ Thu Uyên
85 trang 257 1 0 -
Đề cương chi tiết học phần Quản trị cơ sở dữ liệu (Database Management Systems - DBMS)
14 trang 247 0 0 -
8 trang 186 0 0
-
Giáo trình về dữ liệu và các mô hình cơ sở dữ liệu
62 trang 186 0 0 -
Giáo trình Cơ sở dữ liệu: Phần 2 - Đại học Kinh tế TP. HCM
115 trang 176 0 0