Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
SQL Server
This article describes how to use built-in functions to view a saved trace.
Important
This feature will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use Extended Events instead.
View a specific trace
Execute
sys.fn_trace_getinfoby specifying the ID of the trace about which information is needed. This function returns a table that lists the trace, trace property, and information about the property.Invoke the function this way:
SELECT * FROM ::fn_trace_getinfo(trace_id);
View all existing traces
Execute
sys.fn_trace_getinfoby specifying0ordefault. This function returns a table that lists all the traces, their properties, and information about these properties.Invoke the function as follows:
SELECT * FROM ::fn_trace_getinfo(default);
.NET Framework security
Requires ALTER TRACE on the server.