select dp.NAME AS principal_name,
o.NAME AS [object_name],
p.permission_name
from sys.database_permissions p
left OUTER JOIN sys.all_objects o
on p.major_id = o.OBJECT_ID
inner JOIN sys.database_principals dp
on p.grantee_principal_id = dp.principal_id
where dp.NAME not in ('public' ) and o.NAME is not null
and o.NAME not like '%_view'
order by 1,2
o.NAME AS [object_name],
p.permission_name
from sys.database_permissions p
left OUTER JOIN sys.all_objects o
on p.major_id = o.OBJECT_ID
inner JOIN sys.database_principals dp
on p.grantee_principal_id = dp.principal_id
where dp.NAME not in ('public' ) and o.NAME is not null
and o.NAME not like '%_view'
order by 1,2