无效权限错误?

发布于 2024-11-11 09:26:14 字数 836 浏览 4 评论 0原文

两个相关应用程序在多个查询中使用包中的函数以 CSV 形式返回一些数据。被选择和连接的列是 CLOB 字段,可以包含 HTML、特殊字符等。该应用程序的用户很少,因此使用率不高。一种是使用 Oracle HTTP 服务的 Flex 应用程序,另一种是使用 ODP.NET 的 ASP.NET 应用程序。这些应用程序实际上是一个集成的应用程序,彼此之间具有超链接。

昨天,我收到了几条关于一个奇怪错误的通知:

ORA-01031: 权限不足 ORA-06512

错误详细信息中包中的行号表明该错误是由 select 子句中使用的函数引起的。当任何一个应用程序调用时,大约 75% 的时间都会发生这种情况。

我是否正确地认为函数中发生了 ORA-06512,然后导致了 ORA-01031 权限不足错误?不幸的是,ORA-06512 是一个非常普遍的错误,并没有告诉我任何信息。为什么会导致无效权限错误?两个应用程序使用的 Oracle 用户帐户对包含该函数的包具有执行权限。

关于功能...已经在生产中使用了大约2年,没有任何问题。另外,当我昨天将数据导入到QA并进行测试时,无论我向服务器发出多少次请求,都不会出现错误。但在生产中,在参数完全相同的情况下,大约 75% 的时间会出现错误。

DBA试图帮助我进行跟踪,但我们在跟踪文件中找不到错误消息。

如今,生产一切恢复正常。即使我用请求锤击服务器,错误也会顽固地拒绝发生。

是什么导致了昨天这种非常奇怪的行为?这里的高手有什么想法吗?

编辑:我刚刚意识到一个重要的细节。表中由该函数选择并连接到 CSV 中的列是 CLOB。

Two related applications use a function in a package in several queries to return some data as CSV. The column being selected and concatenated is a CLOB field and can contain HTML, special characters, etc. The applications have few users and so are not heavily used. One is a Flex application that consumes Oracle HTTP services, and the other is an ASP.NET application that uses ODP.NET. The applications are really one integrated application with hyperlinks to each other.

Yesterday, I received several notifications of a strange error:

ORA-01031: insufficient privileges ORA-06512

The line number in the package in the error details indicates that the error was caused by the function being used in the select clause. It would occur when called by either application about 75% of the time.

Am I correct that an ORA-06512 occurred in the function that then caused an ORA-01031 insufficient privilege error? Unfortunately, ORA-06512 is a very generic error and doesn't tell me anything. And why would it cause an invalid privilege error? The Oracle user accounts being used by both applications have the execute privilege on the package that contains the function.

Regarding the function... it has been used for about 2 years in production without any issue. Also, when I imported the data to QA yesterday and tested it, no error would occur, no matter how many times I hammered the server with requests. But in production, the error would occur about 75% of the time with exactly the same parameters.

The DBA tried to help me with a trace, but we could not find the error message in the trace files.

Today, everything is back to normal in production. Even if I hammer the server with requests the error will stubbornly refuse to occur.

What caused this very strange behaviour yesterday? Do any of the gurus here have any ideas?

EDIT: I just realized one important detail. The column in the table that is being selected and concatenated into CSV by the function is a CLOB.

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

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

发布评论

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

评论(1

千と千尋 2024-11-18 09:26:14

如果客户端应用程序正在运行“SELECT clob_to_csv(clob_col) FROM ...”并且它有时返回无效权限,那么这可能是该函数正在尝试执行的操作,而不是 select 语句没有足够的权限来执行该函数。

不太清楚它可能需要特权做什么。它使用文件 (UTL_FILE) 或网络连接/Web 服务吗?

可能是某种奇怪的数据(可能是一个非常大的数据块)。

If the client applications were running "SELECT clob_to_csv(clob_col) FROM ..." and it returned an invalid privilege SOMETIMES, then it is probably something the function is trying to do, rather than the select statement not having sufficient privilege to execute the function.

Not quite clear on what it might do that may require a privilege. Does it use a file (UTL_FILE) or network connection / web service ?

Could be some sort of odd data (a very large clob perhaps).

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