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.
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
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
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%'
This one is not working, giving same output and not returning Agent name
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
Its working if i remove C.name, i guess its giving trouble since there are 2 “name” i.e. C.name and IT.name
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-
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
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.