select h.spid, u.name, p.cmd, h.name, h.starttime, p.hostname, p.hostprocess, p.program_name from master..syslogshold h, master..sysprocesses p, master..sysusers u where h.spid = p.spid and p.suid = u.suid and h.spid != 0 /* not replication truncation point */
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.