开启Oracle ACL权限

开启Oracle ACL权限

执行以下语句

BEGIN
  DBMS_NETWORK_ACL_ADMIN.create_acl (
    acl          => ‘open_acl_file.xml‘, 
    description  => ‘Open ACL File‘,
    principal    => ‘目标Oracle账号‘,
    is_grant     => TRUE, 
    privilege    => ‘connect‘,
    start_date   => SYSTIMESTAMP,
    end_date     => NULL);

  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    acl         => ‘open_acl_file.xml‘,
    host        => ‘*‘, 
    lower_port  => 1,
    upper_port  => 9999); 

  COMMIT;
END;
/

这个权限比较大:因为host是*,端口不限。在正式使用时,可以缩小权限。比如第二段改成:

dbms_network_acl_admin.assign_acl(acl => ‘open_acl_file.xml‘,
    host=> ‘ 具体IP地址 ‘,
    lower_port => 8080,
    upper_port => 8080);
END

开启Oracle ACL权限

上一篇:VoltDB Truncate Table优化,性能提高加速N倍,是不是史上最快呢?


下一篇:Sql Server 增加字段、修改字段、修改类型、修改默认值