ORA-24247:network access denied by access control list (ACL) 的处理方法

ORA-24247 在11g及以上版本会碰到此问题。这是因为Oracle在安全方面做了升级,导致要对一些系统包的使用前需要先获得授权,而这个授权不是简简单单的通过grant就可以完成的。

下面举例说明问题的解决步骤和思路,需要用到的包为 DBMS_NETWORK_ACL_ADMIN,需要DBA权限去执行:


--首先,如果不存在访问控制文件,那么就创建一个

--如果已经有了,那么就忽略这一步,除非你想有序化进行管理,那么就重新创建一个

begin

DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'Resolve_Access.xml',

description => 'Resolve Access',

principal => 'LMSYS',

is_grant => true,

privilege => 'connect');

end;

--其次,为某个SCHEMA增加访问权限,权限分resolve和connect两种(必须全小写),需要根据具体使用的包来确定

--具体的,is_grant的说明说得很清楚了

/*

Network privilege to be granted or denied - 'connect | resolve' (case sensitive). A database user needs the connect privilege to an external network host computer if he or she is connecting using the UTL_TCP, UTL_HTTP, UTL_SMTP, and UTL_MAIL utility packages. To resolve a host name that was given a host IP address, or the IP address that was given a host name, with the UTL_INADDR package, grant the database user theresolve privilege.

*/

begin

DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'Resolve_Access.xml',

principal => 'SCOTT',

is_grant => true,

privilege => 'resolve');

end;

--由于发邮件时我指定的是IP,而不是hostname,所以第二步就不需要做了。

--第三步,授权从某主机上可以访问。host支持IP或主机名,并支持通配符*,指定主机名时要注意大小写是敏感的。

begin

DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'Resolve_Access.xml',

host => '*');

end;

--最后一步,提交

commit;

https://www.cnblogs.com/ianxu/p/10417833.html

相关推荐
q***01779 小时前
【MySQL】表的基本操作
数据库·mysql·oracle
g***727013 小时前
【MySQL】数据库和表的操作
数据库·mysql·oracle
“αβ”14 小时前
MySQL库的操作
linux·服务器·网络·数据库·c++·mysql·oracle
wljt15 小时前
Redis常用命令
数据库·redis·oracle
秋邱17 小时前
驾驭数据洪流:Python如何赋能您的数据思维与决策飞跃
jvm·算法·云原生·oracle·eureka·数据分析·推荐算法
s***45320 小时前
解决Spring Boot中Druid连接池“discard long time none received connection“警告
spring boot·后端·oracle
cqsztech1 天前
windows上主机名长度超过16个字符导致连接报:ORA-12518
oracle
友友马2 天前
『MySQL』 - 事务 (二)
数据库·mysql·oracle
ashane13142 天前
Flask-SQLAlchemy db 使用说明
数据库·oracle
Leon-Ning Liu2 天前
Oracle Data Guard Broker RedoRoutes 属性配置文档
数据库·oracle