Once in a while, user add some data for example fire unit change. You will need to upload new data from local file geodatabase to replace remote enterprise SQL server table through arcSDE. 

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







Option 2.2

Attribute table, select all row, then delete.




Option 2.3

Use SQL server management studio to run SQL truncate table. 








Option 2.4

use truncate tool, it works, no bugs







Option 2.x.1, final step

before you upload, double check make sure in order

1. you convert seconds to minutes by divide 60. 

 2. There is bug in
arcpro, if null value divide by 60, Arcade will output result as 0, which is wrong. It should be null. This is unfixed bug. To work around, you have to convert 0 to null again, see my other post how to convert 0 to null use 3 different options. 




Use append tool to upload new data into place.









Please log in or register