如何在sybase中获取存储过程的授予权限?
答案 0 :(得分:5)
这取决于您想要该信息的表单。
sp_helprotect proc_name
然后转到:Adaptive Server Enterprise 15.5 /参考手册:过程,并按照资源管理器进行操作。
答案 1 :(得分:3)
如果我想检查对象“whatever_ [table | procedure]”的权限,我会运行以下查询:
作为表的“无论”的例子
Displaying result for:
---------------------
select permission = a.name
from master.dbo.spt_values a
, master.dbo.spt_values b
, sysprotects p
, sysobjects o
where a.type = "T"
and a.number = p.action
and b.type = "T"
and b.number = (p.protecttype + 204)
and o.id = p.id
and o.name = 'whatever_table'
permission
----------------------------
References
Select
Insert
Delete
Update
5 Row(s) affected
“what”是存储过程的示例
Displaying result for:
---------------------
select permission = a.name
from master.dbo.spt_values a
, master.dbo.spt_values b
, sysprotects p
, sysobjects o
where a.type = "T"
and a.number = p.action
and b.type = "T"
and b.number = (p.protecttype + 204)
and o.id = p.id
and o.name = 'whatever_procedure'
permission
----------------------------
Execute
1 Row(s) affected
答案 2 :(得分:1)
Adaptive Server Enterprise 15.5>参考手册:表>系统表
sysprotects中
sysprotects包含有关已授予用户,组和角色的权限的信息。