XS entity with this name already exists. [message #679704] |
Wed, 18 March 2020 06:50  |
 |
Shiv93
Messages: 34 Registered: September 2019
|
Member |
|
|
HI All,
Im Trying to create an ACL in my DB. While trying to execute I'm getting the below error messages.
Can someone let me know whats is wrong or If anyone has come across situation please let me know what needs to be done to fix it.
ORA-46212: XS entity with this name already exists.
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 556
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 228
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 534
ORA-06512: at line 20
46212. 00000 - "XS entity with this name already exists."
|
|
|
|
Re: XS entity with this name already exists. [message #679706 is a reply to message #679705] |
Wed, 18 March 2020 07:34   |
 |
Shiv93
Messages: 34 Registered: September 2019
|
Member |
|
|
HI Mike,
Thanks for your reply.. Below is my code snippet..
BEGIN
dbms_network_acl_admin.create_acl(acl => 'sample.xml',description => 'Permission for sample ACL', principal => 'PUBLIC',is_grant => true,privilege => 'connect');
commit;
end;
BEGIN
dbms_network_acl_admin.add_privilege(acl => 'sample.xml',principal => 'SCOTT',is_grant => true,privilege => 'connect');
commit;
end;
BEGIN
dbms_network_acl_admin.assign_acl(acl => 'sample.xml',host => 'MY HOST IP ADDRESS', lower_port => 8080,upper_port => 8080);
commit;
end;
Adding more first i was able to run this successfully and i got the ACL created in the DBA_NETWORK_ACLS table. Later when i removed the ACL by using the below statement and it was successful as the entry from the DBA_NETWORK_ACLS got removed.
BEGIN
DBMS_NETWORK_ACL_ADMIN.UNASSIGN_ACL(
host => 'MY HOST IP ADDRESS',
lower_port => 8080);
END;
Now when im trying to create the ACL again it says the issue with XS entity.. Please advice..
[Updated on: Wed, 18 March 2020 07:38] Report message to a moderator
|
|
|
|
Re: XS entity with this name already exists. [message #679708 is a reply to message #679707] |
Wed, 18 March 2020 08:00   |
 |
Shiv93
Messages: 34 Registered: September 2019
|
Member |
|
|
Hi BlackSwan,
Apologies for my previous reply without the full code.. Here is the below code im running it in the SQL developer..
DECLARE
acl_count NUMBER;
BEGIN
BEGIN
SELECT
COUNT(*)
INTO acl_count
FROM
dba_network_acls
WHERE
acl = '/sys/acls/sample.xml';
EXCEPTION
WHEN OTHERS THEN
acl_count := 1;
END;
IF acl_count = 0 THEN
BEGIN
dbms_network_acl_admin.create_acl(acl => 'sample.xml',description => 'Permission for sample ACL',
principal => 'PUBLIC',is_grant => true,privilege => 'connect');
COMMIT;
END;
BEGIN
dbms_network_acl_admin.add_privilege(acl => 'sample.xml',principal => 'SCOTT',is_grant => true,privilege => 'connect');
COMMIT;
END;
BEGIN
dbms_network_acl_admin.assign_acl(acl => 'sample.xml',host => 'MY HOST IP ADDRESS',
lower_port => 8080,upper_port => 8080);
COMMIT;
END;
END IF;
END;
Error :
Error report -
ORA-46212: XS entity with this name already exists.
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 556
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 228
ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 534
ORA-06512: at line 20
46212. 00000 - "XS entity with this name already exists."
*Cause: An attempt was made to create an XS entity with a name that
already belongs to another entity.
*Action: Use a different name and try again.
|
|
|
|
Re: XS entity with this name already exists. [message #679717 is a reply to message #679706] |
Wed, 18 March 2020 13:05   |
John Watson
Messages: 8977 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote:Later when i removed the ACL by using the below statement and it was successful as the entry from the DBA_NETWORK_ACLS got removed.
BEGIN
DBMS_NETWORK_ACL_ADMIN.UNASSIGN_ACL(
host => 'MY HOST IP ADDRESS',
lower_port => 8080);
END;
That doesn't remove the ACL, it unassigns it. You need the drop_acl procedure. And of course you need to learn how to use [code] tags. It isn't difficult.
|
|
|
|