TAILIEUCHUNG - Hướng dẫn học Microsoft SQL Server 2008 part 130

Để ngăn chặn một phía máy chủ, dấu vết sử dụng hệ thống sp_trace_setstatus thủ tục lưu trữ. Các tham số đầu tiên là traceid, và tham số thứ hai chỉ hành động: 0 = ngừng theo dõi, 1 = bắt đầu theo dõi, và 2 = đóng và xóa các dấu vết. Mã mẫu dấu vết sử dụng như là 2: | Part VIII Monitoring and Auditing JOIN tcol ON Result Event Column TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TSQL SQL StmtCompleted TextData DatabaselD ApplicationName SPID Duration StartTime RowCounts IsSystem EndTime Reads Writes CPU DatabaseName To stop a server-side trace use the sp_trace_setstatus system stored procedure. The first parameter is the traceid and the second parameter specifies the action 0 stop the trace 1 start the trace and 2 close and delete the trace. The sample code uses trace as 2 EXEC sp_trace_setstatus 2 0 Another useful trace system stored procedure is fn_trace_gettable which reads a trace file and returns the data in table form SELECT FROM fn_trace_gettable C Program Files Microsoft SQL Server MSSQL Log 1 Preconfigured traces SQL Server automatically runs a trace called the Default Trace that gathers basic events like server start and stop file growth and creating or dropping objects. As the default trace its trace ID is 1. Theoretically it could be stopped without any ill effects but there s no reason to do so. Another preconfigured trace is the blackbox trace which is used to diagnose server crashes. Starting a trace with option 8 starts this trace. Typically this trace is not run unless there s a specific problem and Microsoft PSS has asked for data from the trace. Common Criteria and the older C2 Audit security levels also involve running a specific trace that gathers login and other security data. Executing sp_trace_create with option 4 configures these traces. 1252 Tracing and Profiling 56 Summary SQL Server Profiler and SQL Trace are two technologies you need if you re interested in what s .

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.