Reputation: 1338
For an assignment I need to make calls to a webservice using PL/SQL, so I wanted to start by creating ACL using DBMS_NETWORK_ACL_ADMIN.CREATE_ACL
when I try this with my "normal" user it doesn't even recognize DBMS_NETWORK_ACL_ADMIN
and when I try to use it with the system user I get XS entity with this name already exists
(ORA-46212).
The code I'm using is the following:
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'www.xml',
description => 'WWW ACL',
principal => 'CLOCKGEAR',
is_grant => true,
privilege => 'connect');
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'www.xml',
principal => 'CLOCKGEAR',
is_grant => true,
privilege => 'resolve');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'www.xml',
host => 'wsf.cdyne.com');
END;
/
I'm not sure what I'm doing wrong and I hope that someone can help me with this problem.
Thanks in advance.
EDIT:
Just wanted to mention this is a local oracle DB(Version 12.2.0) in case it could be relevant.
Upvotes: 1
Views: 9875
Reputation: 6346
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => 'wsf.cdyne.com',
ace => xs$ace_type(privilege_list => xs$name_list('connect', 'resolve'),
principal_name => 'CLOCKGEAR',
principal_type => xs_acl.ptype_db));
Oracle 12c has changed approach to acl. All method use in you code are deprecated. Try now approach.
Check these links.
Upvotes: 3