Microsoft SQLTrace Help Contents

 Overview

 How To…

 About The…


Microsoft SQLTrace Help Contents

 Overview

Microsoft SQLTrace Overview

 How To…

 About The…


Microsoft SQLTrace Help Contents

 Overview

 How To…

Audit a Server

Connect to a Server

Create a Filter

Edit a Filter

Start or Stop a Filter

Launch An External Tool

 About The…


Microsoft SQLTrace Help Contents

 Overview

 How To…

 About The…

Build Filter On Applications Dialog Box

Build Filter On Host Names Dialog Box

Build Filter On User Logins Dialog Box

Configuration Dialog Box

Connect Server Dialog Box

Filter Status Window

New Filter / Filter Properties Dialog Box

Save Activity Log File Dialog Box

Save SQL Script File Dialog Box

Start Selected Filters Dialog Box

Stop Selected Filters Dialog Box

Trace Window


Microsoft SQLTrace Overview

Microsoft SQLTrace is a graphical utility that allows database administrators and application developers to monitor and record database activity for Microsoft SQL Server 6.5. SQLTrace can display all server activity in real-time, or create filters that focus on the actions of particular users, applications, or hosts. SQLTrace can display SQL statements or remote procedure calls sent to any Microsoft SQL Server 6.5 server. Server activity can be saved to disk in an ISQL/w compatible script or as an activity log. SQLTrace also allows administrators to audit the use of SQL Server.

SQLTrace is implemented as an extended stored procedure directly on the SQL Server engine, allowing tracing to be dynamically turned on and off, and allowing monitoring of either the local server or a remote server.

SQLTrace is installed with the server software and, optionally, with the 32-bit client software. It can be started by choosing the SQLTrace icon from the SQL Server 6.5 program group. It can also be started by running sqltrace.exe from the C:\SQL65\BINN directory.


Connect to a Server

You must connect to a server before you can monitor it. Each time you start SQLTrace, you can specify a server to connect to. After you are connected to a server, you can connect to a different server using the Disconnect and Connect commands on the File menu.

To connect to a server

1.	From the File menu, choose Connect.

2.	Complete the Connect Server dialog box that appears.

To connect to a different server

1.	From the File menu, choose Disconnect.

2.	From the File menu, choose Connect.

3.	Complete the Connect Server dialog box that appears.

See Also

Connect Server Dialog Box


Connect Server Dialog Box

Use this dialog box to select a server to monitor. For more information, choose one of the following:

 Server

 Use Trusted Connection

 Use Standard Security

 Login ID

 Password

 Connect

 List Servers

See Also

Connect to a Server


Server

Specifies the server to monitor. You can select a server from the list, type a server name, or choose List Servers and select a server from the list in the dialog box.


Use Trusted Connection

Connects to the selected server over a trusted connection using Windows NT security.


Use Standard Security

Connects to the server using standard SQL Server security.


Login ID

Specifies a valid SQL Server login ID.


Password

Enters a password for the specified login ID.


Connect

Connects to the server specified in the Server box.


List Servers

Opens the Select Server dialog box, which presents a list of servers in your network domain.


Start or Stop a Filter

Filters are used to define how SQLTrace monitors server activity. The properties that were defined for a filter when it was created specify which activity to monitor, how to display that information, and whether to save that information. Up to 20 filters can run simultaneously.

To start a filter

In the Filter Status window, click the [image] green start button for the filter to run. Or from the File menu, choose Start Filters, select one or more filters from the Start Selected Filters dialog box, then choose OK.

To stop a filter

In the Filter Status window, click the [image] red button for the filter to stop. Or from the File menu, choose Stop Filters, select one or more filters from the Stop Selected Filters dialog box, then choose OK.

See Also

Create a Filter


Start Selected Filters Dialog Box

Use this box to specify a filter to run. A filter defines the information to be monitored by SQLTrace, and how that information will be displayed and/or saved. Up to 20 filters can run simultaneously.

To run filters

1.	Select one or more filters from the list.

2.	Choose OK.

See Also

Start or Stop a Filter

Create a Filter


Stop Selected Filters Dialog Box

Use this box to specify a filter to stop. A filter defines the information to be monitored by SQLTrace, and how that information will be displayed and/or saved.

To stop filters

1.	Select one or more filters from the list.

2.	Choose OK.

See Also

Start or Stop a Filter

Create a Filter


Launch An External Tool

