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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting Log in name / computer details in SQL

Status
Not open for further replies.

CAFCrew

Programmer
Jan 5, 2005
58
0
0
GB
HI All,

We are building a application for users to make changes to the DB so we are building in some audit functionality to record who is doing what. The guy that is doing the application has been away so i was wondering whether there was any way that i can capture the log in information from SQL.

ideally the Pc name, IP address or windows log in would be excellent. Just so we have some come back if someone screws up the DB!

Thanks in advance for your help :D
 
I think the only things you have to work with at are..

select * from master.dbo.sysprocesses

execute sp_who


-- Jason
"It's Just Ones and Zeros
 
hmm...thanks for this :). I am coming to the same conclusion..

i have been looking through the master db to see if there are any sp's in there that would help..haven't found anyway of actually working out who is doing what tho

Thanks for taking the time to reply though. I appreciate it.
 
may exec sp_readerrorlog help somehow?

[pipe]
Daniel Vlas
Systems Consultant

 
Hey, Thanks all for these

I have found the default trace option within SQL which gives some of the functionality that i was after however this doesn't really go into the detail that i needed.

I have also found that you can script traces from profile which might be another way of going, however i would need to write this to a table which would take up alot of room on the DB.

I think overall i have worked out that it is going to be ALOT easier to just do this through .Net. SQL doesn't appear to have the functionality easily available.


Thanks all for taking the time to help

Matt


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top