Oracle 12c Apex 4.2 ORA-24247 network access denied by access control list (ACL)

对着背影说爱祢 提交于 2020-06-13 00:05:14

问题


hope you can help me too.

I'm developing an APEX-Application.

Oracle 12c APEX 4.2.  

I'm using the workspace wrk_projects in pdborcl.

I need some information about the client. The client will act in the same domain.
So I'm building a report:

select utl_inaddr.get_host_name(sys_context('userenv','ip_address')) as hostname from dual;

When I run it:

report error:
ORA-24247 network access denied by access control list (ACL)

My question is: I have to define the ACL in the container or in pdb?
How to find out the user I have to grant the ACL to? Any other tips?


回答1:


Oracle Apex Documentation: Granting Connect Privileges in Oracle Database 12c

Which can be found under "Oracle Application Express Application Builder User's Guide -> Managing Application Security"

Procedures CREATE_ACL, ASSIGN_ACL, ADD_PRIVILEGE and CHECK_PRIVILEGE in DBMS_NETWORK_ACL_ADMIN are deprecated in Oracle Database 12c. Oracle recommends using APPEND_HOST_ACE instead. The following example demonstrates how to grant connect privileges to any host for the APEX_050000 database user. This example assumes you connected to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role.

BEGIN
    DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
        host => '*',
        ace => xs$ace_type(privilege_list => xs$name_list('connect'),
                           principal_name => 'apex_050000',
                           principal_type => xs_acl.ptype_db));
END;
/

The following example demonstrates how to provide less privileged access to local network resources. This example enables access to servers on the local host only, such as email and report servers.

BEGIN
    DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
        host => 'localhost',
        ace => xs$ace_type(privilege_list => xs$name_list('connect'),
                           principal_name => 'apex_050000',
                           principal_type => xs_acl.ptype_db));
END;
/

Other than that, it might depends on how you have configured apex in your db. Are you using apex in the cdb and are the apex objects linked up (thus: one apex install for all db's) or are you using different apex installations per pdb. I'm guessing it's just the single install. My guess (I'm no DBA) is that you'll have to grant it to the user in the root.



来源:https://stackoverflow.com/questions/32137651/oracle-12c-apex-4-2-ora-24247-network-access-denied-by-access-control-list-acl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!