Three external tools (ISQL/w, SQL Enterprise Manager, and SQL Performance Monitor) can be launched from within SQLTrace. The following buttons appear when these tools are available on the toolbar for each external tool.

 Launches ISQL/w. You can use ISQL/w to view Graphical ShowPlan for a query, or to test a modification to a SQL statement.

 Launches SQL Enterprise Manager. You can use SQL Enterprise Manager to monitor current activity (locks, blocking processes, and so on).

 Launches SQL Performance Monitor. You can use SQL Performance Monitor to obtain detailed information on CPU usage, disk activity, locks, and so on.

To launch an external tool

From the toolbar, click the tool's button. Or, from the Tools menu, choose the name of the tool to launch.


Filter Status Window

Use this window to view the status of defined filters, to stop or start filters, and to open filters for editing.

To start a filter

Click the [image] green button for the filter to run. Up to 20 filters can run simultaneously.

To stop a filter

Click the [image] red button for the filter to stop.

To edit a filter

Select the filter to edit and complete the New Filter / Filter Properties dialog box.

To display or hide the Filter Status window

Click the [image] Filter Status button from the toolbar, or from the View menu, choose Filter Status.

See Also

Trace Window


Trace Window

Use this window to view trace information for a running filter. To display the trace window, in the New Filter / Filter Properties dialog box (set when creating or editing a filter), select the View On Screen option for that filter. The filter must be started for the window to appear.

Trace windows can be minimized. Minimized windows become trace icons. A trace icon can appear in various forms, which depict filter configuration and current trace status.

Closing a trace window or a trace icon stops the associated filter.

To close a trace window

Verify that the trace window to close is the active window. From the File menu, choose Close.

To close a trace icon

Click on the trace icon, and from the shortcut menu that appears, choose Close.

See Also

Filter Status Window


Create a Filter

A filter defines how SQLTrace monitors server activity. Properties defined when a filter is created or edited specify which activity to monitor, and how that information will be displayed or saved.

To create a new filter

1.	From the toolbar, click the [image] New Filter button or from the File menu, choose New Filter. The New Filter / Filter Properties dialog box appears.

2.	Comple the displayed dialog box to define the filter properties. For information about each configuration option in this dialog box, see New Filter / Filter Properties Dialog Box.

3.	Choose Add. The filter is added to the Filter Status window and the filter is started. If the View On Screen option was selected in step 2, a trace window is opened.


Edit a Filter

A filter defines how SQLTrace monitors server activity. Properties defined when a filter is created or edited specify which activity to monitor, and how that information will be displayed or saved.

To edit a filter

1.	Open the New Filter / Filter Properties dialog box in one of the following ways:

From the toolbar, click the [image] Edit Filter button.

From the File menu, choose Open Filter.

Select a trace icon and from the shortcut menu that appears, choose Filter Properties.

From the Filter status window, double-click on the filter name or click the screen, script, or activity check box.

2.	Select the filter to edit from the Filter Name box.

3.	In the New Filter / Filter Properties dialog box, edit the filter by changing the option settings. For information about each configuration option in this dialog box,
see New Filter / Filter Properties Dialog Box.

4.	Start or stop the filter.

5.	Choose OK.


New Filter / Filter Properties Dialog Box

Use this dialog box to create or modify a filter. A filter defines how SQLTrace monitors server acitvity. Properties defined when a filter is created or edited specify which activity to monitor, and how that information will be displayed or saved.

For more information, choose one of the following:

 Filter Name

 Login Name

 Application

 Host Name

 Connect

 SQL Statements

 SQL Statements Filter

 RPC

 RPC Filter

 Attention

 Disconnect

 View On Screen

 Save As Log File

 Save As SQL Script

 Headers

 Timings

 Per Connection

 Add / OK

See Also

Build Filter On Applications Dialog Box

Build Filter On Host Names Dialog Box

Build Filter On User Logins Dialog Box

Save Activity Log File Dialog Box

Save SQL Script File Dialog Box


Filter Name

Specifies a filter name. To create a filter, type a name in this box. To edit a filter, select a name from the list.


Login Name

Specifies the login name(s) to monitor events for. If you enter one or more login IDs, only events from one of those users will be captured. Separate multiple login IDs with semicolons (;). To select from a list of known login IDs, click the [image] Locate button and complete the dialog box.

The criteria for Login Name, Application, and Host Name are cumulative. For example, if caseyv; delaneyr; royces are entered as login names and Microsoft ISQL/w is entered as an application, only events generated by caseyv, delaneyr, or royces using ISQL/w will be captured.


