Hi,I am automatically setting permissions on Feature Classes in ArcSDE using Python. The problem is that this only works if I run the script on the workstation; if I run it directly on the server where ArcSDE is installed, I get the following error message:
Invalid parameter value passed to function
Failed to execute (ChangePrivileges).The command looks the same using both ways (print gp.GetMessages()):Executing: ChangePrivileges <SDE_CONN_FILE>/<ADMIN_USER>.<FC> <USER> GRANT AS_IS <SDE_CONN_FILE>/<ADMIN_USER>.<FC>The strange thing is that the FC is appended again in the end, although the syntax looks like this:ChangePrivileges_management (in_dataset, user, view, edit) But I don't think this is the reason, since it works on the workstation.Here is the code:# 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()
ArcGIS version: 9.2, SP6ArcSDE version: ArcSDE for Oracle9i 9.2 Service Pack 3 Does anyone know why the same command would run on a workstation but not on the server?Thanks a lot,Ralph