Client Automation - How to get the list of Scalability Servers with a specific package in staging library in command line ?

Document ID : KB000116568
Last Modified Date : 28/09/2018
Show Technical Document Details
Question:
cadsmcmd does not contain command to retrieve the list of scalability servers which have a specific package in the staging library.
How to get this list in command line ?
Answer:

This list could be retrieved with a SQL query executed with sqlcmd.exe

Example :

To research all Scalability Servers with package PKG 1.0 is staging library : 
 
sqlcmd -d mdb -S SQLSERVER\INSTANCENAME -Q "SET NOCOUNT ON ; SELECT a.agent_name FROM usd_applic j, ca_agent a, usd_actproc p, usd_rsw r WHERE status=4 and uninstallstate<>2 and a.object_uuid=j.target and p.objectid=j.actproc and p.rsw=r.objectid and r.itemname='PKG' and r.itemversion='1.0'" -h-1 -W -U ca_itrm -P NOT_changedR11 

 
Remarks : 
 
  • Replace r.itemname='PKG' and r.itemversion='1.0' by correct Package name and Package version.
 
  • Replace -S SQLSERVER\INSTANCENAME by SQL Server Name and Instance Name.
 
  • Replace -P NOT_changedR11 by the password for ca_itrm if it has been changed 
or replace -U ca_itrm -P NOT_changedR11 by -E to use unified logon (if logged user has enough rights on SQL Server).