Oracle sends mail, permissions issues

Source: Internet
Author: User

-- Create ACL

BEGIN

Dbms_network_acl_admin. Create_acl(ACL =' Email_server_permissions.xml ',

Description=' Enables network permissionsfor the E- mail server ',

Principal =' Ljz ',

Is_grant =TRUE,

Privilege=' Connect ');

END;

?

-- associating with a mail service

BEGIN

Dbms_network_acl_admin. Assign_acl(ACL =' Email_server_permissions.xml ',

Host =' smtp.163.com ',

Lower_port =,

Upper_port =NULL);

END;

-- this Email_user A stored procedure created by a user account can send mail to this mail server

?

-- Delete

BEGIN

Dbms_network_acl_admin.drop_acl(ACL =' Email_server_permissions.xml ');

COMMIT;

END;

-- Enquiry

SELECT host, lower_port, upper_port, ACL from dba_network_acls;

SELECT ACL,

Principal,

Privilege,

Is_grant,

To_char(start_date,' dd-mon-yyyy ') as Start_date,

To_char(end_date,' dd-mon-yyyy ')as end_date

From dba_network_acl_privileges;

Oracle sends mail, permissions issues

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.