The UTL_TCP package in Oracle 11g cannot be used.

Source: Internet
Author: User

After switching to Oracle11g today, when UTL_TCP was used to interact with the Service Program, an ACL Access Control Problem was reported. Fortunately, there were still some network basics, what is ACL,

In the Oracle11g environment, to enhance the security of network access, the ACL is implemented in a soft way. The following describes how to break through the ACL layer and conduct a survey on DBMS_NETWORK_ACL_ADMIN in Oracle. The following is a summary:

-- ACL usage Survey
The following table lists the execution permissions related to DBCoffer:
-- Used to obtain the Host IP address or host name
BEGIN
DBMS_NETWORK_ACL_ADMIN.create_acl (
Acl => 'coffer _ acl_file.xml ',
Description => 'a test of the ACL functionality ',
-- Parameter: a user or a role
Principal => 'coffer ',
Is_grant => TRUE,
Privilege => 'resolve'
-- Start_date => policimestamp,
-- End_date => NULL
);
COMMIT;
END;
/
-- Allows users to access the Internet-related ports and IP addresses
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'coffer ',
Is_grant => TRUE,
Privilege => 'connect'
-- Position => NULL,
-- Start_date => NULL,
-- End_date => NULL
);
COMMIT;
END;
/
-- Specify a rule for this access control list
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
Acl => 'coffer _ acl_file.xml ',
Host => '*');
COMMIT;
END;
/


-- Execute this command when upgrading a DBCoffer user
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'resolve'
-- Position => NULL,
-- Start_date => NULL,
-- End_date => NULL
);
COMMIT;
END;
/


BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'connect'
-- Position => NULL,
-- Start_date => NULL,
-- End_date => NULL
);
COMMIT;
END;
/


-- When you cancel a DBCoffer user, you must execute
BEGIN
DBMS_NETWORK_ACL_ADMIN.delete_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'resolve ');
COMMIT;
END;
/


BEGIN
DBMS_NETWORK_ACL_ADMIN.delete_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'connect ');
COMMIT;
END;



-- Delete an access control list
BEGIN
DBMS_NETWORK_ACL_ADMIN.drop_acl (
Acl => 'coffer _ acl_file.xml ');
COMMIT;
END;
/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.