[GIS] How to change owner of a version in an enterprise geodatabase using ArcObjects

arcobjectsenterprise-geodatabasenetversioning

I have ArcObjects/.NET code used to create few versions for workspace. Versions are created successfuly but their owner is who created them (the user connected to the workspace). I want to change the owners names, but I dont see an API to do that, maybe someone knows what interface I should use etc?

Everytime connecting as different user is not an option, because somehow unmanaged memory starts to leak when inserting/deleting/updating versioned data from many different connections.

Also I found table sde.VERSIONS it has column 'OWNER' but I am not sure if simply updating this column for specific versions is the correct solution, maybe it has some side effects.

Best Answer

َAs per @Vince comment, you cannot change the ownership of a version (part of system design). Each version has the following permission levels:

instead of changing the owner you can either change the permission to public or follow vince advice to create from the version. however if you create from a version, the new version gets created under the old one (you have to keep the original version!)

This table may come handy:

           |View   |Edit
Private    |Owner  |Owner
Protected  |AnyUser|Owner
Public     |AnyUser|AnyUser

so if you make a version private, the only user who can view/edit it is the owner. If you make sde.default private, no user can view/edit the data.

Related Question