TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P153

Microsoft SQL Server 2008 R2 Unleashed- P153:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 1464 CHAPTER 39 Monitoring SQL Server Performance Using the AdventureWorks2008 database you can generate some simple activity that is known to acquire share locks on tables. Use the following T-SQL that references the Sales . vSalesPersonSalesByFiscalYears view -- Generate some lock acquiring workload USE AdventureWorks2008 SELECT TOP 1 FROM Sales . vSalesPersonSalesByFiscalYears As soon as the preceding SELECT statement is generated the Extended Event begins doing its job of collecting information. As you can see in Figure this fairly complex join statement grabs the results of this Extended Event and displays them in a very nice readable fashion. This SELECT statement uses the dynamic management views previously identified in this chapter during the Extended Events active session. FIGURE Displaying the results of acquired locks from the Extended Events session. As you can see this session isolates the table objects that have the most acquired locks on them during execution. This capability is very powerful. The T-SQL code is as follows -- The following query turns the xml data that is accumulating -- from the Extended Event Session and displays it more clearly -- TableName TableObjectID and number of AcquiredLocks SELECT name AS TableName Performance Monitoring Tools 1465 object_id AS TableObjectID LocksX AS AcquiredLocks FROM SELECT . lbigintl AS ObjectX @count 1bigint AS LocksX FROM SELECT CAST AS XML LockData FROM xest JOIN xes ON JOIN ses ON WHERE synchronous_bucketizer AND TheMostLocks Locks CROSS APPLY BucketizerTarget Slot AS T objstats LockedObjects INNER JOIN o ON WHERE S AND U ORDER BY LocksX desc To turn off the Extended Events session you simply issue another ALTER .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.