I have a nightly Python script which updates some domains in a geodatabase. The domain owner is "AMIS". In addition to the AMIS schema in the geodatabase, there are other schemas. In order to update the domains, I must disconnect any users which are connected to data which may be using these domains. The data which may be using these domains are only in the AMIS schema.
I would like to disconnect any users which may be connected to the AMIS data. It's okay if they're also connected to other datasets.
I would like to disconnect these two users, but not any other users, such as "ASSET", "VISITOR", "COMMERCIAL".
Currently, I'm using
arcpy.ListUsers to get a list of all users that may be connected to the database. However, I may inadvertently disconnect a user that isn't locking any "AMIS" data.
I'm also aware of the
arcpy.TestSChemaLock, but that only returns a boolean. I would like to know who is locking the data so I can disconnect them.
How can I determine which users are locking data which begins with "AMIS", that is, data in the AMIS Schema?
I'm using ArcGIS 10.8. Geodatabase is Oracle backend.