I successfully used this code but now I'm dealing with huge sp and I see that results truncated, probably limited to some 5K limit?? How I can store it all?
Thanks much
SELECT name, OBJECT_DEFINITION(object_id)
FROM sys.objects
WHERE name LIKE 'p_my_big_sp_2000lines%'