在SOLIDWORKS PDM系统使用过程中,不像SOLIDWORKS网络版一样每个用户都有权限通过类似于SOLIDWORKS许可管理器客户端来进行当前登录用户的查看。
那么这时我们又需要对当前登录正在使用系统的用户进行统计查看的话,就可以选择通过SQL查询的方式来达到这样的目的。
具体SQL语句如下所示,可以显示出系统当前登录用户的计算机名称、登录用户名称、登录PDM库名称和使用的许可证类型:
select distinct liu.hostname as 'Computer', liu.username as 'Username', gliu.DatabaseName,
case
when gliu.ProgramType=0 then 'CAD Editor'
when gliu.ProgramType=1 then 'Contributor'
when gliu.ProgramType=2 then 'Viewer'
end as LicenseType
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%')
UNION ALL
select liu.hostname as 'Computer', liu.username as 'Username', gliu.DatabaseName, 'Web' as LicenseType
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
Order by liu.hostname
go
形成以"定制方案+技术服务+成功实施"模式为制造业企业提供数字化设计、制造及管理解决方案,并为用户提供维护服务和技术支持