4

I have a procedure that is valid and has in it an insert..select statement. Now there is a case where execution of this procedure produces "ORA-00904: : invalid identifier" error from this statement. How is that even theoretically possible? There are no triggers or dynamic SQL.

Also, the ORA-00904 text in sqlerrm is without pointer to any specific identifier that Oracle considers invalid.

Oracle version 9.2.0.8

edit2:

Turns out there was a problem with a function that was called from within that select (replaced it with constants and everything worked). Probably that was the reason that ORA-00904 did not give an identifier. Still, the question remains - how can that be that precompiled code with no dynamic sql gives this error?

4

2 回答 2

2

我认为当您访问一个包有效但主体需要编译并引发异常的包时,可能会发生这种错误。

另一个原因可能是带有 authid current_user 的代码,它以当前用户的权限运行(与拥有用户的权限不同)。这样的过程在被一个用户调用时可能会失败,而在被另一个用户执行时会成功。

于 2012-05-18T06:14:54.023 回答
0

由于您已经找到了解决方案,所以这不是您的问题。但是我想补充一点,如果包函数有一个主体,你会得到这个错误,但规格表中没有函数签名。

于 2015-03-16T17:22:56.247 回答