Home All Groups Group Topic Archive Search About

[ot] VBA workgroup / domain name

Author
21 Jan 2006 4:10 AM
rmanchu
hi

i'm being asked to log, users workgroup_name and domain_name in an
audit trail? is this do-able?

how shud i proceed on this?

thanx

Author
21 Jan 2006 3:13 PM
Mark Williams
If you are using Windows authentication on your SQL server, you could use

SELECT LEFT(SYSTEM_USER, CHARINDEX('\',SYSTEM_USER) - 1)

to get the domain name of the user that is connecting. If a user is
connecting from a workgroup system, the above will get the name of their
machine instead of the workgroup name.

--


Show quote
"rman***@gmail.com" wrote:

>
> hi
>
> i'm being asked to log, users workgroup_name and domain_name in an
> audit trail? is this do-able?
>
> how shud i proceed on this?
>
> thanx
>
>

AddThis Social Bookmark Button