Application

Specifies the application(s) to monitor events for. If you enter one or more application names, only events from one of those applications will be captured. Separate multiple applications with semicolons (;). To select from a list of known applications, click the [image] Locate button and complete the dialog box.

The criteria for Login Name, Application, and Host Name are cumulative. For example, if caseyv; delaneyr; royces are entered as login names and Microsoft ISQL/w is entered as an application, only events generated by caseyv, delaneyr, or royces using ISQL/w will be captured.


Host Name

Specifies the host name(s) to monitor events for. If you enter one or more host names, only events from one of those computers will be captured if the application has correctly filled out the host name when logging in. Separate multiple host names with semicolons (;). To select from a list of known Host Names, click the [image] Locate button and complete the dialog box.

The criteria for Login Name, Application, and Host Name are cumulative. For example, if caseyv; delaneyr; royces are entered as login names and Microsoft ISQL/w is entered as an application, only events generated by caseyv, delaneyr, or royces using ISQL/w will be captured.


Connect

Specifies that connect events will be captured by the filter.


SQL Statements

Specifies that SQL language statements will be captured by the filter.


SQL Statements Filter

Specifies that only SQL statements containing that string will be captured. You can use a SQL statements filter, for example, to capture statements that reference a particular table or a particular stored procedure. Separate multiple statements with semicolons (;).

Note that all SQL statements containing the entered string will be captured. The filter does not distinguish, for example, between a column-named customer and a table-named customer.


RPC

Specifies that remote procedure calls will be captured by the filter.


RPC Filter

Specifies that only remote procedure calls containing the string will be captured. Separate multiple filter strings with semicolons (;).


Attention

Specifies that attention events will be captured by the filter.


Disconnect

Specifies that disconnect events will be captured by the filter.


View On Screen

Specifies that when the filter runs, a trace window will open and the information captured by the filter will be written to that trace window.


Save As Log File

Specifies that information captured by the filter will be written to the specified log file. If you select this option, you must provide a fully qualified file name for the log file. Type a drive, path, and file name in the box, or click the [image] Locate button and complete the dialog box.


Save As SQL Script

Specifies that information captured by the filter will be saved as a SQL script file. If you select this option, you must provide a fully qualified file name for the script file. Type a drive, path, and filename in the box, or click the [image] Locate button and complete the dialog box.


Headers

Captures the header: a line before and after each language or RPC event, which gives some details about event type, connection number, spid, username (if known), and so on.


Timings

Captures the timestamp from each header.


Per Connection

Specifies that one trace window is opened for each client connection (instead of all output for the filter being sent to the same trace window).


Add / OK

Accepts a new or modified filter. After you have defined a new filter, click the Add button to create it. After you have edited an existing filter, click the OK button to modify it.


# PropPop_Del


Build Filter On Applications Dialog Box

Use this dialog box to select the application(s) to monitor. Only applications that logged on specifying an application name will be displayed. Select one or more applications, then choose OK.


Build Filter On Host Names Dialog Box

Use this dialog box to select the SQL Server host name(s) to monitor. Select one or more host names, then choose OK.


Build Filter On User Logins Dialog Box

Use this dialog box to select the SQL Server user login name(s) to monitor. Select one or more login names, then choose OK.


Save Activity Log File Dialog Box

Use this dialog box to specify the path and the file name of a log file. The filter will save activity information in this log file. For more information, choose one of the following:

 File Name

 List Files of Type

 Directories

 Drives

 Network


Save SQL Script File Dialog Box

Use this dialog box to specify the path and the file name of a script file. The filter will save SQL statements in this script file. For more information, choose one of the following:

 File Name

 List Files of Type

 Directories

 Drives

 Network


File Name

Specifies a filename in the box (for example, FILTER01). Entering a filename extension (such as .LOG for log files or .SQL for script files) is not necessary. An extension will be added based on the selection in the List Files of Type box.


List Files of Type

Specifies the file type to display in the list box. Log files use the .LOG filename extension. Script files use the .SQL filename extension. To change the selection, choose a file type from the list.


Directories

Displays the currently selected directory. To change the selection, click in the folder tree.


Drives

Displays the currently selected drive. To change the selection, choose a drive from the list.


Network

Opens the Connect Network Drive dialog box. Click this button to connect to a shared network directory.


Configuration Dialog Box

This feature is not available for this beta release.


Audit a Server

This feature is not available for this beta release.