From: | "Hrishikesh (Richie) Rode" <hrode(at)livevox(dot)com> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Cc: | Rag Krishnan <rkrishnan(at)livevox(dot)com> |
Subject: | Drivers users by connections |
Date: | 2023-06-06 07:18:01 |
Message-ID: | DM6PR04MB42358ACBF685FC41CA188DE8B652A@DM6PR04MB4235.namprd04.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
We are not able to find table which give session connection details about drivers. In pg_stat_activity details information is not there. Please let us know where we can find these information.
Please help me to get this information.
Thanks
Richie-
In Oracle and Mysql we use below sql to get details
SQL used to get mysql driver connection details
SELECT SUBSTRING_INDEX(s.user,"@",1),sca.attr_value
FROM sys.session as s
join performance_schema.session_connect_attrs as sca
on s.conn_id = sca.processlist_id
group by SUBSTRING_INDEX(s.user,"@",1)
SQL used to get Oracle driver connection details
select a.CLIENT_VERSION, a.CLIENT_DRIVER ,b.USERNAME,b.PROGRAM
from v$session_connect_info a, v$session b
where CLIENT_VERSION!='Unknown' and CLIENT_DRIVER is not null
and a.sid=b.sid
group by a.CLIENT_VERSION, a.CLIENT_DRIVER ,b.USERNAME,b.PROGRAM
order by b.USERNAME
From | Date | Subject | |
---|---|---|---|
Next Message | gzh | 2023-06-06 08:33:39 | Re: Is there any good optimization solution to improve the query efficiency? |
Previous Message | Wei Wang (Fujitsu) | 2023-06-06 06:01:33 | RE: Support logical replication of DDLs |