1 of 1 people found this helpful
Caveat - we are not an auditing tool and will not capture everything. We do sampling, so can exclude/miss inactive connections/very fast and infrequently running SQL.
However, this may get you close. Let me know how it goes.
Run this against the repository. You can pretty it up, use a cursor or TSQL to wrap some additional logic around this...
select id, name, conn_host from cond -- this will provide you with a list of monitored instances and the host we're connecting to
select distinct db.name db , u.name dbuser
from cono_<id from first query> db, conu_<id from first query> u, consw_<id from first query> sw
where u.id = sw.xcuw
and db.id = sw.ixoy
order by 1