I need to monitor sql user additions and changes and put login name and
change date into a user created table.
Is ther anyway I can do this from a trigger or sp.
Regards
Don GroverYou can use a trigger on the tables you want to audit. Just
look at the values in the deleted and inserted tables used
by the triggers for before and after images of the rows. You
can capture the date with GetDate() and the user with
suser_sname. And then just insert that data into your audit
table.
You can find an example of this in the following article:
http://www.aspfaq.com/show.asp?id=2448
-Sue
On Thu, 10 Feb 2005 07:53:50 +1100, "Don Grover"
<dgrover@.assoft.com.au> wrote:
>I need to monitor sql user additions and changes and put login name and
>change date into a user created table.
>Is ther anyway I can do this from a trigger or sp.
>Regards
>Don Grover
>|||Sorry Sue
I actually mean't users logins, not user data
ie: I actually want to monitor if any more users have been add, deleted or
edited on/to any database.
I have this msql server that I need to monitor remotely by script/email when
any user/login changes are made
Regards
Don
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:krkl01l9jsi45m3ji0bn25ufpbr358j6sb@.
4ax.com...
> You can use a trigger on the tables you want to audit. Just
> look at the values in the deleted and inserted tables used
> by the triggers for before and after images of the rows. You
> can capture the date with GetDate() and the user with
> suser_sname. And then just insert that data into your audit
> table.
> You can find an example of this in the following article:
> http://www.aspfaq.com/show.asp?id=2448
> -Sue
> On Thu, 10 Feb 2005 07:53:50 +1100, "Don Grover"
> <dgrover@.assoft.com.au> wrote:
>
>|||Don
SQL Server does not have a track of this.
Look at SQL Server Profiler to do it for you.
"Don Grover" <dgrover@.assoft.com.au> wrote in message
news:%23KamiQzDFHA.2608@.TK2MSFTNGP10.phx.gbl...
> Sorry Sue
> I actually mean't users logins, not user data
> ie: I actually want to monitor if any more users have been add, deleted or
> edited on/to any database.
> I have this msql server that I need to monitor remotely by script/email
when
> any user/login changes are made
> Regards
> Don
>
>
> "Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:krkl01l9jsi45m3ji0bn25ufpbr358j6sb@.
4ax.com...
>|||Look at the Security Audit Events classes in profiler. You
can capture these changes using Profiler (or a server side
trace) using the Security Audit event category.
-Sue
On Thu, 10 Feb 2005 16:48:21 +1100, "Don Grover"
<dgrover@.assoft.com.au> wrote:
>Sorry Sue
>I actually mean't users logins, not user data
>ie: I actually want to monitor if any more users have been add, deleted or
>edited on/to any database.
>I have this msql server that I need to monitor remotely by script/email whe
n
>any user/login changes are made
>Regards
>Don
>
>
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:krkl01l9jsi45m3ji0bn25ufpbr358j6sb@.
4ax.com...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment