AD879T
Contributor
Contributor

Users on datastore

Hello

How to find all users having AppStacks mounted from a particular datastore?

Labels (1)
0 Kudos
1 Reply
da2125
Enthusiast
Enthusiast

If you have access to the DB

 

SELECT DISTINCT
machine_managers.host,
storage_locations.name,
users.name,
computers.name,
users.last_login,
snapvol_files.filename,
storage_locations.no_attach,
snapvol_attachments.state_change
FROM users
INNER JOIN snapvol_attachments ON users.id = snapvol_attachments.source_id
INNER JOIN storage_locations
INNER JOIN snapvol_files ON storage_locations.id = snapvol_files.storage_location_id ON snapvol_attachments.snapvol_file_id = snapvol_files.id
INNER JOIN machine_managers ON storage_locations.machine_manager_id = machine_managers.id
INNER JOIN computer_users ON users.id = computer_users.user_id
INNER JOIN computers ON computer_users.computer_id = computers.id
WHERE(storage_locations.name LIKE '%')
ORDER BY storage_locations.name,
users.name;

0 Kudos