如何获得 sybase 中存储过程的授予权限?
问问题
16033 次
3 回答
6
这取决于您想要该信息的形式。
- 如果您出于某种内部目的编写 SQL,并且您需要该信息作为它的数据,那么 Kolchanov 的答案是正确的。
- 如果您只是执行 DBA 功能,那么任何数量的 DBA GUI 工具(CD 随附 SybaseCentral;DBArtisan 更好)通过资源管理器窗口提供该信息并单击
- 如果您只有基于字符的访问权限,请使用
sp_helprotect proc_name
- 如果您只有基于字符的访问权限,请使用
然后转至: Adaptive Server Enterprise 15.5/参考手册:过程,然后按照资源管理器。
于 2010-11-28T01:00:53.460 回答
3
如果我想检查对象“whatever_[table|procedure]”的权限,我将运行以下查询:
“whatever”作为表格的示例
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
“whatever”是存储过程的示例
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
于 2011-12-29T13:23:19.310 回答
1
Adaptive Server Enterprise 15.5 > 参考手册:表 > 系统表
系统保护
sysprotects 包含有关已授予或撤销用户、组和角色的权限的信息。
于 2010-11-25T16:16:31.517 回答