如何在 Oracle 11g 上的触发器中使用外部过程

发布于 2024-09-01 17:58:58 字数 674 浏览 1 评论 0原文

我想在触发插入命令时触发触发器。

触发器将访问可以随时更改的 pl/sql 文件。

所以问题是,如果我们设计触发器,我们如何确保这种动态事情发生。在存储过程期间,它不起作用。

我认为 - 它应该适用于

1) External Procedures 
2) Execute Statement

如果我错了,请纠正我。我正在研究外部过程,但我无法找到执行外部过程的方法从这里开始..

SQL> CREATE OR REPLACE FUNCTION Plstojavafac_func (N NUMBER) RETURN NUMBER AS
  2  LANGUAGE JAVA
  3  NAME 'Factorial.J_calcFactorial(int) return int';
  4  /

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

SQL> CREATE OR REPLACE TRIGGER student_after_insert
  2  AFTER INSERT
  3  ON student
  4  FOR EACH ROW

如何致电这里的程序...我的解释是否正确,请建议...

谢谢。

I want to fire a trigger whenever an insert command is fired..

The trigger will access a pl/sql file which can change anytime..

So the query is, if we design the trigger, how can we make sure this dynamic thing happens.. As during the stored procedure, it is not working..

I think - it should work for

1) External Procedures 
2) Execute Statement

Please correct me, if I am wrong.. I was working on External Procedures but i am not able to find the way to execute the external procedure from here on..

SQL> CREATE OR REPLACE FUNCTION Plstojavafac_func (N NUMBER) RETURN NUMBER AS
  2  LANGUAGE JAVA
  3  NAME 'Factorial.J_calcFactorial(int) return int';
  4  /

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

SQL> CREATE OR REPLACE TRIGGER student_after_insert
  2  AFTER INSERT
  3  ON student
  4  FOR EACH ROW

How to call the procedure from heree... And does my interpretations are right,, plz suggest..

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

世界和平 2024-09-08 17:58:58

要么使用过程插入您将处理数据的位置,然后退出过程(取消插入)或成功插入,或者在触发器中而不是在过程中进行数据处理

either use procedure for inserting where you will handle your data and then quit procedure (cancel insert) or make successful insert, or do your data handling in trigger not in procedure

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文