SELECT name,xtype from sysobjects WHERE sysobjects.xtype IN ('P','V&#39 AND UID = 1 AND not exists (
select 'X' from syspermissions
WHERE syspermissions.id = sysobjects.id
AND grantor = 1 and grantee = 0)