Skip to main content
Solved

Commvault DB Query to list clients having File System Agent Installed

  • September 27, 2023
  • 8 replies
  • 176 views

Forum|alt.badge.img+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.

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
Did this answer your question?

8 replies

Sunil
Vaulter
Forum|alt.badge.img+13
  • Vaulter
  • 300 replies
  • September 27, 2023

@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+6
  • Author
  • Byte
  • 30 replies
  • September 27, 2023

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+13
  • Vaulter
  • 300 replies
  • Answer
  • September 27, 2023

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+6
  • Author
  • Byte
  • 30 replies
  • September 27, 2023

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


Sunil
Vaulter
Forum|alt.badge.img+13
  • Vaulter
  • 300 replies
  • September 27, 2023

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+6
  • Author
  • Byte
  • 30 replies
  • September 27, 2023

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+13
  • Vaulter
  • 300 replies
  • September 27, 2023

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+6
  • Author
  • Byte
  • 30 replies
  • September 28, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings