Hi all.
I have an Apex 19 installation runinng on 11.2.0.4. When trying to create Network ACL fails.
This is my code (connected as sys as sysdba):
declare
l_username varchar2(30) := 'APEX_190200';
begin
dbms_network_acl_admin.append_host_ace(
host => 'smtp.gmail.com',
lower_port => 587,
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => l_username,
principal_type => xs_acl.ptype_db));
commit;
end;
and this throws the following error:
Error at line 1
ORA-06550: line 7, column 14:
PLS-00201: identifier 'XS$ACE_TYPE' must be declared
ORA-06550: line 4, column 3:
PL/SQL: Statement ignored
Script Terminated on line 1.
Initially i thought the error was because i didn't created the ACL as part of the installation procedure. But i retry the operation and keeps failing:
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_190200
-- the "connect" privilege if APEX_190200 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_190200',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_190200', 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_190200', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
Any idea on what is happening here?
Thanks in advance !!!.