sql SQL / SMP:显示许可证计数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql SQL / SMP:显示许可证计数相关的知识,希望对你有一定的参考价值。

SELECT
  [conn2].[Name]
  , [conn1].[TotalCount]
  , [conn1].[LicenseInUseCount]
  , [PercentageUsed] = (
    CASE
      WHEN [conn1].[LicenseInUseCount] > 0 THEN ROUND(((CAST ([conn1].[LicenseInUseCount] AS FLOAT) / 100.0) / (CAST( [conn1].[TotalCount] AS FLOAT ) / 100.0)) * 100, 2)
      ELSE 0
    END
  )
  , [LicenseType] = (
    CASE [conn1].[IsTrial]
      WHEN 0 THEN 'Full'
      ELSE 'Trial'
    END
  )
  , [conn1].[PolicyType]
  , [conn1].[Status]
  , [conn1].[CreatedDate]
  , [conn1].[ModifiedDate]
  , [conn1].[ExpireDate]
  , [conn1].[AupDate]
FROM
  [LicenseStatus] [conn1]
  LEFT JOIN [Item] [conn2] ON [conn1].[LicensingPolicyGuid] = [conn2].[Guid]
WHERE
  [conn1].[TotalCount] > 0
  AND [conn2].[Name] IS NOT NULL
  --AND ROUND(((CAST([conn1].[LicenseInUseCount] AS FLOAT) / 100.0) / (CAST([conn1].[TotalCount] AS FLOAT) / 100.0)) * 100, 2) > 90
ORDER BY
  [conn2].[Name]

以上是关于sql SQL / SMP:显示许可证计数的主要内容,如果未能解决你的问题,请参考以下文章

sql SQL:[SMP]隐藏补丁启动窗口

sql SQL:SMP资源关联父/子

sql SQL:所有可用的SMP报告

sql SQL / SMP:列出自动化策略

sql SQL / SMP:列表自动化策略电子邮件地址(xml)

sql SQL / SMP:具有System Center Operations Manager的计算机