We have the following process (running on a 10.3.1 SQL SDE database from a 10.3.1 client):
Step 1. Truncate the roads feature class in Database B.
Step 2. Append the roads features into Database B from Database A (the source).
Step 3. Run arcpy.na.BuildNetwork() on our network dataset in Database B.
The network uses the roads, restricted turns, and that's about it (no elevation or anything else).
The network sometimes rebuilds fine, and sometimes has dirty areas in the entire extent of the roads feature class. This only happens from python, running from ArcCatalog, it consistently builds correctly.
Also, running arcpy.na.BuildNetwork() on a network in a File GDB works correctly.
Anyone else experienced this behavior? Any ideas as to the cause?
I can't comment on the arc py issue, but using feature datasets and the special features there in can be problematic within the SDE environment. Sounds to me like this is another example.
This sounds suspiciously like a bug. The best thing for you to do would be to contact Esri Support. They can either help you with the issue or diagnose the bug and send it off to the right team for fixing.
Shawna Ernst - did you find a solution to this? I'm having the exact same problem. Works fine in ArcCatalog, but not from Python. The BuildNetwork-process takes time in Python, so something is happening. But when I look at the Network Dataset in ArcCatalog afterwards, its empty and "Not built".
Joachim- I started a support ticket with ESRI on October 19th, and we're still working through it. I will definitely post back here when I get an answer. The ticket just got escalated and the analyst who is working on this now seems really bright- so I'm hopeful that we'll get it resolved.
Kosta- Yes, they assigned bug ID - BUG-000093420.
From looking at the bug notes, it looks like this isn't an issue in 10.4, but I haven't tested that for myself yet.