Skip to content

Instantly share code, notes, and snippets.

@seraphy
Created December 22, 2011 06:10
Show Gist options
  • Save seraphy/1509168 to your computer and use it in GitHub Desktop.
Save seraphy/1509168 to your computer and use it in GitHub Desktop.
Oracle11g開発時にデバッグ権限とPL/SQLからネットワーク接続のためのACL設定
-- デバッグする場合に必要な権限
grant debug connect session to test;
grant debug any procedure to test;
-- Oracle11gでPL/SQLからUTL_SMTPなどネットワークを使う場合には
-- あらかじめACLで許可しなければならない。
-- http://osm.utoronto.ca/i/doc/ja/sec_network_services.htm#BHADHHFH
-- http://otndnld.oracle.co.jp/document/products/oracle11g/111/doc_dvd/appdev.111/E05686-02/d_networkacl_adm.htm#BABIGEGG
-- http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_networkacl_adm.htm
-- http://ameblo.jp/archive-redo-blog/entry-10310716887.html
BEGIN
-- DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'localmail.xml',
-- description => 'local mail acl',
-- principal => 'TEST',
-- is_grant => true,
-- privilege => 'connect');
--
-- DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'localmail.xml',
-- principal => 'TEST',
-- is_grant => true,
-- privilege => 'resolve');
--
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'localmail.xml',
host => 'localhost');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'localmail.xml',
host => '127.0.0.1');
END;
/
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment