Microsoft KB Archive/214799

= INF: SQLProfiler From Command Line Parameters to Temp File Usage =

Article ID: 214799

Article Last Modified on 4/3/1999

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q214799



SUMMARY
The following article describes the different command line parameters, temporary file usage, and other specific processing methods used by the SQLProfiler utility.



Reseting Client Preferences
The SQLProfiler, Sqltrace.exe utility, supports the command line switch "/clean" to reset client preferences. These include the following:
 * Font size and name.
 * Start minimized.
 * Tabular Data Stream (TDS) Packet size.

The following registry key and all of its children are cleared:

To reset the SQLProfiler client preferences use the following command line:

c:\mssql7\binn\sqltrace.exe /clean

Command Line Parameters
SQLProfiler supports command line parameters to allow automatic activities. This article details the parameters and their usage.

IMPORTANT: All command line arguments must use the '/' separator. The dash ('-') is not a supported command line separator by SQLProfiler.

Use of Temporary Files
SQLProfiler takes advantage of temporary files to handle certain trace and replay activities.

 When performing a replay you can specify the output file for the selected results. This file is originally created as a temporary file and through a series of steps renamed to the specified file. The original temporary file name is the specified output file extension plus a system generated value + ".tmp".

For example, ResultsOutput.trc would result in trc##.tmp where the ## is the system generated value. The file will be created in the specified output location. When handling a trace window there can be "NODES." In short, a node is generally a tree entry that can be expanded. The siblings and node information is controlled by a file named "tre" + a system generated value + ".tmp".

For example: tre12.tmp

The file is:

 Used as a memory mapped file to track the node information. Always created in the specified TEMP location. Can result in a large temporary file. (For example, a 75MB trace can produce a 19MB temporary file. Approximately 25% is a reasonable estimate.)

When you are running SQLProfiler, make sure that your default temporary location has plenty free space. To locate your default TEMP directory, in the Control Panel dialog box, select the System icon. In the System dialog box, click the Environment tab. The variable is located in the box under User variables for  . The default path for Windows NT is the %systemdrive%\TEMP location.</ol>

Asynchronous Processing
The SQLProfiler performs most activities on worker threads allowing asynchronous activities to take place. When you open a trace file, the screen is populated by a background thread. If you attempt to go to the end of the file before the file is completely loaded, you are taken to the end of the currently loaded data. One indication that the file is displaying completely is the enabling of the REPLAY button on the window toolbar.

Keywords: kbinfo KB214799

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.