smt-scc-sync and smt-sync returning mysql::db do failed: Duplicate entry errors
This document (7017148) is provided subject to the disclaimer at the end of this document.
Environment
Situation
After migrating a SMT 11 SP3 server from the NCC to the SCC, the following errors occur when attempting to run a smt-scc-sync or an smt-sync:
2016-01-12 22:55:23 SMT::SCCSync - [error] DBD::mysql::db do failed: Duplicate entry '286-954' for key 'PRIMARY' at /usr/lib/perl5/vendor_perl/5.10.0/SMT/SCCSync.pm line 1305.
2016-01-12 22:55:23 SMT::SCCSync - [error] DBD::mysql::db do failed: Duplicate entry '527-788' for key 'PRIMARY' at /usr/lib/perl5/vendor_perl/5.10.0/SMT/SCCSync.pm line 1305.
2016-01-12 22:55:23 SMT::SCCSync - [error] DBD::mysql::db do failed: Duplicate entry '565-583' for key 'PRIMARY' at /usr/lib/perl5/vendor_perl/5.10.0/SMT/SCCSync.pm line 1305.
2016-01-12 22:55:23 SMT::SCCSync - [error] DBD::mysql::db do failed: Duplicate entry '452-778' for key 'PRIMARY' at /usr/lib/perl5/vendor_perl/5.10.0/SMT/SCCSync.pm line 1305.
...
Resolution
To resolve the issue do the following on the Subscription Management Tool server:
(-u <user> -p <DBname>: default are for both "smt") $> echo "DELETE FROM ProductCatalogs WHERE SRC='N'" | mysql -u smt -p smt Enter password: $> echo "DELETE FROM Products WHERE SRC='N'" | mysql -u smt -p smt Enter password: $> echo "DELETE FROM Catalogs WHERE SRC='N'" | mysql -u smt -p smt Enter password:
This will remove the duplicate entries that are causing the error messages to occur.
Cause
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7017148
- Creation Date: 13-Jan-2016
- Modified Date:28-Sep-2022
-
- Subscription Management Tool
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com