Skip to main content
Solved

Commvault DB Query to list clients having File System Agent Installed

  • Sep 27, 2023 11:03 AM UTC
  • 8 replies
  • 260 views

Forum|alt.badge.img+5

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.

Best answer by Sunil

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%'

View original

8 replies

Sunil
Vaulter
Forum|alt.badge.img+16
  • Vaulter
  • Sep 27, 2023 11:48 AM UTC

@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


Forum|alt.badge.img+5
  • Author
  • Apprentice
  • Sep 27, 2023 3:09 PM UTC

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


Sunil
Vaulter
Forum|alt.badge.img+16
  • Vaulter
  • Answer
  • Sep 27, 2023 3:16 PM UTC

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%'


Forum|alt.badge.img+5
  • Author
  • Apprentice
  • Sep 27, 2023 3:24 PM UTC

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


Sunil
Vaulter
Forum|alt.badge.img+16
  • Vaulter
  • Sep 27, 2023 4:37 PM UTC

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


Forum|alt.badge.img+5
  • Author
  • Apprentice
  • Sep 27, 2023 4:40 PM UTC

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


Sunil
Vaulter
Forum|alt.badge.img+16
  • Vaulter
  • Sep 27, 2023 4:54 PM UTC

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-


Forum|alt.badge.img+5
  • Author
  • Apprentice
  • Sep 28, 2023 8:01 AM UTC

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?