Begin Dbms_network_acl_admin.create_acl (-- create an access control file (ACL) Acl => 'utl _ http. xml', -- file name Description => 'HTTP access', -- description Principal => 'its ', -- authorizes or disauthorizes an account. It is case sensitive. Is_grant => TRUE, -- authorize or cancel authorization Privilege => 'connect ', -- List of authorized or unauthorized Permissions Start_date => null, -- start date End_date => null -- end date ); Dbms_network_acl_admin.add_privilege (-- add an access permission list item Acl => 'utl _ http. xml', -- Name of the created acl Principal => 'its ', -- authorizes or disauthorizes a user Is_grant => TRUE, -- same Privilege => 'resolve', -- permission list Start_date => null, End_date => null ); Dbms_network_acl_admin.assign_acl. Acl => 'utl _ http. xml ', Host => '192. 1.2.1 ', -- IP address or domain name, fill in http: // localhost: 100/hello and http: // localhost: 9000/will report that the host is invalid -- IP addresses or domain names are recommended. If localhost is used, problems may occur when oracle is not installed on the local machine. Lower_port => 9000, -- the starting port number for access Upper_port => Null -- the end port number for access ); Commit; End; Begin Dbms_network_acl_admin.assign_acl (-- you can authorize multiple hosts or multiple ports of multiple hosts. Acl => 'utl _ http. xml ', Host => '10. 100.49.138 ', Lower_port => 80, Upper_port => NUll ); Commit; End; Request test: |