如何获得Sybase存储程序的授予权限?

有帮助吗?

解决方案

这取决于您想要的信息。

  • 如果您为某些内部目的编写SQL,并且需要该信息作为数据,那么Kolchanov的答案是正确的。
  • 如果您仅执行DBA功能,则任何数量的DBA GUI工具(SybaseCentral随附CD; DBARTISAN更好)通过Explorer窗口提供该信息,然后单击
    • 如果您只有基于角色的访问,请使用
      sp_helprotect proc_name

链接到Sybase在线手册

然后转到:自适应服务器企业15.5/参考手册:过程,nd遵循探索器。

其他提示

如果我想检查对象的权限“ whying_ [table | propedure]”,我将运行以下查询:

桌子的示例

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

“否则”作为存储过程的示例

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

自适应服务器企业15.5>参考手册:表>系统表

sysprotects

Sysprotects包含有关已授予或从用户,组和角色撤销或撤销的权限的信息。

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36274.1550/html/tables/x16615.htm

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top