May 29, 2010 at 6:17 am
Can anyone please provide me the script to get the below details:
1. Size of each stored procedure
2. Total size of stored procedures in each database
Thanks.
May 29, 2010 at 8:28 am
What do you mean by size? No of characters? No of lines? Something else?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 29, 2010 at 11:07 pm
Actually,
sp_spaceused only takes the 'table name' as parameter input. Can I get something similar results for SPs?
Actually....I got the mail from Application Support team. Few databases they want to drop, before dropping they want the list of SPs, their source codes which I already sent across to them.
Their 3rd and 4th points was the one which I posted. I strongly believe, likewise table size concern, for SPs nothing such details would be available. Still, thought to post one question, to get some feedback...
Thanks.
May 30, 2010 at 3:34 am
Sourav-657741 (5/29/2010)
sp_spaceused only takes the 'table name' as parameter input. Can I get something similar results for SPs?
Not really, and I honestly don't see why you'd need to. Tables store data and hence can be varying sizes depending on row size and row count, whereas a stored procedure just consists of the text that defines it. The size of a stored procedure is simply the size of it's definition script.
Few databases they want to drop, before dropping they want the list of SPs, their source codes which I already sent across to them.
Query sys.procedures for the names of all procedures in the DB. If you want the definition too, join in sys.sql_modules
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 30, 2010 at 8:45 am
You're absolutely correct. I too believe the same. Will pass across the comments to Dev.
Thanks.
May 30, 2010 at 12:28 pm
Sourav-657741 (5/30/2010)
You're absolutely correct. I too believe the same. Will pass across the comments to Dev.
Gosh... why can't you just script the procs out to individual files and then do a DIR to give them all the file sizes?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 30, 2010 at 12:34 pm
I've already taken 'Script out' of all the SPs thru 'Generate Script' and taken the list thru 'Export List'.
Thanks.
May 30, 2010 at 3:25 pm
Sourav-657741 (5/30/2010)
I've already taken 'Script out' of all the SPs thru 'Generate Script' and taken the list thru 'Export List'.
So you're all set then, right?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 31, 2010 at 9:08 am
Yup. Thanks Buddy..!
Thanks.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply