Network diagram building process is based on diagram rule & layout definitions configured on the diagram template that users choose at the time they create a diagram.
Also, diagram display reflects diagram layer definition set up on this diagram template.
When an Enterprise SQL geodatabase is created with ArcGIS Pro versions prior to 3.0, these definitions are stored in the Templates table with a fully qualified object name, database.owner.table.
Once this Enterprise SQL geodatabase is upgraded to 3.0/11.0 or higher, the fully qualified name of tables and feature classes no longer contain the database name. That is, the ArcGIS client returns each table and feature class name without the database name: owner.table.
However, the diagram template definitions still reference the database name in the upgraded geodatabase causing mismatching that impact your network diagram workflow.
In this situation, whether you are working with the SDE direct connection or consuming the related published service, this results in the following bad consequences:
To avoid such mismatching, there are two distinct workflow:
A - The first one is the simplest and starts before you upgrade your Enterprise SQL geodatabase. It only applies standard Pro tools.
B - The second one concerns Enterprise SQL geodatabases that are already upgraded. It runs a custom console app to upgrade template definitions.
These two workflow are detailed in the following sections.
NOTE: This workflow is the one to run when you did not upgrade your Enterprise SQL geodatabase yet. It prevents the geodatabase and template definition mismatching described above.
This workflow consists of 3 simple steps.
1/ Exporting the diagram template definitions
2/ Upgrading the Enterprise SQL geodatabase
3/ Importing the diagram template definitions
Post Requirement: Re-start the related services.
NOTE: In the WorkflowA.zip file attached below, you will find a custom toolbox with two simple script tools that you can use to apply step#1 and #3 more efficiently. They loop on each diagram template existing for the utility network or trace network you provide as an input to:
Note that these two custom script tools can also help in other scenarios.
NOTE: This workflow is the one to run when you already upgraded your SQL Server Enterprise SQL geodatabase. It allows fixing the failures that start raising up after this upgrade.
In this situation, both the diagram rule & layout and diagram layer definitions must be updated by removing the persisted database name occurrences for each existing diagram template.
If you end up in such a situation, download the WorkflowB.zip files attached with this post and run the workflow steps detailed in the WorkflowB_ReadMe PDF document to fix your diagram template definitions.