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.

In the example below, you can see that the lock owner connecting to AMIS data are the users "AMIS" and "MANAGEMT". enter image description here

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.

  • 2
    It's been a while since I last needed the table names, but the locks tables have a connection foreign key, and the connection table has the schema name. – Vince May 13 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.