Re: Auditing SP Execute.

From: Pranay Pandya (ppandya_at_gmail.com)
Date: 02/25/05


Date: 25 Feb 2005 07:01:06 -0800

Thank you Every for the posts. I am going to create the audit table and
log it.
Andrew J. Kelly wrote:
> Ahh yes. My original reading was he was looking to trace the
sp_executesql
> sp but I think I was mistaken. If it is a user sp then sure.
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Jasper Smith" <jasper_smith9@hotmail.com> wrote in message
> news:OcM6uPfGFHA.3076@tk2msftngp13.phx.gbl...
> > As long as the users only have execute permissions on the proc i.e.
they
> > can't change it, then just add some code at the start of the proc
to log
> > to a table passing getdate() and suser_sname() to capture the time
and
> > user executing the proc. This assumes that the app doesn't use a
single
> > service account (in which case you won't be able to get the user
name
> > without modifying the app to stuff it into context_info)
> >
> > --
> > HTH
> >
> > Jasper Smith (SQL Server MVP)
> > http://www.sqldbatips.com
> > I support PASS - the definitive, global
> > community for SQL Server professionals -
> > http://www.sqlpass.org
> >
> > "Pranay Pandya" <ppandya@gmail.com> wrote in message
> > news:1109178725.456740.135850@z14g2000cwz.googlegroups.com...
> >> To meet audit requirements, I have to maintain an audit log of
when a
> >> particular sp was execute and by whom. I am not willing to use
the c2
> >> option for just one stored procedure. There are 2 users who can
run
> >> the stored procedure from enterprise manager or query analyser
(others
> >> run it from an app). Any suggetions?
> >> Thank You,
> >> -pranay
> >>
> >
> >



Relevant Pages

  • Re: transaction isolation level
    ... SET options will revert back to the original settings once the ... SQL Server MVP ... > Andrew J. Kelly SQL MVP ... >> will that count for every Select..From statement in the proc? ...
    (microsoft.public.sqlserver.programming)
  • Re: transaction isolation level
    ... SET options within a stored procedure only are in effect for the execution ... SQL Server MVP ... > Andrew J. Kelly SQL MVP ... >> will that count for every Select..From statement in the proc? ...
    (microsoft.public.sqlserver.programming)
  • Re: Name of file that contains proc
    ... Andrew wrote: ... I'm wondering how to get the filename of the file that contains the ... functions.tcl that contains this proc my_name, ... [info script] gives me nothing (it works ...
    (comp.lang.tcl)
  • Re: SQL2005
    ... The box has 8 processers and I would like to assigin # of Proc to each DB ... Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.setup)