0

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%'
Mario Trento
  • 513
  • 1
  • 4
  • 14
  • 1
    Possible duplicate of [SQL Server truncation and 8192 limitation](http://stackoverflow.com/questions/952247/sql-server-truncation-and-8192-limitation) – Bacon Bits Oct 30 '15 at 23:49
  • Try this `SELECT O.Name as ProcName ,M.Definition as CreateScript FROM sys.sql_modules as M INNER JOIN sys.objects as O ON M.object_id = O.object_id WHERE O.type = 'P' ` – Mangal Pardeshi Oct 31 '15 at 16:24

0 Answers0