Oracle Database Job run issue-ora01031, insufficient privileges ora06512 - oracle

I am very new to oracle and dont have much of an idea of how to resolve this problem.
I have two schema ERM22_TEST and ERM22_TEST_CUSTOM
One package exists in RM22_TEST.ASYNC_JOB_QUEUE_COMMAND_BAS
and another package in ERM22_TEST_CUSTOM.C_PSP_INTERFACE
I have a job scheduler in ERM22_TEST_CUSTOM schema, which exports the data from a view in to CSV file, but when I click on run job it gives me the error:
ORA-01031: insufficient privileges
ORA-06512: at "ERM22_TEST.ASYNC_JOB_QUEUE_COMMAND_BAS", line 101
ORA-06512: at "ERM22_TEST.ASYNC_JOB_QUEUE_COMMAND_BAS", line 106
ORA-06512: at "ERM22_TEST_CUSTOM.C_PSP_INTERFACE", line 39
ORA-06512: at "ERM22_TEST_CUSTOM.C_PSP_INTERFACE", line 95
But it same export I do form my application than it export the data in csv file. Both user name are not same which run the database job and run the job from application client.
I just know it has some issue of granting the access but I have no idea how to grant access to ERM22_TEST_CUSTOM schema which run a package in another schema ERM22_TEST.
ORA-01031: insufficient privileges
ORA-06512: at "ERM22_TEST.ASYNC_JOB_QUEUE_COMMAND_BAS", line 101
ORA-06512: at "ERM22_TEST.ASYNC_JOB_QUEUE_COMMAND_BAS", line 106
ORA-06512: at "ERM22_TEST_CUSTOM.C_PSP_INTERFACE", line 39
ORA-06512: at "ERM22_TEST_CUSTOM.C_PSP_INTERFACE", line 95

Related

Oracle Cloud, access Flask Server on Compute Instance from Autonomous Database

I build a Flask Python REST app on a Oracle Cloud compute instance. The REST Call works from my client just fine. (I added Ingress Rule for 0.0.0.0/0).
My plan is to have the Comupute Instance only accesible from my ATP Database and call the REST Service from PL/SQL. When I try to call the Webservice, I get the following error:
DECLARE
l_clob CLOB;
BEGIN
l_clob := apex_web_service.make_rest_request(
p_url => 'https://130.zz.yy.xx:5000/test',
--p_url=> 'https://httpbin.org/get',
p_http_method => 'GET'
);
END;
Error report -
ORA-29273: HTTP request failed
ORA-06512: at "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1182
ORA-06512: at "APEX_220100.WWV_FLOW_WEB_SERVICES", line 782
ORA-01031: insufficient privileges
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1209
ORA-06512: at "APEX_220100.WWV_FLOW_WEB_SERVICES", line 756
ORA-06512: at "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1023
ORA-06512: at "APEX_220100.WWV_FLOW_WEB_SERVICES", line 1371
ORA-06512: at "APEX_220100.WWV_FLOW_WEBSERVICES_API", line 568
ORA-06512: at line 5
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
Normal REST Calls work just fine. What could be the problem?
The ATP can not access the compute instance because of some network settings?
ATP is not happy with the SSL settings or some other nasty HTTPS stuff?
The restrictions of calling REST APIs from APEX on autonomous database are outlined here:
https://docs.oracle.com/en/cloud/paas/atp-cloud/atpgs/autonomous-apex-web-services.html
So ...
must be a public endpoint, and the SSL certificate must be provided by a public CA.
For HTTPS, only the default port (443) is allowed; other ports raise the error message you're seeing.
configuring a proxy server in APEX is not supported on ADB; you then also
get the "Insufficient Privileges" error.

How to solve : ORA-02019: connection description for remote database not found?

It's my first time with stored procedures in Oracle.
I have the following .Net class :
Public Class Class1
Public Shared Function StoredProcedure1() As String
Return "coucou"
End Function
End Class
I want to use this class from Oracle. I followed the steps to deploy the class on Visual Studio. The deployment was successful.
Now when I go on Oracle and I query :
select STOREDPROCEDURE1 from dual
I'm getting the error :
ORA-02019: connection description for remote database not found
ORA-06512: at "SYS.DBMS_CLR", line 243
ORA-06512: at "SYS.DBMS_CLR", line 42
ORA-06512: at "SYS.DBMS_CLR", line 236
ORA-06512: at "SCHEMA.STOREDPROCEDURE1", line 6
02019. 00000 - "connection description for remote database not found"
I don't understand where this error is coming from. I'm not using any database link in this function or whatever.
Can anyone help please ?
Thanks

Oracle 12c impdp fails when executed fromt the command line

Trying to use impdp to do a data refresh on an Oracle 12c database:
Receive the following error after invoking the impdp from the command line:
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-00942: table or view does exist
ORA-06512: at "SYS.KUPU$UTILITIES_INT", line 1579
ORA-06512: at "SYS.KUPM$MCP", line 2710
ORA-39097: Data Pump encountered unexpected error -942
I found a post that made reference to GSM objects not being available, but there was no confirmation or response to this.
All the GSM schemas have been removed from the database I am working in.

How can a add acl rules for Oracle 11g to allow pl/sql upload file

In Oracle 11g ,the database has an Fine-Grained network access control list, so when i use pl/sql to upload a file to the ftp_server,it gives me a network access error.
The error information like this:
error at 1 line:
ORA-29260: network error:not connected
ORA-06512: at "SYS.UTL_TCP", line 212
ORA-06512: at "SYS.UTL_TCP", line 432
ORA-06512: at "SCOTT.FTP", line 413
ORA-24247: Network access rejected by acl
ORA-06512: at "SCOTT.FTP", line 491
ORA-06512: at line 6
I want to know how can i do about creating acl rules so that i can get the privilege.
Thanks
Here's a tutorial about ACL in Oracle.

error: 553 sorry, that domain isn't in my list of allowed rcpthosts

I want send the email from oracle database.
So I did the following steps
#F:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlmail.sql
#F:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\prvtmail.plb
alter system set smtp_out_server = 'webmail.vilsoft.co.in:25' scope=both;
exec utl_mail.send(sender=> 'Id1#vilsoft.co.in',
recipients=>'Id2#vilsoft.co.in',
subject=>'test mail',message=>'hi');
PL/SQL procedure successfully completed.
So the mail is send to Destination Correctly.
But When I want to send the mail from one server to another server So i execute the following query
SQL> exec utl_mail.send(sender=> 'ID1#vilsoft.co.in',recipients=>'Id2#gmail.com',
subject=>'test mail',message=>'hi');
then following error occurs....
BEGIN utl_mail.send(sender=> 'ID1#vilsoft.co.in',recipients=>'Id2#gmail.com',
subject=>'test mail',message=>'hi');
END;
*
ERROR at line 1:
ORA-29279: SMTP permanent error: 553 sorry, that domain isn't in my list of
allowed rcpthosts (#5.7.1)
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at "SYS.UTL_MAIL", line 424
ORA-06512: at "SYS.UTL_MAIL", line 594
ORA-06512: at line 1
So Please help me to resolve this error ...
This is not an Oracle error per se - Oracle is simply reporting back an error it received from the mail system. The error message itself (SMTP 553) can mean several things, among them that your ISP does not allow unauthenticated sending of mail outside your domain, or that your local network security policy does not allow mail to be sent from your mail server to addresses in the gmail.com domain, or that the mail server you're sending to sees your domain or address on a blacklist. Talk to your ISP to verify.

Resources