Invalid privilege error? - oracle

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.

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).

Related

Experiencing issues using DBMS_CLOUD.GET_OBJECT in oracle cloud infrastructure Autonomous Database serverless

I am trying to create a DB Link between 2 Autonomous databases (Serverless) in OCI
List of steps i followed
I created the necessary credentials for the user using dbms_cloud.create_credential
Now, i try to upload the Wallet file (which i have stored in Object storage) using "dbms_cloud.get_object". It produces the following error
ORA-20000: ORA-29283: invalid file operation: nonexistent file or path [29434]
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 983
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD", line 2622
ORA-06512: at line 2
If i use the wrong credential or if i change the uri, the error that the system produces are different. I believe oracle is able to get to the object, yet it produces this error.
Any ideas?
DBMS_CLOUD.GET_OBJECT supports ability to read data from an object store file and return the contents as a BLOB, or save the contents to a file in the given directory object in your Autonomous Database.
https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/dbms-cloud-subprograms.html#GUID-3DB888C9-18C7-4A26-8DA8-EDFB260E2B14
It seems that you are trying to download a Wallet file to directory object for creating a database link. Autonomous Database automatically provisions a database file system to store files. Although the exact SQL syntax is not posted, but the error indicates that the syntax is correct. The error appears like the database file system is not accessible, and it is an internal error for the service.
You could workaround the issue by restarting the Autonomous Database. As this is an old question, the issue could be automatically addressed by now with automatic maintenance of Autonomous Database.
Out of curiosity, what region are you experiencing this in? Free tier or paid?
Ultimately, there is nothing wrong with your syntax used or a wrong usage. Unfortunately the issue you're experiencing is likely an internal error/bug, and can be fixed by OCI ops. I highly recommend submitting a service request.
If you have not submitted one in the past, you can read up on how to here - https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/contactingsupport.htm#3Openasupportservicerequest

oracle - Schemas issues when migration from discoverer to OBIEE

I'm working on migrating some reports from Oracle Discoverer to OBIEE. I've already exported the layouts from discoverer to OBIEE. I have all I need in the OBIEE Admin tool now, but when I try to perform this operation:
I got this message:
I've read in many forums that this is because of the query (enter link description here) but I've executed the query in SQL Developer and all is fine.
Any idea?
Thanks,
I can see from the icon on your object that it is an Opaque View that your trying to run View Data on.
This is probably because of a syntax issue in your opaque view. Make sure the code in the opaque view doesn't end with a semi-colon or slash, that will cause problems. Try eliminating any blank lines, if there are any. However, without knowing exactly the syntax of the code it's impossible to say exactly what the cause is.
It's also possible that there is a connection script attached to the connection pool you are using to View Data, running on connection or before execution with bad syntax.
Otherwise have a look in the Admin Tool log to see if there's more information about what is causing the error. It will usually contain more detailed information than is passed back through the GUI.

What Tables or Views for ORA- errors?

I need some help in auditing in Oracle. We have a database with many tables and we want to be able to audit every change made to any table in any field. However, I find it difficult to locate the descriptions for ERROR code. For example,
So my question is which table or view holds these messages all together.
oerr - Oracle error messages, is a utility (script not an executable) which comes with unix and linux based oracle installations and can be found in the bin directory. Input to this script could be the error code.
this utility extracts error messages with suggested actions from the standard Oracle message files
Just because it uses awk functionalities, it is not supported in windows.
Usage details : http://www.oracledistilled.com/oracle-database/troubleshooting/using-the-oerr-utility-to-aid-in-error-investigation/l
SQLERRM and SQLCODE functions extract error messages and error codes, but it returns value only inside the exception handler and not in any SQLs, outside them, it always return success message!
So, I doubt if there is a possible solution for what you ask.

What Causes ORA-38910 error

I have a script which reads from XML and tries to execute the SL present in it on the database.
But I am getting the error ORA-38910 when I execute the select commands on the database.
The odd thing is the script sometimes works and sometimes does not. Also it works with smaller batches than with the entire population.
So I was hoping to learn what causes the Oracle error : ORA-38910: BATCH ERROR mode is not supported for this operation. The Oracle documentation I read on this errors, were unfortunately not very helpful for me.

ORA-03113 end of file communication

I am running a long query(having lot of subqueries) with rownum from VB6 which is giving ORA-03113 end of file on communication after approximately 1 minute. The query run fine from Toad. When the same query is run from VB6 without ROWNUM then query works fine. Also this is parameterised query, if i remove parameters and enter the values directly in query, then also query run fines from vb6.
This query was running fine few days back. Now it is not.
I tried increasing the connection timeout but still i am getting error after 1 minute. Could anyone suggest what could be the problem?
This often indicates that an ORA-00600 internal error has been thrown on the server. Check the alert log and trace files.
ORA-03113 on the client side is one of the oracle catch-all error that is thrown. You need to see if there is any additional error that accompany that error to give you an idea of the problem. The problem can be server side if there is an ORA-00600 that accompanies the ORA-03113 with the same sid/serial of the session. Check the server logs for both the ORA-03113 and any addition error. If there are no server side error, then the error is client side. Check for any network/connection related issue, but since the query works without the rownum network is probably not the cause. That means its probably a client side bug, now comes the need to enable client side tracing of the connection and see if you can generate a consistent issue and trace that you can then use to raise a case with oracle support to see if there is a bug you can get patch/fixed on the client.

Resources