如何在 SQL*Loader 加载期间跟踪重新启用触发器的内容?

发布于 2024-08-04 09:13:03 字数 421 浏览 5 评论 0原文

我似乎在我的日志中看到很多这样的消息:

Trigger DEV."MBR_TRG" was disabled before the load.
Trigger DEV."MBR_TRG" was re-enabled by another process.
SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified

这是在我的本地开发计算机上,因此不应该有任何其他内容尝试插入到这些表中。我怎样才能找到这个问题的原因呢?有什么方法可以防止触发器被重新启用(至少看看我的脚本中是否有错误)?

I seem to be seeing a lot of messages like this in my log:

Trigger DEV."MBR_TRG" was disabled before the load.
Trigger DEV."MBR_TRG" was re-enabled by another process.
SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified

This is on my local dev machine, so there shouldn't be anything else trying to insert into these tables. How can I track down the cause of this? And is there any way to prevent the triggers from being re-enabled (at least to see if I get an error anywhere in my script)?

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

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

发布评论

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

评论(3

晒暮凉 2024-08-11 09:13:03

如果这是您的本地开发计算机,您可以删除触发器并稍后重新创建它。
或者,您可以将触发代码更改为不会扰乱数据的代码,而只会记录执行情况,以便您可以看到它何时启用。

If this is your local dev machine you can drop the trigger and recreate it later.
Or you can change the trigger code to something that will not mess with your data but will only log execution so you can see when it was enabled.

二智少女 2024-08-11 09:13:03

看起来触发器的类型可能会影响 sqlloader 处理触发器。至于跟踪原因,我会尝试 DDL 触发器

It looks like the type of trigger can have an impact on how sqlloader deals with the trigger. As far as tracking the cause I would try a DDL trigger

温柔嚣张 2024-08-11 09:13:03

我在直接路径加载中看到这些错误。问题不是错误消息所暗示的“另一个进程”,而是用户缺乏禁用触发器的适当权限。您必须有权更改表和触发器。这意味着您必须拥有该表,或者具有该表的更改权限,或者具有更改任何表的权限。此外,您必须拥有触发器,或者具有更改任何触发器的权限。

I was seeing these errors in direct path loads. The problem was not 'another process' as the error message suggested, but lack of the proper permissions for the user to disable the trigger. You must have permission to alter the table AND the trigger. Which means you must own the table, or have alter permission on the table, or have alter any table permission. Also, you must own the trigger, or have alter any trigger permission.

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