SQL Query

Last post 08-05-2019, 1:36 PM by smcadams107. 5 replies.
Sort Posts: Previous Next
  • SQL Query
    Posted: 08-02-2019, 1:36 PM

    I made a report that queries the database to show which clients use dedup and which clients do not use dedup.  When i run the report it only show one client in the SIDBStoreName column which i know is not right most of them clients are using dedup. Does anyone know what could be wrong with my report.  I have attached the report 

  • Re: SQL Query
    Posted: 08-03-2019, 10:21 PM

    Try looking in the [dbo].[App_ClientProp] table.

    But just to clarify, are you looking for subclients that are protected with deduplication policies? If so, then this query won't help.

  • Re: SQL Query
    Posted: 08-03-2019, 10:59 PM

    The query you are using may not be accurate because the client to SIDB store mapping is through the storage policy and the copy you are using for that client/subclient. I've modified the query you are using to correct the joins to get right SIDB store.

    Try with the below query. This query may return multiple rows for a client, which means you may be using a different SIDB store for different subclients under that client.


    ;with CVProtectedServers AS
    (SELECT [ClientId] ,[Client] ,[NetworkInterface] ,[OS [Version]]] as OSVersion ,[Hardware] ,[GalaxyRelease] ,[InstallTime] ,[UninstallTime] ,[DeletedTime] ,[ClientStatus] ,[ClientBkpEnable] ,[ClientRstEnable] ,[schedulePolicy] ,[schedbackuptype], [appId]
    FROM dbo.CommCellClientConfig
    inner join [CommServ].[dbo].[CommCellBkSchedule] on [clientName]=[Client]
    where [ClientStatus]='installed' and [schedulePolicy] not like 'System%'
    and [schedulePolicy] not like 'DDB%' and [schedbackuptype] like '%full%' )
    SELECT DISTINCT CVPS.[ClientId], CVPS.[Client] ,CVPS.[NetworkInterface] ,OSVersion ,CVPS.[Hardware] ,CVPS.[GalaxyRelease] ,CVPS.[InstallTime] ,CVPS.[UninstallTime] ,CVPS.[DeletedTime] ,CVPS.[ClientStatus] ,CVPS.[ClientBkpEnable] ,CVPS.[ClientRstEnable] ,CVPS.[schedulePolicy] ,CVPS.[schedbackuptype]
    ,[SIDBStoreName]
    FROM CVProtectedServers CVPS
    left outer join APP_Application A on A.id = CVPS.appid
    left outer join archGroup AG ON A.dataArchGrpID = AG.id
    left outer join archGroupCopy AGC ON AGC.id = AG.defaultCopy and AGC.archGroupId = AG.id
    left outer join [CommServ].[dbo].[IdxSIDBStore] ISIDBS on ISIDBS.[SIDBStoreId]= AGC.SIDBStoreId
     
    You may want to consider optimizing the query for performance once you find the query results match your intendend results.
     
    Thanks,
    Sunil
  • Re: SQL Query
    Posted: 08-05-2019, 10:39 AM

    Sunil,

     

    The query did work and showed a couple of more SIDStoreNames but most of the say NULL in that column

  • Re: SQL Query
    Posted: 08-05-2019, 12:15 PM

    Sorry, Did or did not work?

    Is it showing the SIDB store name as null for clients that are using deduplication?

     

    Thanks,

    Sunil-

  • Re: SQL Query
    Posted: 08-05-2019, 1:36 PM

    Sunil,

     

    Most of the clients have Null in the SIDBStoreName but a few of the clients have the actual name of the SIDBStoreName

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy