SAC Imports and Unique constraint Violated issue
Hello All, here is quick blog on one of the common issues faced during SAC imports and the resolution for the same.
SAP recommends using the Content Network Storage for all your SAC object transports. This blog focuses on a solution to one of the common transport errors if you are compelled to use to ‘File System’ approach. If you want to learn about transports, refer to my blog SAC transports 101.
I want to clarify here that I was forced to use the ‘File System’ option (even though it is not recommended by SAP) since my Content Network Storage won’t respond fine to my exports.
Error: dberror(PreparedStatement.executeUpdate): 301 – unique constraint violated: Table(sap.fpa.services.contentlib.catalog::ContentCatalog.PUBLISHED_RESOURCE), Index(_SYS_TREE_RS_#634630_#0_#P0)
For some reason, the system DB (HANA DB in this case) which holds the metadata of these objects, fails to overwrite the primary key of the dashboard being imported. This happens to only the dashboards all the time. Wranglers, connections and dimension come clean during imports.
The .tgz file could be imported through ‘Drop Objects’ import option (in addition to ‘Update Objects’). This would unblock them. It acts like a drop and recreate command on the HANA DB itself forcing the object to be dropped and recreated with the same identifier.
Try the above approach if you encounter the Unique constraint error during your SAC imports in destination. Let me know if any questions / clarifications.
Thanks for the information....I always use import and export option while transporting the object. Till now i didnt used the content network for transport but now will try this one for sure.