Bajwa Consulting Need senior Oracle DBA help? Performance tuning, Cloud migrations, GoldenGate, backup and DR. Plus 70+ free DBA scripts.
Visit bajwaconsulting.com →

Friday, April 25, 2014

Oracle Access Control List configuration for Operating System Services

Anytime you want to use UTL_SMTP, DBMS_LDAP, UTL_HTTP anything that is depending upon the usage of operating systems network (email, web, ldap), etc.  You need to do

 
1.       Make sure that XDB database option is installed.
2.       Do the following for each schema
 

Create the ACL as sysdba

begin
 dbms_network_acl_admin.create_acl (
 acl => 'mailserver_acl.xml',
 description => 'ACL for user to connect to my SMTP Server',
 principal => 'MY_DB_USER',
 is_grant => TRUE,
 privilege => 'connect');
end;
/
commit;

Assign the ACL

begin
 dbms_network_acl_admin.assign_acl (
 acl => 'mailserver_acl.xml',
 host => 'smtp.mycompany.com',
 lower_port => 25);
end;
/
commit;
 

Add a privilege to grant/deny

begin
 dbms_network_acl_admin.add_privilege (
 acl => 'mailserver_acl.xml',
 principal => 'MY_DB_USER',
 is_grant => TRUE,
 privilege => 'connect');
end;
/
commit;

No comments:

Post a Comment