<pre>
if exists (select * from sysobjects where name = "sp_size" and type = 'P')
   drop proc sp_size
go

create procedure sp_size as

-- sp_size.sql: quick way to tell how big your stored procedures are
-- Author: Teresa Larsen
-- Change log
-- date       author  purpose
-- 09/09/97   T.Larsen        posted to Sybase-L

SELECT  ObjectName = object_name(id),
        PageCount = (count(*)/8) + 1
FROM    sysprocedures
GROUP BY object_name(id)
ORDER BY object_name(id)
go


if object_id('sp_size') is not null 
begin
    print '<<< Created procedure dbo.sp_size >>>'
    grant execute on dbo.sp_size to public
end
else
begin
    print '<<< Failed creating proc dbo.sp_size >>>'
end
go
