I'm talking about arcpy.TableToDomain_management, ArcGIS Server 10.2
It seems that this function requires exclusive SDE database schema lock. Something that we can't accept.
We have ESRI domains but we want to extend them with additional attributes. (I think we are not alone doing this). So when user updates our "extended domains" we store values to our tables and then update domains by invoking our tbx with python code that simply calls TableToDomain_management.
That fails because exclusive SDE database schema lock can't be acquired because other users have the database open (in arcmap, mostly on web).
It's strange because first natural guess was to test if we can edit domains in arccatalog while other users have the sde database open. No problem: we could.
So why does arcpy.TableToDomain_management lock SDE DB? Do you know any NIMs, hotfixes, ets. that can help us?
The guy with ArcGIS 10.1 tells that it happens only if he runs it on server, e.g. published sd (service definition file). If he runs it on 32 bit desktop (arcmap, arcatalog), tbx file is used of course, he doesn't get schema lock.
== Edit 1
How do we update domains (or given the issues: How do we want to update domains)? Plain code-value domains; no magic here. User story below.
Web user that has (enough) administrative rights edits domain values (not codes). (S)He also deletes unnecessary code-value pairs. And also adds new code-value pairs.
Therefore we use TableToDomain_management, not AddCodedValueToDomain_management.