Executive Summary
ora 24247 Ensure that an access control list (ACL) has been assigned to the target host — Solution: From 11g onward, to send mail using UTL_MAIL or UTL_SMTP, ACL need to be created in the database. Set the SMTP_OUT_SERVER parameter.
The ORA-24247 error, signifying "network access denied by access control list (ACL)," is a common hurdle encountered by Oracle database administrators and developers — 總結:ACL是從11G後才有的功能,很多企業發送郵件的設定都是從10G或之前開始的,但是在11G的時候就會報這個錯誤,通過以上配置之後終於可以發送郵件了。 This error fundamentally indicates that a database user or process is attempting to establish network connectivity to an external resource, but the Oracle database's security configuration, specifically its Access Control Lists (ACLs), is preventing this accessORACLE DB使用網路服務時出現ORA-24247: 存取控制清單 This security measure was significantly enhanced starting with Oracle 11g, impacting operations that involve network-related PL/SQL packages such as UTL_TCP, UTL_HTTP, UTL_SMTP, and UTL_MAIL — 利用utl_smtp发送邮件的时候,会出现如下错误,具体方法如下: ORA-20001: The send mail was error. ORA-24247: network access denied by access
Understanding the root cause of ORA-24247 is crucial for maintaining seamless database operationsI finally created a set ACLs for the owner of the package. That solved the " ORA - 24247 : network access denied by access control list (ACL)" for me. You may want Essentially, since Oracle 11g, the database employs a more granular security model for network operationsORACLE DB使用網路服務時出現ORA-24247: 存取控制清單 Instead of blindly allowing outbound network requests, it requires explicit permission granted through ACLsSolution: This is because the SCOTT does not have the privilege to access the mail/smtp server. So it must be added to the ACL. If a user or a PL/SQL code relies on these network packages without the necessary ACL configuration, the network access denied by access control list (ACL) error will be triggeredResolving the ORA-24247: network access denied by ACL error This is a deliberate security feature designed to prevent unauthorized or unintended network access from within the databaseORA-24247: network access denied by access control list
The Role of Access Control Lists (ACLs) in Oracle Security
Access Control Lists (ACLs) in Oracle function as a firewall for network operations originating from the database — The problem is that when I add call to this procedure to a trigger on a table (idea is that when we process interface record we send status over to sending They define which network hosts and ports database users or schemas are permitted to connect to — 原因: 我們參考了Oracle Doc ID 1209644.1,從Oracle 11gR1 之後由於安全性的提升,我們想要使用DBMS_NETWORK_ACL_ADMIN package 來操作 Access Control When a database process attempts to use a network-enabled package, Oracle checks the associated ACL to verify if the required permissions are granted今天在使用utl_smtp的package發送e-mail時,出現了 ORA - 24247 : 存取控制清單(ACL) 拒絕網路存取. UTL_MAIL、UTL_SMTP、UTL_HTTP、UTL_TCP 等Package允許DB Server使用 If no access control list (ACL) has been assigned to the target host, or if the existing ACL does not grant the necessary privileges, the ORA-24247 error is raised — This error occurs if you're trying to access a URL on Oracle23ai from within the database and don't have the Network ACL defined to access
The need for ACLs becomes apparent when considering scenarios like sending emails via UTL_SMTP or UTL_MAIL, fetching data from external web services using UTL_HTTP, or establishing generic TCP connectionsORA-24247: network access denied by access control list For instance, if you are trying to access a URL on Oracle23ai from within the database, and the relevant ACL is not set up, you will encounter this errorResolving the ORA-24247: network access denied by ACL error Similarly, when migrating from older versions like Oracle 10g or earlier to Oracle 11g or later, configurations that previously worked might now fail due to the introduction of ACLs — 總結:ACL是從11G後才有的功能,很多企業發送郵件的設定都是從10G或之前開始的,但是在11G的時候就會報這個錯誤,通過以上配置之後終於可以發送郵件了。 Many organizations that initiated their email sending configurations before Oracle 11g often face this issue upon upgradingError "ORA-24247: network access denied by
Resolving the ORA-24247 Error: Practical Solutions
The primary solution to the ORA-24247 error involves the proper configuration of Access Control Lists (ACLs) — ERROR : While sending mail using utl_mail or utl_stmp in oracle 11g, you may get access denied error: begin utl_mail.send(sender This is typically achieved using the DBMS_NETWORK_ACL_ADMIN package, a powerful utility for managing network access privileges — Have you just upgraded or implemented new functionality and encountered the ORA - 24247 error? Learn how to resolve it in one simple step. The most direct method is to create an ACE using the DBMS_NETWORK_ACL_ADMIN — 产生这个问题的原因:在Oracle 11g有一个新的特性:您可以将执行权限程序包授予任何人,但要控制他们可以调用的资源。例如,utl_tcp 可限制为仅调用几个IP地址 APPEND_HOST_ACE procedureI'm trying to debug a procedure using "Oracle SQL Developer" version 23.1.0.097 from a PC with Windows 11. I have established a connection to a remote Oracle This procedure allows you to define specific hosts, ports, and the users or roles that are granted permission to access them — You may have encountered ORA-24247: network access denied by access control list (ACL ) and wondered "who has access to what from my database
Here's a general approach to resolving the error:
1 — 总结:ACL是从11G后才有的功能,很多企业发送邮件的设置都是从10G或之前开始的,但是在11G的时候就会报这个错误,通过以上配置之后终于可以发送邮件了。 Identify the Target Resource: Determine the hostname or IP address and the port the database is trying to connect to — 总结:ACL是从11G后才有的功能,很多企业发送邮件的设置都是从10G或之前开始的,但是在11G的时候就会报这个错误,通过以上配置之后终于可以发送邮件了。 This information is often evident from the context of the operation that triggered the errorORA-24247 while debugging from SQL Developer - Ask TOM For example, if sending an email, it would be the SMTP server's address — You may have encountered ORA-24247: network access denied by access control list (ACL ) and wondered "who has access to what from my database
2 — 今天在使用utl_smtp的package發送e-mail時,出現了ORA-24247: 存取控制清單(ACL) 拒絕網路存取 . 在Oracle 11g之後,加強了安全性,如果想要使用外部網路 Use `DBMS_NETWORK_ACL_ADMIN`: Execute commands to create or modify an ACL — The dreaded ORA-24247: network access denied by access control list (ACL ) ORA-06512. We are moving from 11g to 12c for our ERP system. A common scenario involves granting privileges to a specific user or role for a particular host and portSolution: From 11g onward, to send mail using UTL_MAIL or UTL_SMTP , ACL need to be created in the database. For instance, to allow a user to send emails through a specific SMTP server:
```sql
-- Example: Granting privileges to user 'SCOTT' to access an SMTP server on port 25
BEGIN
DBMS_NETWORK_ACL_ADMINORA-24247: Network Access Denied by Access Control List CREATE_ACL(
acl => 'smtp_permissionsQuery to find users granted an ACL - apex_debugxml',
description => 'ACL for SMTP access',
principal => 'SCOTT',
is_grant => TRUE,
privilege => 'connect',
start_date => SYSTIMESTAMP,
end_date => NULL
);
DBMS_NETWORK_ACL_ADMIN — ora - 24247 :网络访问被访问控制列表(acl)拒绝--创建ACLBEGINDBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl=>'email_server_permissions.xml' ASSIGN_ACL(
acl_path => 'smtp_permissions — The best solution to the ORA-24247 error is to create an ACE using the DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE procedure to grant access control xml',
host => 'your_smtp_serverORA-24247: network access denied by access control list (ACL)com',
low_port => 25,
high_port => 25
);
COMMIT;
END;
/
```
It is essential to ensure that an access control list (ACL) has been assigned to the target host and that the necessary privileges, such as 'connect', are grantedORA-24247: network access denied by access control list
3I finally created a set ACLs for the owner of the package. That solved the " ORA - 24247 : network access denied by access control list (ACL)" for me. You may want Granting Specific Privileges: The `APPEND_HOST_ACE` procedure is particularly useful for adding specific entries to an existing ACLError ORA-24247: network access denied by access control For example, if you need to grant a user permission to access a web server:
Related Articles
Frequently Asked Questions
Here are the most common questions about ora 24247.
Leave a Comment
Share your thoughts, feedback, or additional insights on this topic.
