View ocum_report.unprotectvolumeview | Generated by SchemaSpy |
View Definition:
select `inventorycluster`.`objid` AS `clusterId`,`inventorycluster`.`name` AS `clusterName`,`inventoryvserver`.`name` AS `SVM`,`inventoryvolume`.`name` AS `volume`,`inventoryvolume`.`sizeTotal` AS `totalDataCapacity`,`inventoryvolume`.`sizeUsed` AS `usedDataCapacity`,`inventoryvolume`.`sizeAvail` AS `availableDataCapacity`,`ocum`.`volume`.`dfSnapshotBytesUsed` AS `snapshotUsedCapacity`,`ocum`.`volume`.`dfSnapshotBytesAvail` AS `snapshotAvailableCapacity`,`inventoryvolume`.`snapshotReserveSize` AS `snapshotTotalCapacity`,cast(floor(`calculationview`.`daysUntilFull`) as unsigned) AS `daysToFull`,(select `ocum`.`optionchainvalue`.`optionValue` from `ocum`.`optionchainvalue` where ((`ocum`.`optionchainvalue`.`domainObject_id` = `inventoryvolume`.`objid`) and (`ocum`.`optionchainvalue`.`optionName` = 'threshold.volSpaceFull') and (`ocum`.`optionchainvalue`.`domainObject_type` = 'inventory.ontap.storage.FlexVol'))) AS `spaceFullThreshold`,(select `ocum`.`optionchainvalue`.`optionValue` from `ocum`.`optionchainvalue` where ((`ocum`.`optionchainvalue`.`domainObject_id` = `inventoryvolume`.`objid`) and (`ocum`.`optionchainvalue`.`optionName` = 'threshold.volSpaceNearlyFull') and (`ocum`.`optionchainvalue`.`domainObject_type` = 'inventory.ontap.storage.FlexVol'))) AS `spaceNearlyFullThreshold`,(select `ocum`.`optionchainvalue`.`optionValue` from `ocum`.`optionchainvalue` where ((`ocum`.`optionchainvalue`.`domainObject_id` = `inventoryvolume`.`objid`) and (`ocum`.`optionchainvalue`.`optionName` = 'event.growthRate.minChangePct.volume') and (`ocum`.`optionchainvalue`.`domainObject_type` = 'inventory.ontap.storage.FlexVol'))) AS `growthRateThreshold`,`inventoryvolume`.`inodeFilesTotal` AS `noofinodes`,`inventoryvolume`.`inodeFilesUsed` AS `inodeutilization`,`inventoryvolume`.`quotaCommitted` AS `quotaCommittedCapacity`,`inventoryvolume`.`quotaOverCommitted` AS `quotaOvercommittedCapacity`,`ocum`.`na_boolToEnabledDisabled`(`inventoryvolume`.`isSnapshotAutoDeleteEnabled`) AS `snapshotAutodelete`,`ocum`.`na_boolToEnabledDisabled`((`inventoryvolume`.`sisStateRaw` = 'enabled')) AS `deduplicationEnabled`,`inventoryvolume`.`deduplicationSpaceSaved` AS `dedupSpaceSavings`,`ocum`.`na_boolToEnabledDisabled`((`inventoryvolume`.`isSisCompressionEnabled` = TRUE)) AS `compressionEnabled`,`inventoryvolume`.`compressionSpaceSaved` AS `compressionSpaceSavings`,`ocum`.`na_boolToYesNo`((case when isnull(`inventoryvolume`.`spaceGuaranteeRaw`) then NULL when ((`inventoryvolume`.`spaceGuaranteeRaw` = 'none') or (`inventoryvolume`.`spaceGuaranteeRaw` = 'file')) then 1 else 0 end)) AS `thinProvisioning`,`ocum`.`na_boolToEnabledDisabled`((`inventoryvolume`.`autoSizeModeRaw` = 'grow')) AS `autogrow`,`inventoryvolume`.`spaceGuaranteeRaw` AS `spaceGuarantee`,`inventoryvolume`.`stateRaw` AS `volumeState`,`ocum`.`volumeregressioninfo`.`bytesUsedPerDay` AS `bytesUsedPerDay`,(case when ((`inventoryvolume`.`volTypeRaw` = 'rw') and isnull(`incominginventorysnapmirror`.`objid`) and isnull(`outgoinginventorysnapmirror`.`sourceVolumeId`)) then 'unprotected' when ((`inventoryvolume`.`volTypeRaw` = 'rw') and (`outgoinginventorysnapmirror`.`sourceVolumeId` is not null)) then 'protected' when ((`inventoryvolume`.`volTypeRaw` = 'dp') or ((`inventoryvolume`.`volTypeRaw` = 'rw') and (`incominginventorysnapmirror`.`objid` is not null) and ((`incominginventorysnapmirror`.`relationshipTypeRaw` = 'data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'extended_data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'vault')))) then 'destination' else 'notApplicable' end) AS `protectionRole` from (((((((((`netapp_model_view`.`volume` `inventoryvolume` join `ocum`.`volume` on((`ocum`.`volume`.`id` = `inventoryvolume`.`objid`))) left join `ocum`.`volumeregressioninfo` on((`ocum`.`volumeregressioninfo`.`volume_id` = `inventoryvolume`.`objid`))) left join `netapp_model_view`.`vserver` `inventoryvserver` on((`inventoryvserver`.`objid` = `inventoryvolume`.`vserverId`))) left join `netapp_model_view`.`cluster` `inventorycluster` on((`inventorycluster`.`objid` = `inventoryvolume`.`clusterId`))) left join `netapp_model_view`.`snap_mirror` `incominginventorysnapmirror` on(((`incominginventorysnapmirror`.`destinationVolumeId` = `inventoryvolume`.`objid`) and ((`incominginventorysnapmirror`.`relationshipTypeRaw` = 'data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'extended_data_protection') or (`incominginventorysnapmirror`.`relationshipTypeRaw` = 'vault'))))) left join `ocum`.`volumeoutgoingrelationshipview` `outgoinginventorysnapmirror` on((`outgoinginventorysnapmirror`.`sourceVolumeId` = `inventoryvolume`.`objid`))) left join `netapp_model_view`.`snap_mirror_policy` `inventorysnapmirrorpolicy` on((`inventorysnapmirrorpolicy`.`objid` = `incominginventorysnapmirror`.`snapMirrorPolicyId`))) left join `netapp_model_view`.`job_schedule` `inventoryjobschedule` on((`inventoryjobschedule`.`objid` = `incominginventorysnapmirror`.`jobScheduleId`))) join `ocum`.`managedvolumecalculationsview` `calculationview` on(((`calculationview`.`volumeId` = `inventoryvolume`.`objid`) and (`inventoryvolume`.`derivedStyle` = 'FLEXVOL') and (`inventoryvolume`.`volTypeRaw` = 'rw') and isnull(`incominginventorysnapmirror`.`objid`) and isnull(`outgoinginventorysnapmirror`.`sourceVolumeId`))))