Possibility to change query layer definition with arcpy (not definition query)

328
7
02-13-2014 08:38 AM
Status: Open
Labels (1)
PiotrIwaniuk
New Contributor III

Now I cannot do that. I need to change schema name (schema.tablename) in big set of symbolized layers. Repair datasource of course doesn't work, definition query is different thing as well. I realized that I can't automate my task with arcpy.

7 Comments
RonnieRichards
Agree. Query Layers do not work well when things change such as the database, server or schema. Especially when they are part of map services. We basically have to recreate them between dev/test/production environments and its painful since there is no layer copy option to copy the layer properties for symbology, def queries, labeling, etc... 
RonnieRichards
Agree. Query Layers do not work well when things change such as the database, server or schema. Especially when they are part of map services. We basically have to recreate them between dev/test/production environments and its painful since there is no layer copy option to copy the layer properties for symbology, def queries, labeling, etc... 
MichaelVolz
This would be an extremely useful feature as my organization is looking to build an operational database using ST_Geometry where this data would be accessed in ArcGIS Server services and ArcMap layers using Query Layers.  The data would be stored in an Oracle database (11g to start) and my organization would eventually upgrade the database to Oracle 12c so the database connection informationof the query layers would need to be updated.
VitalijusAgejevas1
Agree, missing arcpy automation functionality for changing query layer datasource and other properties. Very painfull when migrate between dev/test/prod environments, need to fix layer connections manually.
KatieBrander
Agree. We are currently migrating from an Oracle 10g database to Oracle 11g and have many mxd's to update. Arcpy allows us to script and automate some of the layer datasources, but we cannot totally automate the process due to this missing functionality.
MichaelVolz

Is there any update on this idea with python 3.x that is shipped with Pro?

KoryKramer

None that I know of.