Advertisement
lathap10

Untitled

Apr 2nd, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. begin
  2. DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE('<YOUR_ACL>.xml','<USERNAME>',TRUE,'connect');
  3. commit;
  4. end;
  5. /
  6.  
  7.  
  8. col PRINCIPAL format a10
  9.  
  10.  
  11. select acl, principal, privilege from dba_network_acl_privileges;
  12.  
  13.  
  14. column host format a30
  15. column acl format a25
  16. select * from dba_network_acls
  17.  
  18.  
  19. BEGIN
  20. DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(
  21. acl => 'mail-abbott.xml',
  22. description => 'Network permissions for mail.abbott.com',
  23. principal => 'GANGIVX',
  24. is_grant => TRUE,
  25. privilege => 'connect');
  26. END;
  27.  
  28. BEGIN
  29. DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
  30. acl => 'mail-abbott.xml',
  31. host => 'mail.abbott.com',
  32. lower_port => 2525,
  33. upper_port => 2525);
  34. END;
  35.  
  36. BEGIN
  37. DBMS_NETWORK_ACL_ADMIN.UNASSIGN_ACL (
  38. acl => 'mail-abbott.xml',
  39. host => 'mail.abbott.com',
  40. lower_port => 25,
  41. upper_port => 25);
  42. END;
  43.  
  44.  
  45. DBMS_NETWORK_ACL_ADMIN.UNASSIGN_ACL (
  46. acl IN VARCHAR2 DEFAULT NULL,
  47. host IN VARCHAR2 DEFAULT NULL,
  48. lower_port IN PLS_INTEGER DEFAULT NULL,
  49. upper_port IN PLS_INTEGER DEFAULT NULL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement