Geoprocessing tool eror

1950
6
05-17-2013 09:23 AM
BrianBehling
New Contributor III
Hello.

When I run the append tool on a versioned SDE GDB, I get the error:

"The user must be the table owner".

Anyone have an idea what that means and how to fix it?
0 Kudos
6 Replies
T__WayneWhitley
Frequent Contributor
Sounds like an underlying DBMS issue - not an error, it seems you aren't connecting with sufficient privileges to perform this type of 'edit'...  If you have an administrative or other type of connection with higher privileges, use that, or grant the target fc/target table sufficient permissions to complete the task with your current connection.

Hope that helps,
Wayne
0 Kudos
BrianBehling
New Contributor III
I can delete and create on the table. I just can't run a GP tool on it.

I can also create and add with feature cursors in ArcObjects, but can't use the any of the GP tools in ArcObjects due to the same error.

So you think the table itself needs to be granted the proper permissions?
0 Kudos
T__WayneWhitley
Frequent Contributor
....hmmm that's curious - you said it is versioned, correct?  I'm not sure exactly of the mechanism, but I think you have to make sure you're executing on the owner version because if not mistaken Append requires an exclusive schema lock, if that makes sense -- I think in that way, for example, when a child user reconciles, the records appended should show up in the child.  Any way you can test this without locking the dataset for any other users?

I have yet to fully understand the locking mechanism...guess I should read up some more, but it is definitely dependent on your DBMS and your mode of connection.

Hope that sheds a little light....
Wayne

PS -- I never have any problems using the Append tool.  I am using an OS authenticated direct connection as an admin user.
0 Kudos
T__WayneWhitley
Frequent Contributor
One more thing that may help, there is a Desktop webhelp topic depending on the DBMS 'flavor' you're using - this one's for SQL Server:

http://resources.arcgis.com/en/help/main/10.1/index.html#/Granting_and_revoking_privileges_on_datase...
0 Kudos
BrianBehling
New Contributor III
Looks like it was a problem with the user account I was logging in with. The SDE DBA advised me to login as a different user, which is a super user type of account, and the append tool works now.
0 Kudos
PaulDelaney2
New Contributor

The Append tool needs to be run as the table owner from what I understand. This is because by default it recreates the spatial index. I found you can get around this by ticking the "Maintain Spatial Index" setting in Environment Settings (under Geodatabase Advanced in 10.2.2). 

In .NET:

Geoprocessor gp = new Geoprocessor();
gp.SetEnvironmentValue("maintainSpatialIndex", "TRUE");

You can then run the tool using OSA or any other authorised user that is not the table owner, and you don't need an exclusive lock.

0 Kudos