Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the Max size of a Stored procedure

Status
Not open for further replies.

DiggerDog

Programmer
Nov 24, 2002
60
AU
Hi

I'm creating a fairly complex Stored Proc and was wondering what is the size limit of an SP

Also I may want to call other SP's withing the one I'm creating - Is there a max no. I can call from withing one Stored Proc?

Finally - simple one but can't get the synta correct. How do I call a SP from another SP and use the dataset from the first SP in the second SP. e.g


 
1) Depending on available memory, the maximum size of a stored procedure is 128MB.

2) There is no limit to the amount of other SPs you can call from a single SP. However, when nesting SPs (ie SP1 calls SP2, which calls SP3 etc...) you can go to a maximum of 32 levels.

3) If you are using SQL 2000 then you could look at passing a table variable. Otherwise you might investigate using temp tables. What are you actually trying to do?

NB: SQL BOL holds lots of information about stored procs - look up "stored procedures" in the index. --James
 
HI James

Thanks for the info - I got lost trying to sort through the help to get the size limits - I'm sorted from here

thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top