Results 1 to 3 of 3

Thread: Select window login

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    85

    Select window login

    Hello friends

    i want to select nt window login (System login) name in sql server 2000.

    Like If i am login with vijay name then selected name should be vijay

    Regards
    Vijay Singh
    Last edited by vijay2006; Apr 22nd, 2008 at 10:37 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Select window login

    What kind of authentication are you using now?

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Select window login

    Have you tried the environment variable System_User...

    Select System_User

    Try this select statement in a query window - see what you get. Sometimes it comes back with a DOMAIN attached to the front of the value.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width