Question

Commvault DB Query to list clients having File System Agent Installed

  • 27 September 2023
  • 8 replies
  • 117 views

Badge +6

I want to to fetch a list of clients which has file system agent installed in it using Commvault DB query and the output of the same will be used as an input to display all FS clients to run backups only for file system agents.


8 replies

Userlevel 5
Badge +13

@Rahul Nair 

Please try this one. This query returns clients with FS package installed. These clients may contain additional packages too.

SELECT distinct C.id, C.name, C.displayName FROM APP_Client C
    INNER JOIN simInstalledPackages S
        ON C.id = S.ClientId AND S.simPackageID IN (702, 1101)

702 - Windows FS

1101 - Unix FS

 

Thanks,

Sunil

Badge +6

Thanks,

Can we also see the agent type with this query, it is only listing clients with there ID. I want to see agent type as well 

for eg:
Client iDataAgent 

abc Windows FileSystem

Userlevel 5
Badge +13

Please try this.

 

SELECT distinct C.id, C.name, C.displayName, IT.name FROM APP_Client C
INNER JOIN simInstalledPackages S
    ON C.id = S.ClientId AND S.simPackageID IN (702, 1101)
INNER JOIN APP_IDAName I
    ON C.id = I.clientId
INNER JOIN APP_iDAType IT
    ON I.appTypeId = IT.type AND IT.name like '%File System%'

Badge +6

This one is not working, giving same output and not returning Agent name

Userlevel 5
Badge +13

It is working for me. Can you check if you’re copying the query correctly. Agent name will be the forth column in the result set.

 

Thanks,

Sunil

Badge +6

Its working if i remove C.name, i guess its giving trouble since there are 2 “name” i.e. C.name and IT.name

Userlevel 5
Badge +13

Okay. Got it. Thanks for the update.

You can add column labels with C.name as ‘Client name’, IT.name as ‘Agent name’ etc, if that makes it clear for you.

 

Thanks,

Sunil-

Badge +6

Thanks a lot, its working. I want to use the output i.e. client list which should be listed for user to select as an input for the workflow to continue further. is that doable?

Reply