sqlplus sys as sysdba
SQL>SELECT * FROM dba_network_acl_privileges;
SQL>select * from dba_network_acls;
SQL>GRANT EXECUTE ON UTL_TCP TO scott;
SQL>GRANT EXECUTE ON UTL_SMTP TO scott;
SQL>GRANT EXECUTE ON UTL_MAIL TO scott;
Assign Privileges to already present ACL
BEGIN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
acl => 'acl_for_accd.xml',
principal => 'scott',
is_grant => true,
privilege => 'connect');
COMMIT;
END;
/
BEGIN
dbms_network_acl_admin.assign_acl (
acl => 'acl_for_accd.xml',
host => 'IP Address of Email Server',
lower_port => 25,
upper_port => 80
);
COMMIT;
END;
/
OR
BEGIN
dbms_network_acl_admin.assign_acl (
acl => 'acl_for_accd.xml',
host => '*',
);
COMMIT;
END;
/
SQL>SELECT * FROM dba_network_acl_privileges;
SQL>select * from dba_network_acls;
SQL>GRANT EXECUTE ON UTL_TCP TO scott;
SQL>GRANT EXECUTE ON UTL_SMTP TO scott;
SQL>GRANT EXECUTE ON UTL_MAIL TO scott;
Assign Privileges to already present ACL
BEGIN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
acl => 'acl_for_accd.xml',
principal => 'scott',
is_grant => true,
privilege => 'connect');
COMMIT;
END;
/
BEGIN
dbms_network_acl_admin.assign_acl (
acl => 'acl_for_accd.xml',
host => 'IP Address of Email Server',
lower_port => 25,
upper_port => 80
);
COMMIT;
END;
/
OR
BEGIN
dbms_network_acl_admin.assign_acl (
acl => 'acl_for_accd.xml',
host => '*',
);
COMMIT;
END;
/