You can see the text of stored procedures by viewing the SYS.SYSPROCEDURE system view. e.g. To see the text for a stored-procedure "sp_targetsp()": SELECT proc_defn FROM SYS.SYSPROCEDURE WHERE proc_name = 'sp_targetsp' You may also need to filter by "owner" if there are multiple stored procedures with the same name created by different database users. If you'd like to see what is being executed inside of a stored procedure at runtime, you can monitor these statements using request-level logging:
|