0

I use sp_who procedure to fetch processes detail, and return these columns:

fid
spid
status
loginame
origname
hostname
blk_spid
dbname
tempdbname
cmd
block_xloid
threadpool

Now I want to filter the output like

use sp_who procedure 

using dbname like DBNAME1, DBNAME2 and cmd like Insert, Update.

So how to write the code so I can achieve my desired output?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sunny
  • 11
  • 3
  • get a copy of the source code for sp_who, modify to your liking, give your new proc a new name, then load into the sybsystemprocs database; the source can be obtained from the installmaster script, sp_helptext or ddlgen – markp-fuso Feb 21 '23 at 14:34

0 Answers0