Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #212

Re: A Question on Triggers

From Dom <dolivastro@gmail.com>
Newsgroups comp.databases.ms-sqlserver
Subject Re: A Question on Triggers
Date 2011-04-25 10:51 -0700
Organization http://groups.google.com
Message-ID <4bc84178-d091-42f5-b664-c04d6b3a0faa@z33g2000vbk.googlegroups.com> (permalink)
References <77111122-3944-48ad-923b-dd0a3329d071@u38g2000prd.googlegroups.com> <2a56545e-0788-4534-ae23-b93430c877a6@t19g2000prd.googlegroups.com>

Show all headers | View raw


On Apr 25, 12:12 pm, "Fred." <ghrno-goo...@yahoo.com> wrote:
> On Apr 25, 11:38 am, Dom <dolivas...@gmail.com> wrote:
>
> > I'm just reading through the help sites for information about creating
> > a Trigger.  I'm using it to debug a program.  The trigger will record
> > the exact time a record is updated in a certain table.  My question
> > is:  Is there any way to capture the user that is doing the updating?
> > For example is there something like a GET_USER_ID() function that I
> > can record in the trigger?
>
> > Thanks, Dom
>
> SYSTEM_USER is documented in as returning the login name of the
> current user.  What it seem to return in my environment is the login
> ID of the current user, in the form [domain]\[userid] where [domain]
> is the short or local domain name.
>
> Fred.

Thanks, Fred.  Exactly what I wanted.

Dom

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

A Question on Triggers Dom <dolivastro@gmail.com> - 2011-04-25 08:38 -0700
  Re: A Question on Triggers "Fred." <ghrno-google@yahoo.com> - 2011-04-25 09:12 -0700
    Re: A Question on Triggers Dom <dolivastro@gmail.com> - 2011-04-25 10:51 -0700
    Re: A Question on Triggers Erland Sommarskog <esquel@sommarskog.se> - 2011-04-25 20:42 +0200

csiph-web