Databases Reference
In-Depth Information
TABLE 38.1 Create Command Options
Name
Description
The name of the Trace object.
Name
A unique identifier for the Trace object.
ID
The name of the trace file the server writes trace events into. If you
don't specify the full name of the file, including its path, the server
creates a trace file in the dedicated folder, LogDir .
LogFileName
Use LogFileSize to control the maximum size for the trace file. When
the file reaches that maximum size, the server can stop the trace or, if
the LogFileRollover property has been set, start streaming to a
different file with a similar name.
LogFileSize
Directs the server to create a new file when the current trace file
reaches its maximum size. The name of the new trace file is the origi-
nal file's name with 001 appended to it. So, if your trace file named
mylog.trc reaches its maximum size, the server creates a file named
mylog001.trc , and continues to increment the appended number as
long as the files fill up.
LogFileRollover
Controls what happens when you issue a Create command with a file-
name and the server finds an already-existing trace file with the same
name. You can set this property to direct the server to overwrite the
original file or to add the trace events to the original file.
LogFileAppend
Determines whether the trace automatically restarts whenever the
server restarts. Set this option to 1 if you want the Trace object to be
re-created whenever the server restarts. Set this option to 0 if you
want the Trace object to be discarded whenever the server shuts
down.
AutoRestart
Controls whether the trace infrastructure is permitted to discard
events before it sends them. This option enables you to prevent the
server from discarding events just because the server is overloaded.
(The server isn't very discriminating about what events it discards in
times like this.) Setting the Audit option to 1 ensures that the server
sends trace events no matter how busy it is. However, if the server
doesn't have the capacity to send the trace events to audit trace, it
will shut itself down. So, if you set the Audit option, make sure that
the trace isn't set to track very many events.
Audit
LISTING 38.1
A Trace DDL
<Trace>
<ID>trace ID<ID>
<Name>Trace Name<Name>
<LogFileName>filename</LogFileName>
<LogFileAppend>1|0</>
<LogFileSize>filesize</LogFileSize>
 
Search WWH ::




Custom Search