CA Service Management

Expand all | Collapse all

How to do lookup with grloader when using excel spreadsheet or sql query?

  • 1.  How to do lookup with grloader when using excel spreadsheet or sql query?

    Posted Dec 17, 2014 10:56 AM

    Hey All,

    Need your opinion if it is possible:

    Environment:
    USRD 12.9 - AA Setup - Win 2012
    1 Background and Standby, 3 App Servers
    Following fixes have been applied
    Cumulative Patch#1
    T5N6532
    T52Y303

     

    Issue background:
    Need to know how to do lookup field  in grloader when using sql query

    Client is loading the following query within grloader

    grloader -cfg grloader.cfg -s http://someserver:8080 -a -n -E -u ServiceDesk
    -p Password* -dbstmt "select osname as class, ServerName name, ServerName
    system_name, ShortDescription description, FacilityName location, Memory
    phys_mem, TotalDiskSpace hard_drive_capacity, NumberCPUs number_proc_inst,
    CPUSpeed proc_speed, LeaseExpirationDate lease_termination_date, userid
    resource_contact, userid billing_contact_uuid,Serverid asset_num,
    ServerOwnerGroupName support_contact1_uuid, DomainName zDNS_Name,
    SerialNumber zSerial_Number, Model zModel from Stars_New" -e
    error_stars_new.xml


    The table Stars_New is an intermediate table which collects Assets from an
    in-house application. When this runs the client is able to create/update CI's alright
    but gets a "warnings" for some fields like resource_contact and
    billing_contact_uuid. The warning says:
    <!--WARNING: Unable to find unique cnt.combo_name=(cluinetti).  -->

    The default lookup for both these fields is combo_name, the client can't use
    combo_name in our environment as they are not unique in our environment.

    When using lookup field in xml, it goes with the following format:
    <billing_contact_uuid lookup="userid">cluinetti</billing_contact_uuid>

    Next action:
    How can this be accomplish when using sql?



  • 2.  Re: How to do lookup with grloader when using excel spreadsheet or sql query?

    Posted Dec 18, 2014 02:41 AM

    Hi Jobby,

     

    Is there nothing for this in the 'samples' folder provided?

     

    Regards,

    Brian



  • 3.  Re: How to do lookup with grloader when using excel spreadsheet or sql query?

    Posted Dec 22, 2014 01:55 PM

    Hey Brian,

    Unfortunately, no



  • 4.  Re: How to do lookup with grloader when using excel spreadsheet or sql query?

    Posted Dec 18, 2014 11:46 AM


    Hi Jobby,

     

    You can lookup the resource_contact with user id.  Fill the resource_contact column  in the excel  file like

    ex:  sdm123{userid},sdm124{userid} etc where sdm123,sdm124 are the userids.

    This will be converted as <resource_contact lookup='userid'>sdm123</resource_contact>, <resource_contact lookup='userid'>sdm124</resource_contact>

    Hope this helps.



  • 5.  Re: How to do lookup with grloader when using excel spreadsheet or sql query?

    Posted Dec 22, 2014 01:56 PM

    Thanks Raju, I will give that a try from excel side