Displays query being executed by a spid. rp_showquery works only when OpenSwitch in not in FULL_PASSTHRU mode.
rp_showquery spid
The OpenSwitch process identifier of the connection executing a query.
1> rp_showquery 8 2> go
Returns:
Statement ------------ sp_who
Use rp_who to list valid spids.
Output is displayed only for spids that are actively processing a query (the state field of rp_who shows BUSY), or executing registered procedures or SQL queries. Cursors are not currently supported.
spid x is not a valid spid as listed in rp_who:
rp_showquery: spid #x is invalid.
rp_who