What do you use in 10.2 instead of "sdemon -o info -I users -s" to get the list of users

670
6
10-25-2016 08:30 AM
Highlighted
Occasional Contributor III

Hello everyone,

What do you use in 10.2 instead of "sdemon -o info -I users -s"  to get the list of users.

Thanks

Reply
0 Kudos
6 Replies
Highlighted
Esri Contributor

In Python you can use arcpy.ListUsers() or use the GDB Administration window by right-clicking on the database connection in ArcCatalog and choosing Administration > Geodatabase Administration

ListUsers—ArcPy Functions | ArcGIS for Desktop 

Highlighted
Occasional Contributor III

Thanks, I tried:

users = arcpy.ListUsers(ClientName)

and I got the error message:

Connection information provided was for a non-administrative user

With the command sdemon I was able to check the users connected using a schema owner account, it looks like with arcpy.ListUsers the account has to be SDE.

Thanks

Highlighted
Esri Contributor

Thanks Jose, this tool only does work for the administrative user but this sounds like a good enhancement request to me. 

However, it is it still possible to see users connected a few other ways. The simplest method is to do a selection from the Geodatabase process_information table. This should have the same information you were seeing from sdemon -o info -I users. This table by default is accessible through the public role, so any user will be able to select from it. 

I know this goes without saying, but only selections should be run against this table, no edits. 

Reply
0 Kudos
Highlighted
Esri Contributor

Did a little digging and found this enhancement for the non-admin user ability: NIM096849

If you get the chance to call into support sometime, we can attach you to this defect.

Reply
0 Kudos
Highlighted
Occasional Contributor III

Hi Christian,

Do I need to run any update to get the non-admin user ability: NIM096849?

Is there any  sample using the Geodatabase process_information table to get the list of users.

Thanks

Reply
0 Kudos
Highlighted
Esri Contributor

Hi Jose, 

NIM096849 isn't implemented in the software, it's just a request to include in a future release. If you contact support, we can add you to the enhancement, which adds more weight behind adding the functionality. 

If you want to query the process_information table, you can follow my steps here. This table is owned by the GDB administrative user, so you may need fully qualify the table name. Keep in mind, I am showing Oracle for this one, but it will appear slightly different for SQL Server or PostgreSQL. 

Description of the process_information table columns are here:

System tables of a geodatabase stored in Oracle—Help | ArcGIS for Desktop 

SDEMON:

SQL:

Reply
0 Kudos