Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Getting started with SQL Server.
Beginners just getting started - here's the place for help with simple questions. For installation or setup questions, refer to the Setup Forum.
It is replaced by sys. Why do you expect to get only 1 row per host? If I have 2 queries running in 2 different databases, wouldn't you expect 2 rows? This is the query I use.
Robert for Microsoft wrote: Sysprocesses has been deprecated for a long time and should not be used any more. Thank you Robert, Now I have one more requirement. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. Learn more. Asked 12 years, 5 months ago. Active 4 years, 2 months ago. Viewed 68k times. Improve this question. SteveC Jeff Stock Jeff Stock 3, 12 12 gold badges 43 43 silver badges 59 59 bronze badges.
What's your reason for wanting to do this? Who will look at this information? The DB administrator will look at this so they can tell what users are still logged on and be able to kill all processes for that user, very similar to the activity monitor in SSMS. Is that normal? See also Add a comment. OK, so no logging turned on at this point. First step is to turn on the type of logging that suits you. Ones that come to mind are:.
It is difficult for us to recommend one over the other except that I don't recommend the old trace engine. Only you know what you are more comfortable with and your requirements. Using any of the XE based methods or Logon Triggers feels a bit more robust for me when it comes to querying the data. For the XE based methods, you can query a trace file involving some XQuery. Not directly based on an audit trace, but it gives you an idea. Sign up to join this community. The best answers are voted up and rise to the top.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 1 year, 9 months ago. Active 1 year, 9 months ago. Viewed 8k times.
0コメント