Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have an application which needs to send emails through Oracle triggers. I understand that in Oracle 11g you must have an ACL file to grant certain schemas access to the network. My plan was to create a separate ACL file for each user that needs access to the network, and then check that it has been created properly by using the following query:

SELECT * FROM DBA_NETWORK_ACLS;

However, it seems that only one record is ever returned for this query - always the latest ACL that's been created. Does this mean that you can only ever have one ACL? If so, presumably this means that when installing this application on a client's server, I must just add privileges to their existing ACL rather than trying to create a new one?

Thanks!

UPDATE

These are the commands I'm using:

--create ACL for USER1
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(ACL => 'testacl1.xml', 
                                  DESCRIPTION => 'ACL',
                                  PRINCIPAL   => 'USER1',
                                  IS_GRANT    => TRUE,
                                  PRIVILEGE   => 'connect');
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL => 'testacl1.xml',
                                     PRINCIPAL => 'USER1',  
                                     IS_GRANT  => TRUE,  
                                     PRIVILEGE => 'resolve'); 
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(ACL => 'testacl1.xml', host => '*'); 

--create ACL for USER2
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(ACL => 'testacl2.xml', 
                                  DESCRIPTION => 'ACL',
                                  PRINCIPAL   => 'USER2',
                                  IS_GRANT    => TRUE,
                                  PRIVILEGE   => 'connect');
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL => 'testacl2.xml',
                                     PRINCIPAL => 'USER2',  
                                     IS_GRANT  => TRUE,  
                                     PRIVILEGE => 'resolve'); 
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(ACL => 'testacl2.xml', host => '*');

The problem is that testacl2 seems to be overwriting testacl1. Does this mean that I can only have one ACL file, or one ACL file per host?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Check the Creating an Access Control List for External Network Services documentation (look at step 2, after the parameter descriptions):

Only one access control list can be assigned to any host computer, domain, or IP subnet, and if specified, the TCP port range.

Your second assignment simply replaces the first. You can only have one ACL file per host/domain.

share|improve this answer
    
I was beginning to think that was the case. Thanks! –  user1578653 Jan 29 '13 at 11:04
1  
+1. So the answer is, Yes to the title, but No based on the specifics. –  Leigh Riffel Jan 29 '13 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.