Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Security FunctionsRSS Feeds

fn_trace_getinfo Function

Posted By: Sarita Patel     Category: SQL Server     Views: 2997

This article explains about fn_trace_getinfo function in sql server with examples.

fn_trace_getinfo returns information about a specified trace or existing traces.


Syntax of fn_trace_getinfo Function :

fn_trace_getinfo( [ @traceid = ] trace_id )

@traceid = trace_id
is an ID of the trace. It is of type an integer. To return information on all traces, specify the default value for this parameter. The keyword 'default' must be used. 

Returned field


Column Name

Data Type

Description

TraceId

int

The ID of the trace.

Property

int

The property of the trace as represented by the following integers:

1 - Trace Options (See @options in sp_trace_create)
2 - FileName
3 - MaxSize
4 - StopTime
5 - Current Trace status

Value

sql_variant

The information about the property of the trace specified.

 

 



Examples of fn_trace_getinfo Function :

Example 1 : Form of fn_trace_getinfo function in select clause 

SELECT *
FROM    ::fn_trace_getinfo(82)
WHERE  Property=4
  
Share: 


Didn't find what you were looking for? Find more on fn_trace_getinfo Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of fn_trace_getinfo Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!