Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 userid and machine id

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-03-29 : 23:47:53
I wrote trigger to insert old data before update or delete .
Now while inserting i want to insert userid and machine id
for user id ia tried the following query as

SELECT CURRENT_USER;
it retuns o/p as dbo
Please give me solution


Malathi Rao

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-30 : 00:00:17
[code]
select system_user, suser_name()
[/code]


KH

Go to Top of Page

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-03-30 : 01:23:05
quote:
Originally posted by khtan


select system_user, suser_name()



KH





I mean to say i want the login id ie the person name who modified data

Malathi Rao
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-30 : 03:34:03
HOST_NAME()
SUSER_SNAME()


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -