Home » SQL & PL/SQL » SQL & PL/SQL » XS entity with this name already exists. (Oracle form 12c )
XS entity with this name already exists. [message #679704] Wed, 18 March 2020 06:50 Go to next message
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 #679705 is a reply to message #679704] Wed, 18 March 2020 07:16 Go to previous messageGo to next message
Michel Cadot
Messages: 67369
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

From your previous topic:

Michel Cadot wrote on Sun, 05 January 2020 08:24

...
We can't debug code we don't see, please post it.
Before, Please read How to use [code] tags and make your code easier to read...
Re: XS entity with this name already exists. [message #679706 is a reply to message #679705] Wed, 18 March 2020 07:34 Go to previous messageGo to next message
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 #679707 is a reply to message #679706] Wed, 18 March 2020 07:42 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
Help me & us understand below
>ORA-06512: at line 20
Yet the code you posted above does NOT contain 20 lines.

PLEASE use COPY & PASTE along with sqlplus to show us EXACTLY what you do & how Oracle responds when the error gets thrown
Re: XS entity with this name already exists. [message #679708 is a reply to message #679707] Wed, 18 March 2020 08:00 Go to previous messageGo to next message
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 #679710 is a reply to message #679708] Wed, 18 March 2020 08:47 Go to previous messageGo to next message
Michel Cadot
Messages: 67369
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Wed, 18 March 2020 13:16

From your previous topic:

Michel Cadot wrote on Sun, 05 January 2020 08:24

...
We can't debug code we don't see, please post it.
Before, Please read How to use [code] tags and make your code easier to read...
Re: XS entity with this name already exists. [message #679717 is a reply to message #679706] Wed, 18 March 2020 13:05 Go to previous messageGo to next message
John Watson
Messages: 8347
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.
Re: XS entity with this name already exists. [message #679722 is a reply to message #679717] Thu, 19 March 2020 04:18 Go to previous message
Shiv93
Messages: 34
Registered: September 2019
Member
John,
Thanks for the reply. It worked after dropping the ACL procedure.
Previous Topic: ORACLE :::Is there any other way to drop the column with out uncompression table in oracle database
Next Topic: Moving sequences from one schema to other with the next value.
Goto Forum:
  


Current Time: Fri Sep 25 12:01:25 CDT 2020