I have an application updating a MSSQL 2005 database and would like to record the change to one field on a table. I have the trigger working fine to record this and can return all info I need except I would like to return the name of the user logged in on the network.
I have used USER_NAME - returns dbo and SYSTEM_USER - returns sa.
HOST_NAME() returns the Computer name which is useful.
I can get the @@SPID and lookup the relavent info from the session - sysprocesses - there is a field nt_user_name but this is blank and I cannot see anything that gives the logged on user.
Appreciate any help in identifying how I could access this.
There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005.
The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.
Recently, I was involved in a di…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so.
This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…