在SOLIDWORKS PDM系统使用过程中,不像SOLIDWORKS网络版一样每个用户都有权限通过类似于SOLIDWORKS许可管理器客户端来进行当前登录用户的查看。
那么这时我们又需要查看系统中当前登录的各种许可类型分别的数量的话,就可以选择通过SQL查询的方式来达到这样的目的。
具体SQL语句如下所示,可以显示出系统当前登录的各种许可类型分别的数量:
select 'CAD Editor' as LicenseType, count(*) as 'Used licences' FROM (select distinct liu.hostname as 'Computer', liu.username as 'Username'
from ConisioMasterDb.dbo.LoggedInUsers liu,ConisioMasterDb.dbo.LoggedInUsers gliu,master..sysprocesses sp
where liu.spid = gliu.spid and liu.spid = sp.spid and upper(sp.program_name) like upper('%EdmServ%') and gliu.ProgramType=0) as Logins
UNION ALL
select 'Contributor' as LicenseType, count(*) as 'Used licences' FROM (select distinct liu.hostname as 'Computer', liu.username as 'Username'
from ConisioMasterDb.dbo.LoggedInUsers liu,ConisioMasterDb.dbo.LoggedInUsers gliu,master..sysprocesses sp
where liu.spid = gliu.spid and liu.spid = sp.spid and upper(sp.program_name) like upper('%EdmServ%') and gliu.ProgramType=1) as Logins
UNION ALL
select 'Viewer' as LicenseType, count(*) as 'Used licences' FROM (select distinct liu.hostname as 'Computer', liu.username as 'Username'
from ConisioMasterDb.dbo.LoggedInUsers liu,ConisioMasterDb.dbo.LoggedInUsers gliu,master..sysprocesses sp
where liu.spid = gliu.spid and liu.spid = sp.spid and upper(sp.program_name) like upper('%EdmServ%') and gliu.ProgramType=2) as Logins
UNION ALL
select 'Web' as LicenseType, count(*) as 'Used licences' FROM (select liu.hostname as 'Computer', liu.username as 'Username'
from ConisioMasterDb.dbo.LoggedInUsers liu,ConisioMasterDb.dbo.LoggedInUsers gliu,master..sysprocesses sp
where liu.spid = gliu.spid and liu.spid = sp.spid and upper(sp.program_name) like upper('%ConisioWebServer%') and gliu.ProgramType=3) as Logins
形成以"定制方案+技术服务+成功实施"模式为制造业企业提供数字化设计、制造及管理解决方案,并为用户提供维护服务和技术支持