Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to resolve Error Unique key violation detected by database(Duplicate entry for key Username) ?

VIKAS45
Tera Guru

How to resolve Error Unique key violation detected by database(Duplicate entry for key Username) ?

 

We are receiving the below Error while Import using Transform Map on User Table.

 

"FAILED TRYING TO EXECUTE ON CONNECTION glide.24 (connpid=****): Update sys_user SET u_legal_first_name = ***

Unique key violation detected by database(Duplicate entry '*****' for key 'Username'.

 

Please let me know how to resolve the Error.

1 REPLY 1

Bert_c1
Kilo Patron

See:

 

https://docs.servicenow.com/bundle/vancouver-integrate-applications/page/administer/import-sets/conc...

 

Seems you are trying to create a new record with the same value for a field that is defined as a 'unique index'. You probably want to update the existing record and not create a new record.