-
Stored Procedure size
Is there an easy way to get the size in bytes that a stored procedure takes up in storage space?
Thanks.
-
You can check table size of syscomments in the db.
-
select sum(datalength(text)) * 2 from syscomments where object_name(id) = 'yourprocname'
*2 because it is nvarchar = 2 bytes for one char
-
It may have to be
select sum(datalength(text)) * 3 from syscomments where object_name(id) = 'yourprocname'
as the text is also stored as binary in ctext column.
Whatever it is, you should not be too much concerned about the space it takes, in any database it will be a fraction of total size.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|