08 Sep 2021
Link to this post
I'm a new developer for an existing TPC implementation where there is a portal deployed in PRD and UAT (both hosted in Azure app services). Now I'm trying to setup my local machine to develop new functionalities, but I'm struggling with the source code that I got from previous developer which is not working/running successfully. I basically took a copy of UAT database and tried to set connection string on that DataConfig file pointing to my local DB. I understood that the DB will have the latest version of everything (content, users, customizations in general), is that right? But still, it's not working and I see a lot of errors related to duplicated primary keys - see a few examples below:
Message: Invalid root node configured for pages. No root node with the name of "f669d9a7-009d-4d83-ddaa-000000000002".
"Violation of PRIMARY KEY constraint 'pk_sf_meta_attribute'. Cannot insert duplicate key in object 'dbo.sf_meta_attribute'. The duplicate key value is (0cd36175-6314-4e4c-8e60-821211271f18). " (a lot of this errorsin PackagingTrace.log file)
Is there any guidelines for a situation like this? Can a development machine be setup just by getting a backup of DB in production? What if the source code is not reliable in comparison to what is deployed in prod? Is there any other reverse path to setup my dev machine from existing portal?
If not possible, what should the status of my VS solution/source code in comparison to what is deployed in my existing environments?
I really appreciate any inputs on this.