<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic WFA Mysql query statement to list snapshot policies in a cluster in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130812#M23681</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for WFA mysql query statement to list the snapshot policies in a cluster/vserver. Can someone help me on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Krishgudd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 15:07:03 GMT</pubDate>
    <dc:creator>krishgudd</dc:creator>
    <dc:date>2025-06-04T15:07:03Z</dc:date>
    <item>
      <title>WFA Mysql query statement to list snapshot policies in a cluster</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130812#M23681</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for WFA mysql query statement to list the snapshot policies in a cluster/vserver. Can someone help me on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Krishgudd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 15:07:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130812#M23681</guid>
      <dc:creator>krishgudd</dc:creator>
      <dc:date>2025-06-04T15:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Mysql query statement to list snapshot policies in a cluster</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130813#M23682</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/14059"&gt;@krishgudd&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I came up with real quick. I listed a few extra attributes in here, which may or may not be helpful, and in this case a cluster needs to be defined via another variable. Under “SVM” it will show the cluster name if it is a cluster-defined snapshot policy, or the SVM name if it is an SVM-defined snapshot policy. I’m not a MySQL query expert by any stretch, so this could probably be cleaner, but it looks to work. I hope this points you in the right direction, at least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT
     snapshot_policy.name AS 'Snapshot Policy',
     schedule.name AS 'Schedule name',
     snapshot_policy_schedule.snapshot_count AS 'Snapshots to Retain',
     vserver.name AS 'SVM'
FROM
     cm_storage.cluster,
     cm_storage.vserver,
     cm_storage.snapshot_policy,
     cm_storage.snapshot_policy_schedule,
     cm_storage.schedule
WHERE
     vserver.cluster_id = cluster.id
     AND snapshot_policy.vserver_id = vserver.id
     AND snapshot_policy_schedule.snapshot_policy_id = snapshot_policy.id
     AND snapshot_policy_schedule.schedule_id = schedule.id
     AND cluster.name = '${cluster}'
ORDER BY
    snapshot_policy.name,
    snapshot_policy_schedule.snapshot_count,
    schedule.name,
    vserver.name&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 23:46:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130813#M23682</guid>
      <dc:creator>MattInCO</dc:creator>
      <dc:date>2017-05-04T23:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: WFA Mysql query statement to list snapshot policies in a cluster</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130814#M23683</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this work for you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SELECT
    snapshot_policy.name,
    vserver.name AS 'vserver.name',
    cluster.primary_address AS 'vserver.cluster.primary_address'
FROM
    cm_storage.snapshot_policy,
    cm_storage.vserver,
    cm_storage.cluster
WHERE
    snapshot_policy.vserver_id = vserver.id
AND
    vserver.cluster_id = cluster.id
AND
    vserver.name =  '${VserverName}'
AND (
    cluster.name = '${ClusterName}'
    OR cluster.primary_address = '${ClusterName}'
)&lt;/PRE&gt;&lt;P&gt;That should list all the snapshot policies assigned to a cluster\vserver. Alternately if you want to filter to a specific snapshot policy name then change the AND clause to add the policy name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AND
    vserver.cluster_id = cluster.id
AND
    vserver.name =  '${VserverName}'
AND
    &lt;U&gt;&lt;STRONG&gt;snapshot_policy.name = '${SnapShotPolicyName}'&lt;/STRONG&gt;&lt;/U&gt;
AND (
    cluster.name = '${ClusterName}'
    OR cluster.primary_address = '${ClusterName}'
)&lt;/PRE&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 23:32:50 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-Mysql-query-statement-to-list-snapshot-policies-in-a-cluster/m-p/130814#M23683</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-05-04T23:32:50Z</dc:date>
    </item>
  </channel>
</rss>

