Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

General question regarding calling a SP from within other SPs Expand / Collapse
Author
Message
Posted Wednesday, September 01, 2010 12:36 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, April 10, 2014 2:03 PM
Points: 263, Visits: 344
Hi. In general I strongly prefer to avoid calling one sp from another. But recently I had to write a sp that confused the living H**L out of me. So I split some of the logic to approx 6 general purpose utility SPs.

My main sp contains the transaction,error handling, and if logic. The utility procs are coded to be modular, simple and general purpose so they can be called outside of the calling proc (re-usable) even though they probably won't.

So basically I coded the SPs the way I might code a group of C# methods within an object.

My question to ya'll is one of general sp design and maintenance.

Do you prefer to create modular SPs with the intent of calling one from another. Or do you prefer to create larger (monolithic) SPs.

A large SP will be harder to debug but will reduce the sp count.
Small SPs are easier to string together and debug individually but result in a larger number of procs.

I would appreciate any input.

Thanks,
Bill, Charlotte NC


Post #979056
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse