findAndReplaceWorkspacePaths Not Working AND using Python to re-join tables

1801
1
04-29-2012 04:58 AM
ShanaLowe
New Contributor II
I am trying to use the Python findAndReplaceWorkspacePaths function, but apparently am doing something wrong.  We recently rebuilt our SDE database and moved the data to a new user (was owned by SDE, which I know is a big no-no, so we moved the data to a different user).  The FC names are the same, server is the same.  Can anyone help me figure out what I am doing wrong?  I was also wondering if there is a Python method for fixing the table joins that are lost now that the data is oned by the new user.
Thanks in advance for any help.

import arcpy
mxd = arcpy.mapping.MapDocument(r"B:\Temp\PYTHON\Test.mxd")
mxd.findAndReplaceWorkspacePaths(r"Database Connections\Connection to MVNPUSH as SDE.sde",
                                 r"Database Connections\Connection to MVN as EDITOR.sde")
mxd.saveACopy(r"B:\Temp\PYTHON\Test2.mxd")
del mxd
Tags (2)
0 Kudos
1 Reply
JeffBarrette
Esri Regular Contributor
Have you tried mxd.replaceWorkspaces?  MXD.findAndReplaceWorkspacePaths doesn't work as well for changing owner information.

Jeff
0 Kudos