使用定义者权限调用外部函数 [英] invoking external function with the definer privileges

查看:56
本文介绍了使用定义者权限调用外部函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

是否可以定义要执行的外部存储过程

不是使用正在执行的用户权限,而是使用

在db2版本8.1上创建存储过程权限

linux / unix?


提前谢谢

Yaron

解决方案

st ** *****@gmail.com 写道:

大家好。
是否可以定义一个外部存储过程来执行
而不是执行用户权限,而是在/ linux / unix上的db2版本8.1中创建存储过程权限的用户?




是的,如果你使用* static * SQL编写外部程序,当

程序执行时,它运行(默认情况下),并且绑定程序包的用户权限为

。 $>
祝你好运,


Ian写道:

st ******* @ gmail.com 写道:

大家好。
是否可以定义一个外部存储过程来执行
而不是执行用户权限,而是用在linux / unix上的db2版本8.1中创建存储过程权限的用户?


是的,如果使用* static * SQL编写外部过程当
程序执行时,默认情况下运行绑定程序包的用户权限



或者你使用动态嵌入式SQL(带包的C代码)和绑定包时的

DYNAMICRULES BIND选项。


-

Knut Stolze

DB2信息集成开发

IBM德国


Ian写道:

st ******* @ gmail.com 写道:

大家好。
是否可以定义要执行的外部存储过程
不是使用执行用户权限,而是使用在/ linux / unix上的db2版本8.1中创建存储过程权限的用户?



是,如果你使用* static * SQL编写外部程序,当
程序执行时,它会运行(默认情况下)绑定程序包的用户

祝你好运,




谢谢Ian

我的UDF使用IBM C ++ API获取快照并确定事务的优先级。

I尝试通过将另一个UDF包装在

C ++中来实现你的建议,通过SQL语句调用它(从

sysibm.sysdummy1中选择myUDF)但即使我没有收到任何错误消息,

原始UDF对没有特权的用户不起作用(意思是

callin g具有特权用户的包装器工作;调用包装器

来自简单用户不起作用。)


还有另一种方法来覆盖这个特权问题吗?


Hi All.
Is it possible to define an external stored procedure to be executed
not with the executing user privileges, but instead with the user who
created the stored procedure privileges in db2 version 8.1 on
linux/unix ?

Thanks in advance
Yaron

解决方案

st*******@gmail.com wrote:

Hi All.
Is it possible to define an external stored procedure to be executed
not with the executing user privileges, but instead with the user who
created the stored procedure privileges in db2 version 8.1 on
linux/unix ?



Yes, if you write the external procedure using *static* SQL, when the
procedure executes it runs (by default) with the authority of the user
that bound the package.
Good luck,


Ian wrote:

st*******@gmail.com wrote:

Hi All.
Is it possible to define an external stored procedure to be executed
not with the executing user privileges, but instead with the user who
created the stored procedure privileges in db2 version 8.1 on
linux/unix ?



Yes, if you write the external procedure using *static* SQL, when the
procedure executes it runs (by default) with the authority of the user
that bound the package.



Or you using dynamic embedded SQL (C code with packages) and the
DYNAMICRULES BIND option when binding the package.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany


Ian wrote:

st*******@gmail.com wrote:

Hi All.
Is it possible to define an external stored procedure to be executed
not with the executing user privileges, but instead with the user who
created the stored procedure privileges in db2 version 8.1 on
linux/unix ?



Yes, if you write the external procedure using *static* SQL, when the
procedure executes it runs (by default) with the authority of the user
that bound the package.
Good luck,



Thanks Ian
My UDF takes snapshots and prioritize transactions using IBM C++ API.
I tried to implement your suggestion by wrapping it with another UDF in
C++ that calls it via SQL statement ("select myUDF from
sysibm.sysdummy1") but even though I don''t get any error message, the
original UDF does not work for a user without privileges (meaning
calling the wrapper with privileged user works; calling the wrapper
from simple user does not work).

is there another way to override this privileges issue ?


这篇关于使用定义者权限调用外部函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