• I was hoping for a way to script a procedure using TSQL. Using the Object Browser in QA would not be much different than using EM.

    I was thinking something like

    SELECT text FROM syscomments WHERE id = OBJECT_ID('myProc')

    Unfortunately, like sp_helptext, you still get line breaks in all the wrong places.

    I tried running Profiler once while scripting a proc from EM, but did not have a whole lot of luck (it was awhile ago, don't remember the details). And, I think there is a way to do it using SQLDMO, but didn't want to have to go that route either.