Quantcast
Channel: Symantec Connect - Backup and Recovery
Viewing all articles
Browse latest Browse all 6339

OpsCenter Custom SQL Reporting

$
0
0
I need a solution

Hi

I'm trying to generate a report that displays the percentage usage for disk pools.

I can display this either as an integer or as a decimal to 6 places - neither is what I am after.

I am trying to limit the percentage display to 2 decimal places.

From investigation on SQL, this should be doable using DECIMAL(3,2) for instance - but I have not yet found the right was to add this to a custom SQL script (or even if this is the right way for OpsCenter). I've also looked at the FORMAT directive without success.

Here is the SQL I am using (this shows the percentage as an Interger - changing 100 to 100.0 shows as percentage to 6 places):

SELECT
  dms.friendlyName as "Master Server",
  dp.name AS "Disk Pool",
  dp.serverType AS "Pool Type",
  100*dp.usedCapacity/dp.usableSize AS "Percentage Full"
FROM domain_DiskPool dp
INNER JOIN domain_MasterServer dms ON dms.id = dp.MasterserverID

GROUP BY dms.friendlyName, dp.name, dp.serverType, dp.usedCapacity, dp.usableSize
ORDER BY dms.friendlyName, dp.name, dp.serverType, dp.usedCapacity, dp.usableSize
 

1386565069

Viewing all articles
Browse latest Browse all 6339

Trending Articles