If you want to add new or update data for existing web map layer. You will need to upload new data from local file geodatabase to replace remote enterprise SQL server table through arcSDE. 

Short summary for no patient:

 

 

Step 1.

Use SQL server management studio to run SQL truncate table. 

 

 

 

 

 

 

 

Alternatively if you can not RUN SQL truncate table,  

use truncate tool in ArcPro, it works, no bugs. Don't use delete tool, it has bugs unfixed in current ArcPro v.3.2.1 and before. Don't know when ESRI can fix this.

 

 

 

 

 

Step 2.

 

Use append tool to upload new data into place.

 

 

 

 

 

 

 

 

Long story: 

Because of Arcgis server are using the layer on ArcSDE SQL server table is being locked. 

You can not rename old layer name( or table name ). 

You can not  copy the new layer into place. 

 

If you try to rename current layer or table name, you will get the following lock error

 

 

There are at least 3 work around that I know, each option has its own good and concern. Each option best apply in certain case. 

 

 

 

Option 1

You can hold the ArcSDE disconnect all the arcgis server connection and locks. Then you can rename old layer to another name, then copy paste new layer into place to replace old one. This method will temporary hold all arcgis server REST web service, all user will not be able to use arcgis server and everything on enterprise portal. Has the biggest impact on user. But is the easiest for you. 

 

 

 

Option 1.1

Do not allow new connection

 

 

 

 

 

 

Option 1.2

delete all connection and locks

optionally if you can find your layer's lock, you may just disconnect that lock only, sometimes, due to too many locks, hard to find the one you want, simply select all locks and kill all of them. If only delete 1 lock, you don't have to disconnect all other connection, that way, arcgis server and enterprise portal and all user may not be affected. 

 

 

Option 1.3

since I clear all locks including this lock. Rename the old layer to another name without error

 

 

Option 1.4

 Now copy paste new data layer into place. Encounter error. I try use export feature class to geodatabase tool, still same error. 

Don't forget turn back on the allow new ArcSDE connection.

 

 

 

 

 

Option 2

Do not hold ArcSDE connection. No impact on arcgis server and enterprise portal.  Just delete all rows in current layer, then use append tool to populate new data into place.

If you need to keep old data, but add new data, option 2 append tool maybe your best choice. 

 

 

 

 

 

 

 

 

 

 

Option 2.1

Use delete tool to delete all rows.

 

Delete tool does not works, it did not delete any rows. It could be ArcPro bugs. 

Delete tool not working is knowing bug click here

https://community.esri.com/t5/arcgis-pro-questions/unable-to-delete-features-with-delete-features-or/td-p/1313869

 

 

 

 

 

Option 2.2

Attribute table, select all row, then delete.

 

 

 

 

 

 

 

 

 

by

Please log in or register