Hello.
A Customer is asking us to provide a solution for an issue that may occur by a MES Owner importing Containers via Master Data.
The use case is as follow:
MES Owner imported a new Container with name container_a. However, the container name should be Container_A.
The customer tried to import a new Container with the “correct name” Container_A.
The system reported an error “container already exists” because of the database collation settings (Latin1_General_CI_AS).
As we know, once an entity has been created the name cannot be changed and will become as read-only.
Since we are not allowed to execute database scripts, do you have any recommendations?
Thank you.
If this is not a Production scenario, my immediate recommendation would be to terminate the Container and then re-adjust the retention time and run the respective purge job to clear the record from the online DB.
For production systems it’s more tricky. While the same could be applied, there might be some side effects (depends on the modelling and the system usage). I would just keep the same name or terminate and create another with a similar name. Does the naming convention matter for other operations (e.g. barcode scanning)?
"Workaround (with side effects):
- The wrong entity needs to be terminated.
- The entity type (in this case, the entity “Container”) retention time needs to be changed to zero.
- The database job “Data Replication” needs to be executed.
- The database job “Purge Entity Types” needs to be executed.
Side Effects
- The existing terminated entities in the online database will be deleted and moved to ODS historical database because the retention time was changed to zero. "
Nevertheless, as @Ricardo_Cunha said, it is not advised to do this in a Productive environment since it can have other impacts
Hello @Ricardo_Cunha . The Container Naming Convention matters to communicate with External Systems because uses different database collation.
Thank you for the feedback.
Hello @Tiago_Cruz .
Thank you for your proposal.
I tottaly agree with you regarding production requiring more caution, when you change the retention time you are not just affecting the container with the “wrong” name, you are affecting all containers terminated before that day and still under the retention time…
Regarding the names, in some cases a possible workaround for the barcode scaning would be to use the same barcode and a different name, although I know this is not the best, is a possibility…
But if the requirement comes from the integration with another system and couldn’t the names be “transformed” when sending data to the external system?
I mean, this is part of the broader discussion of getting the feature of renaming objects.
It’s the most voted feature in the enhancement request: Authentication Portal
This would solve the described scenario - and quite a few more.
The mix of reference by id and reference by name (in smart tables and generic tables especially) is causing big issues here.
If everything would be referenced by id only, renaming would be much easier.
It that feature somewhere on the horizon? Would solve so so many issues.
All the best,
Maximilian
Hello @maximilian_jung,
This feature it’s being considered. We already had some internal discussions and there are some technical implications that are not straightforward.
Kind Regards,
João