Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who is the DBO? 1

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
I have a situation where I have a trigger that stores the user_name in field when an update is done. The problem is that we have two people who are considered dbo whom may also change data in the tables (small company). Thus no matter what I use (USER, USER_NAME, SESSION_NAME), they all say dbo instead of who the user actually is. What function or method do I use to determine which dbo this is?

As usual, thanks in advance for any help you can throw my way.



ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
YOu can try System_User that got it for me when I experimented, but it has my domain included too, so you may need a longer field size!
 
Oh yeah SQL Sister, that did it! You da bomb. I don't know how I missed that one, but I'm glad you responded.

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
As it happened, I learned something new in looking for the answer to your problem. Hadn't noticed that before myself.
 
BTW that is the user who is logged on to SQL Server, not necessarily the user who is logged on to the machine (unless your using NT authentication) but it sounds like what you are after

Matt

Brighton, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top