0

Is it possible to change the parameters highlighted in the screenshot below? If so which ArcPy function would do this? I know about and do not want to use the function that references .sde files on C:\ In the example below AUWEISQL1 will change I want to AUWEISQL3.

enter image description here

  • 2
    Your title says "Script for" but your question body says "without using scripts " - which is it? – PolyGeo Dec 4 '15 at 3:02
0

In ArcGIS, you add your resources such as feature classes and tables from an enterprise geodatabase stored in a DBMS by using connection files (they have .sde extension). If you need to change the data source of a layer, you need to supply another .sde connection that will have a different server specified.

You cannot change the server you highlighted, because it's a part of the connection configuration which is found in the .sde connection file.

The Source tab shows the information retrieved from the .sde connection file, and you need to modify the connection file itself to make your layer reference another table or another server.

Look at the lyr.workspacePath (access workspacePath of the Map Layer object) which will return a path to .sde connection file:

'C:\\Users\\username\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\esrigdb@machine.sde'

As you have mentioned, you could use findAndReplaceWorkspacePath or replaceDataSource methods to modify the data sources for your layers.

  • I had an inkling servers cannot be simply changed as it references the .sde file on each PC. Thankyou Alex for this answer – HeathM Dec 12 '15 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.