Monday, 26 August 2013


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

Assume that you have successfully installed or upgrade your APEX, but when you tried to send an email, it's not working and you are able to see the above error in APEX_MAIL_QUEUE log.

Reason : The database user don't have a necessary permissions.

Below are some steps you need follow/check :

1. Run the below procedure as SYS user where APEX installed.

   
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_040200
-- the "connect" privilege if APEX_040200 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040200',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_040200', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_040200', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;


Above procedure will check the ACL's list and it will give the necessary permissions to the database user.

NOTE : Need to change the database user according to your APEX version.

2. Assign ACL to your SMTP host address

begin
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(
  ACL  => 'power_users.xml',
  host => 'localhost'
  );
  commit;
end;


No comments: