# Process only FC where admin_user has access -> wildcard wildcard = "%s.*" % admin_user fcs = gp.ListFeatureClasses(wildcard) fcs.reset() fc = fcs.next() while fc: fc = conn_sde + "/" + fc print "Setting read permission on FC %s" % fc try: # Process: Change Privileges... gp.ChangePrivileges_management(fc, read_user, "GRANT", "AS_IS") print gp.GetMessages() except: # If an error occurred while running a tool print the messages print gp.GetMessages() return 1 fc = fcs.next()
You write that ArcSDE on the server is also running 9.2 but is there a chance it has a newer or older ArcGIS Desktop than your workstation? Didn't the parameter list of the ChangePrivileges command change between versions?
If you enable tracing (with SDETRACELOC/SDETRACEMODE variables), you'll know what's wrong for sure,
but 92sp3 != 92sp6, so your PATH order in resolving SDE.DLL could be the deciding factor.
If you have ArcSDE 9.2sp3 and ArcGIS 9.2sp6 on the same host, they will both have
a DLL named "SDE.DLL", but one will be SP3 and one will be SP6. The LoadLibraryEx()
function is used to load dynamic libraries, and it searches directories in the order
specified by the PATH variable. If your SP3 bin directory is before the SP6 directory,
then the 92sp6 ArcGIS will use the outdated DLL, making it unreliable.
There are a multitude of reasons to install ArcSDE 9.2 SP6 and the post-SP6 patches;
eliminating search order conflicts as a possible problem is one of the less pressing ones,
but if it works, then the other issues won't give you trouble either.
One other thing to double check is to ensure that the SDE connection file that you are using on the server is using exactly the same connection properties as the one you are using on the client machine.