Select to view content in your preferred language

Can I add fields to feature class using SQL?

1677
3
Jump to solution
10-15-2019 11:10 PM
BenVan_Kesteren1
Deactivated User

hey, 

I know in the past I have risked corrupting my ESRI Enterprise Geodatabase as I have added/removed tables using SQL, this was a hard learned lesson as I didnt know there were references to these tables, in other tables (table registry etc).

When it comes to adding or dropping fields, can I do this using SQL rather than using the arcpy or geoprocessing tools? I am finding my map services are creating locks on my datasets, and the tools fail to run.

I know in the past if I use SQL this will bypass the locks and fields can be added/removed with no issues, but I am now fearful that as this is an ESRI database, could this have knock on effects that come back to bite me later.

Any thoughts with this?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

I would not recommend editing the schema within SQL Server Management Studio. 

View solution in original post

0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Ben,

I would recommend disabling schema locking.  This will allow you to make schema changes without having to stop the service:

Disable schema locking on a map service—ArcGIS Server Administration (Windows) | ArcGIS Enterprise 

BenVan_Kesteren1
Deactivated User

I will investigate this, see if it will help.

So does this mean I cannot edit the tables (adding & dropping new fields) safely using SQL?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

I would not recommend editing the schema within SQL Server Management Studio. 

0 Kudos