Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #214
| From | Erland Sommarskog <esquel@sommarskog.se> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: A Question on Triggers |
| Date | 2011-04-25 20:42 +0200 |
| Organization | Erland Sommarskog |
| Message-ID | <Xns9ED2D2927B3A8Yazorman@127.0.0.1> (permalink) |
| References | <77111122-3944-48ad-923b-dd0a3329d071@u38g2000prd.googlegroups.com> <2a56545e-0788-4534-ae23-b93430c877a6@t19g2000prd.googlegroups.com> |
Fred. (ghrno-google@yahoo.com) writes: > 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. Small caveat here: it is better in most cases to use original_login(). In most cases, they will show the same thing, but if there has been impersonation, original_login() will show you the user who actually logged into SQL Server. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Find similar
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