We have over a thousand corporate layers that connect to their Oracle SDE source data via application connects. I'm wondering whether anyone has already written a python script that will convert these layers internal connections into direct connects. I have tried several approaches, including ArcPy's findAndReplaceWorkspacePaths, with no success. In each approach, no errors are thrown, but nothing is changed, either.
With the newer versions of ArcGIS for Desktop requiring direct connects, I'm hoping someone has already solved this.
Thanks for any advice.
Hi
The findAndReplaceWorkspacePaths should work but the easiest way is to shut down the service, then open the MXD with all layers.
You will get many red exclamation marks.
You change one of them (using the repair option) and all of them will change.
Then all you need to do is resave them as layers. You can use Python Layer.save() to do it.
Have
Fun
Mody
Good idea, Mody. I'd thought of that, but even though the connection string I'll convert to will be the same, there are many different connection strings to input. I do already have all the layers in a single mxd.....all 1346 of them!
May still give your idea a try. Thanks.