How to get the number of active keys
3 years ago
Originally Published: 2011-09-09
Article Number
000043284
Applies To
RSA Key Manager Server 2.7 SP1
Issue
How to get the number of active keys?
Resolution

For SQL Server

select count(*)
from security_object so, state_timeline st
where so.muid = st.muid
and starttime / 1000 < DATEDIFF(s,'19700101 00:00:00:000',GETUTCDATE())
and endtime / 1000 > DATEDIFF(s,'19700101 00:00:00:000',GETUTCDATE())
and destroytime / 1000 > DATEDIFF(s,'19700101 00:00:00:000',GETUTCDATE())
and compromisetime / 1000 > DATEDIFF(s,'19700101 00:00:00:000',GETUTCDATE())