PerkinElmer Informatics Support Forum
Decrease font size
Increase font size
Topic Title: Can I query the omero db to retrieve user/group information?
Topic Summary: querying the omero db
Created On: 1/5/2017 7:11 AM
Status Post and Reply
Linear : Threading : Single : Branch
Topic Tools Topic Tools
View topic in raw text format. Print this topic.
 1/5/2017 7:11 AM
User is offline View Users Profile Print this message


RAH

Posts: 57
Joined: 5/16/2014

Yes, this is possible but be very careful - querying the db isn't necessarily recommended because if changes are inadvertently made to the db it may cause corruption. Always check to make sure you have a recent db backup:

$ cd /OMERO/OMERO4_4/db_backup/

Look for a recent .pg_dbdump file.

For example if I wanted to run an sql query to list all of the active users and the screen, plate and group (owner) association I'd use the following steps :

Connect to the omero database (columbus user):

$ sudo su columbus

$ psql omero4_4

> select e.omename as user, s.name as screen, p.name as plate, eg.name as group from screen s join screenplatelink spl on spl.parent=s.id join plate p on spl.child=p.id join experimentergroup eg on eg.id=p.group_id join experimenter e on e.id=p.owner_id order by e.omename, s.name;

The output would look something like this:

------------------------------

RAH

FuseTalk Basic Edition v4.0 - © 1999-2018 FuseTalk Inc. All rights reserved.