BUG: xp_sqltrace Cannot Be Used as a Startup Procedure (253274)



The information in this article applies to:

  • Microsoft SQL Server 7.0
  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q253274
BUG #: 57424 (SQLBUG_70)

SYMPTOMS

In SQL Server 7.0 Books Online, example E, Configure SQL Server to Automatically Audit All Sessions at Disconnect, in the xp_sqltrace (T-SQL) topic, shows how to set xp_sqltrace as a startup stored procedure. However, this example does not work as documented.

If you use the example, the audit trace does not start, and the following errors appear in the Windows NT Application Event Log:
Event Type: Error
Event Source: SQLServerProfiler
Event Category: Internal Error
Event ID: 998
Description:
Executable: C:\MSSQL7\binn\sqlservr.exe
Description: NotSupported
Source: ..\..\..\..\src\xp_sqltr.c
Line: 338

Event Type: Error
Event Source: SQLServerProfiler
Event Category: Internal Error
Event ID: 998
Description:
Executable: C:\MSSQL7\binn\sqlservr.exe
Description: Could not impersonate security context.
Source: ..\..\..\..\src\xp_sqltr.c
Line: 338

WORKAROUND

To work around this problem, create a trace queue and use xp_trace_setqueueautostart to make the queue automatically start on the server's next restart. For an example, see the xp_trace_setqueueautostart (T-SQL) topic in the SQL Server 7.0 Books Online.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MajorLast Reviewed:10/17/2003
Keywords:kbBug kbpending KB253274