Client Management Suite

 View Only
  • 1.  Collection of PS's with a specific Invalid Package Status.

    Posted Jul 16, 2012 01:33 PM

    Good afternoon, (This question pertains to CMS 6.x)

    Looking for a gifted SQL resource to help me tie this together. 

    I want to create a collection that is going to just give me a list of PS’s that are going to give me an Invalid Package status for a given package. This will be used with Task Server to target machines for a Package Refresh job we have. Anyway the basic query below is where I am starting from. I will add parameters to it so we can use it inside the console for various packages. Here is my question. In the SWDPackageServer table is the PkgSvrId column with corresponding GUID. What I am confused about is how I would convert that PkgSvrId to a ResourceGuid that can be recognized in a collection. Does anyone know what I would join onto to link and have it return a list of ResourceGuids that will build my collection?

    Here is the basic query I am starting from.

     

    Select DISTINCT PkgSvrId

     

    FROM dbo.SWDPackageServer

     

    WHERE PackageId like '7B2E9293-7688-4C18-80C3-0001E33C69D7' and Status = 'Invalid Package'

    I have to think this is pretty straight forward but I am stuck. Any input woul be appreciated.

     

    Thank you

    DC



  • 2.  RE: Collection of PS's with a specific Invalid Package Status.

    Posted Jul 26, 2012 04:42 PM

    PkgSvrId should be a valid GUID for building filters or use in automation policies.  The following query would join it to vComputer to provide the server name, proving that the GUID is valid. (Or not, since I don't have access to a test DB at the moment.)

     

    SELECT vc.Name,ps.PkgSvrId
    FROM vComputer vc
    JOIN SWDPackageServer ps ON ps.PkgSvrId=vc.Guid
    WHERE ps.PackageId like '7B2E9293-7688-4C18-80C3-0001E33C69D7' and ps.Status = 'Invalid Package'