2011-05-26 24 views

Respuesta

17

Para H2, utilice:

select * from information_schema.sessions; 

Para MySQL, utilice:

show full processlist; 

o

select * from information_schema.processlist; 

Si están interesados ​​sólo en el recuento de sesión, utilice select count(*) en lugar de select *

+0

seleccione * de information_schema.sessions; ID \t USER_NAME \t Session_Start \t DECLARACIÓN \t STATEMENT_START USUARIO1 \t 2011-05-27 09: 09: 44.98 \t nula \t 2011-05-27 09: 09: 48.139 USUARIO1 \t 2011-05-27 10: 56: 32.769 \t select * from information_schema.sessions \t 2011-05-27 10: 56: 34.316 – Joe

+0

Obtengo la información anterior cuando ejecuto la declaración SQL anterior, pero no obtengo información sobre el recuento de conexiones. ¿Me falta algo – Joe

+0

'select count (*) de information_schema.sessions;' 'select count (*) from information_schema.processlist;' –

Cuestiones relacionadas