Re: Auditing
From: Sue Hoegemeier (Sue_H@nomail.please)
Date: 10/01/02
- Next message: Trevor Scroggins: "Error 15401 using sp_grantlogin (not addressed by current KB articles)"
- Previous message: Sue Hoegemeier: "Re: SQL server 2000 diagram"
- In reply to: Leon Parker: "Auditing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Sue Hoegemeier <Sue_H@nomail.please> Date: Mon, 30 Sep 2002 20:06:40 -0600
If you use the feature in Enterprise Manager for Audit
level, you can audit logins but it won't audit logoffs per
your request. So to include this level, you need to use
Profiler or a server trace.
Take a look at the sp_trace_xxx store procedures. You can
use sp_trace_setstatus to start a trace. When you execute
sp_trace_create, there is an output parameter for @traceid.
You can then use this traceid to pass to sp_trace_setstatus.
You can create your trace in Profiler - after you create the
trace, go to File, Script Trace which will generate the
trace file. You can trace the events: Audit Login, Audit
Logout.
The following walks you through the above explanation of
creating the trace that's used in the article example:
INF: How to Programmatically Load Trace Files into Tables
(Q270599)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q270599
Additionally, the following might help as a reference
INF: Stored Procedure to Create a SQL Server 2000 Blackbox
Trace (Q281671)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q281671
And this shows how to create your own trace from a text file
but I think it's easier to use Profiler:
INF: How to Create a SQL Server 2000 Trace (Q283790)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q283790
You can set your own stored procedure to execute on startup
with sp_procoption.
-Sue
On Mon, 30 Sep 2002 09:56:25 -0700, "Leon Parker"
<lparker@lortobco.com> wrote:
>I'm trying to create auditing to track user logon/logoff.
>How do I use system stored procedures or Profiler to
>create the trace and have it to start automatically
>whenever SQL starts?
- Next message: Trevor Scroggins: "Error 15401 using sp_grantlogin (not addressed by current KB articles)"
- Previous message: Sue Hoegemeier: "Re: SQL server 2000 diagram"
- In reply to: Leon Parker: "Auditing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|