Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Article 3

$
0
0

DBMS_NETWORK_ACL_ADMIN.CREATE_ACL Worked But Nothing In Dba_network_acls


APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.2 and later


SYMPTOMS:
Nothing in the dba_network_acl_privileges view after creating ACL.
Created ACL list as below.

BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl         => 'test.xml',
                                  description => 'ACL FOR test',
                                  principal   => 'TEST',
                                  is_grant    => true,
                                  privilege   => 'connect'
);
COMMIT;
END;
/

begin
 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE('TEST.xml','TEST',TRUE,'connect');
 commit;
end;
/

select * from sys.dba_network_acl_privileges;

no row selected


CAUSE:
Until ACL is not assigned to a network Host It will not be listed under ACL views.


SOLUTION:
use the following code to see the results.

BEGIN

DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(
  acl => 'test.xml',
  description => 'test ACL',
  principal => 'TEST',
  is_grant => true,
  privilege => 'connect');

DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
  acl => 'test.xml',
  principal => 'TEST',
  is_grant => true,
  privilege => 'resolve');

DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(
  acl => 'test.xml',
  host => '*');

COMMIT;

END;
/


Verify from the following SQLs

select * from dba_network_acl_privileges;
select * from net$_acl;
Select * from dba_network_acls;



Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>