Re: Machine Name In Trigger

From: Dean (dvitner_at_nospam.gmail.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 13:54:49 +0100

try suser_sname()

dean

"Neil" <njones@pxdy.com> wrote in message
news:wGAUd.7684$873.5789@newsread3.news.pas.earthlink.net...
> Here's what I got:
>
> ID Login Name
> User Name
> ------ -------------------------------------------------------------------
-------------------------------------------------------------
> -------------------------------------------------------------------------
-------------------------------------------------------9 sadbo(1 row(s)
affected)I was looking for the Windows account that's currently logged in,
if that'spossible.Thanks."Vinod Kumar" <vinodk_sct@NO_SPAM_hotmail.com>
wrote in messagenews:cvmtl9$ufs$1@news01.intel.com...> Check if this
helps:>> SELECT @@SPID AS 'ID', SYSTEM_USER AS 'Login Name', USER AS 'User
Name'>> --> HTH,> Vinod Kumar> MCSE, DBA, MCAD, MCSD>
http://www.extremeexperts.com>> Books Online for SQL Server SP3 at>
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp>> "Neil"
<njones@pxdy.com> wrote in message>
news:6_xTd.5362$873.4937@newsread3.news.pas.earthlink.net...>> Any function
for getting the current Windows user?>>>> Thanks!>>>>>> "Tom Moreau"
<tom@dont.spam.me.cips.ca> wrote in message>>
news:OjjQtktGFHA.4032@TK2MSFTNGP12.phx.gbl...>> > Check out HOST_NAME() in
the BOL.>> >>> > -->> > Tom>> >>>
> ---------------------------------------------------->> > Thomas A. Moreau,
BSc, PhD, MCSE, MCDBA>> > SQL Server MVP>> > Columnist, SQL Server
Professional>> > Toronto, ON Canada>> > www.pinnaclepublishing.com>> > .>>
> "Neil" <njones@pxdy.com> wrote in message>> >
news:N1vTd.5219$873.4670@newsread3.news.pas.earthlink.net...>> > Is it
possible to get the machine name in a trigger so that it can be>> > stored>>
> in a field?>> >>> > Thanks.>> >>> >>>>>>>
>



Relevant Pages

  • Re: Machine Name In Trigger
    ... >> ID Login Name ... > affected)I was looking for the Windows account that's currently logged in, ... >> Moreau, ...
    (microsoft.public.sqlserver.programming)
  • Re: Server Registration fails - figure this out !
    ... looking at the registry setting doesn't mean it is actually ... Query Analyzer or osql - with sa or login as the domain user ... >> Make sure the windows account being used has a login, ... >> any other group membership. ...
    (microsoft.public.sqlserver.security)
  • Re: FTP authentication group?
    ... If it's a windows account, then it will be able to login remotely. ... READ and etc permission on the ftp path. ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Error 18456: Login failed for user DOMAINuser
    ... login was added. ... One scenario is that a windows account can ... To duplicate the via group membership: ... >started auditing all accouts. ...
    (microsoft.public.sqlserver.security)
  • Re: What is "via group membership"
    ... fixed server role, the login will be listed with Server ... I did some testing just and it did not show up Via group membership ... having explicitly added them as a login first. ...
    (microsoft.public.sqlserver.security)