Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 fetch body of SP

Author  Topic 

aravindt77
Posting Yak Master

120 Posts

Posted - 2008-11-19 : 06:17:04
Hi,

Can anyone tel me from where do i get the body of Stored Procedure ??

Although the column "Routine_Definition" in the Information_Schema.Routines shows only of VARCHAR(4000) ...

Many of SP of bigger size is truncated...


Thanks & Regards

ARV

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2008-11-19 : 06:22:22
SP_HELPTEXT'spname'
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-19 : 06:48:05
[code]select text from syscomments where id=OBJECT_ID('YourProcedureNameHere')[/code]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-20 : 02:49:25
quote:
Originally posted by visakh16

select text from syscomments where id=OBJECT_ID('YourProcedureNameHere')



Rely on sp_help only
If there are more than 4000 characters, text is stored in more than one row


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -