查看单个存储过程的禁用情况
查看系统扩展存储过程的禁用情况是
select dp.NAME AS principal_name,
dp.type_desc AS
principal_type_desc,
o.NAME AS object_name,
p.permission_name,
p.state_desc AS
permission_state_desc
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
and
p.grantee_principal_id=DATABASE_PRINCI
PAL_ID('public')
但是我想查看单个存储过程的禁用情况,不太清楚怎么改。。。。
select dp.NAME AS principal_name,
dp.type_desc AS
principal_type_desc,
o.NAME AS object_name,
p.permission_name,
p.state_desc AS
permission_state_desc
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
and
p.grantee_principal_id=DATABASE_PRINCI
PAL_ID('public')
但是我想查看单个存储过程的禁用情况,不太清楚怎么改。。。。
作者: 半瓶老醋 发布时间: 2011-09-14
上面的语句格式有点问题,我这里整理一下
select dp.NAME AS principal_name,
dp.type_desc AS principal_type_desc,
o.NAME AS object_name,
p.permission_name,
p.state_desc AS permission_state_desc
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
and p.grantee_principal_id=DATABASE_PRINCIPAL_ID('public')
select dp.NAME AS principal_name,
dp.type_desc AS principal_type_desc,
o.NAME AS object_name,
p.permission_name,
p.state_desc AS permission_state_desc
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
and p.grantee_principal_id=DATABASE_PRINCIPAL_ID('public')
作者: 半瓶老醋 发布时间: 2011-09-14