Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Can we know the Windows login name using T-SQL?

$
0
0

Hi everybody!

When we start Windows 7, it asks for the User Name and password.

Is it possible in T-SQL (I use SQL Server 2008) to discover this User Name?

What is the SQL code that will do the job?

-----------------

In case you wish to know my motivation, here it is:

I use an ERP software in my company. I wish to know who has logged in.

Unfortunately, not every user has a distinct user name.

The same user name and password is shared by several persons.

So, I am trying to use the Windows user name instead, assuming the person who logged in the ERP is the same person who logged on to Windows.

Thanks

Leon Lai


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>