amachanic / sp_whoisactive

sp_whoisactive
GNU General Public License v3.0
1.13k stars 281 forks source link

No results when running on an AG read-only secondary #83

Closed gbritton1 closed 2 years ago

gbritton1 commented 2 years ago

I ran sp_whoisactive on a read-only secondary replica in an availability group but no results were returned. I double checked with sp_who2 and there are 100 rows with spids over 50.

Is there a parameter I need to set to get results this way or something else I should look at?

using v12.00

jared-ong commented 2 years ago

@gbritton1 probably the spids were sleeping. You could try running with the parameter to show the sleeping spids also. sp_who2 returns all sessions regardless whether they are "actively" doing work or not.

sp_whoisactive @show_sleeping_spids = 1

erikdarlingdata commented 2 years ago

@gbritton1 gonna close this one out since you haven't added any information in a while. If you have anything else to add, comment here and I'll reopen it.