Credits:
Description
Code
/* The Queues */ --all queues in the database SELECT ob.name AS Queue_Name ,COALESCE(EP.value, '') AS Documentation FROM sys.objects AS ob LEFT OUTER JOIN sys.extended_properties AS EP ON EP.major_id = ob.object_id AND EP.name = 'MS_Description' --the microsoft convention WHERE OBJECTPROPERTY(ob.object_id, 'IsQueue') = 1; |
/* The Rules */ --all old-style rules in the database SELECT ob.name AS Rule_Name --old-fashioned sybase-style rule ,COALESCE(EP.value, '') AS Documentation FROM sys.objects AS ob LEFT OUTER JOIN sys.extended_properties AS EP ON EP.major_id = ob.object_id AND EP.name = 'MS_Description' --the microsoft convention WHERE OBJECTPROPERTY(ob.object_id, 'IsRule') = 1; |