I would like to see what queries are being sent to a DB and what is returned. Is this possible with MsSQL Server Management Studio or a third party application? Is there anything i can use that is free?
Asked
Active
Viewed 76 times
1
-
What, exactly, are you after? There are many ways ranging from trace to server level audits. Picking a good solution depends on what's the scenario. – vonPryz Jun 18 '18 at 11:57
-
Thanks! Im looking to see the SQL queries that are sent. – Daarwin Jun 18 '18 at 12:01
-
What for, idle curiosity? Usually there's a reason why one would like to see the queries. Maybe that would be good solution, maybe not as per the XY problem. – vonPryz Jun 18 '18 at 12:04
-
Im learning a new system of applications and thought it would help me to see how it interacts with the DB – Daarwin Jun 18 '18 at 12:08
-
I would say this answer can be helpful – Yaroslav Jun 18 '18 at 12:33
-
Possible duplicate of How do I find a long running query with process ID, process name , login time, user , start time and duration? – John K. N. Jun 18 '18 at 13:30
1 Answers
1
You can as a minimum execute sp_who2 that will show session information, but more advanced and detailed methods are available, plenty of scripts available, it depends what you are after specifically.
Great set of tools available at Brent Ozar: First Responder Kit
If you want a better tool to just look at queries that are currently running, try sp_WhoIsActive, by Adam Machanic.
Erik Darling
- 40,781
- 14
- 130
- 456
Henrico Bekker
- 840
- 4
- 10