Viewing the code of stored procedure on another server

  • Hi, is there a way I could view the code of a stored procedure of a linked server, maybe by using the SP_HELPTEXT?

    I have 2 servers. I will run the query (view the code) in server 1 but the stored procedure is in server 2. thanks!

  • [linked_name].master.dbo.sp_helptext 'spoc-name'

    will work just fine

  • Needs to be the database that the SP is in - that will only show SPs in master

    svr.db.schm.sp_helptext 'spname'


    Cursors never.
    DTS - only when needed and never to control.

  • wow thanks all for the help!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply