CA Service Management

Expand all | Collapse all

Updating large Ldap entries.

  • 1.  Updating large Ldap entries.

    Posted Jun 24, 2016 10:46 AM

    Hi guys.

     

    We have a very large list of users who need to CA Service Desk data updated to fields as a location / department according to the customer supplied. How can we update many users simultaneously without resorting to pdm_ldap_sync? There are data that we can not extract the AD and need to update many users from different locations.

     

    Regards,

    Ana.



  • 2.  Re: Updating large Ldap entries.

    Posted Jun 24, 2016 06:52 PM

    Hi,

     

    You can use pdm_userload to mass update contact data. Let me know if you need an example, I can put one together next week.

     

    Database Loader - CA Service Management - 14.1 - CA Technologies Documentation



  • 3.  Re: Updating large Ldap entries.

    Posted Jun 28, 2016 05:18 PM

    Hi Grant, thanks for the reply.

     

    I was able to generate an update load using pdm_userload, but another challenge came in my hands: Update fields usp_contact table to those same users.

    I tried to do a load using the fields that needed (essentially the contact_type ca_contact the table), and came to me the following error:

    ca_contact: Incomplete logical key.

    ERROR: Can not create mapping for table (ca_contact)

    ERROR: Skipping table.

    We need to update this table and usp_contact, but even reading so many materials about it, still confused about my steps.

     

    Regards.



  • 4.  Re: Updating large Ldap entries.

    Posted Jun 28, 2016 11:23 PM

    Hi,

     

    What fields are you trying to update? Location and department are in ca_contact, not usp_contact.



  • 5.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 09:41 AM

    Hi Grant,

     

    No, I've updated my contacts using these fields. what I need now is to update all fields of usp_contact table, but I do not really understand how to do according to many procedures found. If you can give me a hand, thanks a lot!

     

    Regards.



  • 6.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 09:46 AM

    Airu,

     

    I've built a process (well a couple processes) within PAM to handle this. Basically, the process would read your file to get the contacts that need to be updated, format the data into array format, then use either SOAP or PAM connectors to create or update the contacts as necessary. We only are updating a few hundred a day most of the time, so I just did a simple loop, but it's pretty easy to split it out into groups of 10+ and do multiple loops at once.

     

    Hope this helps.

     

    Thank you,

     

    Clinton

    Director, Enterprise Systems Management

    Integral Consulting Services



  • 7.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 11:23 AM

    Hello crandall

     

    Thank you for the tip, and I'm glad to work with you this method. I just wanted to understand the use of pdm_deref to help me update contacts in service desk for usp_contact table once using the pdm_load, is not possible. All fields that need updating are in it, and an urgent need to update them.



  • 8.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 01:44 PM

    Hi Airu,

     

    Here's an example showing how to update Access Type via pdm_userload and pdm_deref.

     

    First start with an input file, this contains the userid for your users and access type name.

    input_file.dat

    Table usp_contact
    userid_DEREF  c_acctyp_id_DEREF
    {"userid1","Access Type 1"}
    {"userid2","Access Type 1"}
    {"userid3","Access Type 2"}
    

     

    Next save this code into a file named cnt_access_type_deref.dat.  When you run the pdm_deref command against this file it will convert the userid_DEREF column to ID and will contain users contact_uuid, it will also gather the ID for the access type.

    cnt_access_type_deref.dat

    Deref
    {
    input=userid_DEREF
    output=id
    rule="select id from ca_contact where userid =?"
    }
    Deref
    {
    input=c_acctyp_id_DEREF
    output=c_acctyp_id
    rule="select id from Access_Type_v2 where sym =?"
    }
    

     

    Once you have your input and deref file you can run pdm_deref to generate the final load file.  After running pdm_deref review the outputfile.dat to ensure it correctly converted the column and user data.  I suggest testing this before running it against a production environment.

    Example: pdm_deref -s cnt_access_type_deref.dat input_file.dat > outputfile.dat

     

    Lastly, run pdm_userload to load your data.

    Example: pdm_userload -f outputfile.dat



  • 9.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 03:33 PM

    Hi Grant

     

    His answer was of great help, I have no words to thank. But I wanted to know if I should go up the first sample you sent me or just run pdm_deref. I was confused about what I should do. The input_file is uploaded to the service desk through userload or is only from the pdm_deref file for them to take the reference?

     

     

    Thanks.



  • 10.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 03:42 PM

    Hi Airu,

     

    In my example pdm_deref builds the output file from the deref file and input file.  You would then run pdm_userload against the output file.  CA also has some useful information that may help you understand this process.

    How to Use pdm_deref Example - CA Service Management - 14.1 - CA Technologies Documentation



  • 11.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 03:56 PM

    Hi Grant,

    I tried to make use of pdm deref, but I found the following error: Spec_parse_tree (Line = 1, Column = 1) error: syntax error

    What does this error mean?

    Thanks.



  • 12.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 04:37 PM

    Can you share the contents of your input and deref files?



  • 13.  Re: Updating large Ldap entries.

    Posted Jun 29, 2016 04:39 PM

    One line from the input file should be sufficient.



  • 14.  Re: Updating large Ldap entries.

    Posted Jul 01, 2016 09:13 AM

    Hi Grant.

     

    I hit my understanding of the pdm_deref and mounted a charge, but am encountering problems in relation to dmn objects, tz and ct_mth. Every time I run pdm_deref Service Desk accuses compilation error and gives bad format, I believe it is because the table name.

    My rules: Deref

    {

    input = notify_method1

    output = c_cm_id1

    rule = "select id from where ct_mth sym =?"

    }

     

    deref

    {

    input = domain

    output = c_domain

    rule = "select id from dmn where sym =?"

    }

     

    My input file is correct, set to: TABLE usp_contact

    userid, domain, mth, access

    { "Userid.id", "Employee", "Email", "Employee"}

     

    I'm putting the rules into separate files and running at once, what might be happening?

     

    Regards.



  • 15.  Re: Updating large Ldap entries.
    Best Answer

    Posted Jul 01, 2016 10:35 AM

    Hi Airu,

     

    I played around with the columns you're trying to load and figured it out.  The deref statements need to use the schema name for each object, not the dbms name.  You can find the schema names in schema designer.  Also sometimes it's easier to not deref data, it's useful in gathering contact IDs, but tables that have few rows can be added to the load fine manually.  For instance, look up the id for the email contact method and simply place it in the final file, then you won't need the contact method deref.

     

    deref file

    Deref
    {
    input=userid_DEREF
    output=id
    rule="select id from ca_contact where userid =?"
    }
    Deref
    {
    input=c_acctyp_id_DEREF
    output=c_acctyp_id
    rule="select id from Access_Type_v2 where sym =?"
    }
    Deref
    {
    input=c_cm_id1_DEREF
    output=c_cm_id1
    rule="select id from Contact_Method where sym =?"
    }
    Deref
    {
    input=c_domain_DEREF
    output=c_domain
    rule="select id from Domain where sym =?"
    }
    

     

    input file

    Table usp_contact
     userid_DEREF  c_acctyp_id_DEREF  c_domain_DEREF  c_cm_id1_DEREF 
    {"adm-grantb","Employee","Employee","Email"}
    


  • 16.  Re: Updating large Ldap entries.

    Posted Jul 01, 2016 10:57 AM

    Hi Grant, thank you for all the help he has provided.

     

    Would if I use bop_info I can extract the schema name for the other tables that need, as tz and bpwshft?

     

    Regards.



  • 17.  Re: Updating large Ldap entries.

     
    Posted Jul 05, 2016 04:44 PM

    Hi Airu - Did gbruneau 's response help answer your question? If so please mark as Correct Answer. Thanks!



  • 18.  Re: Updating large Ldap entries.

    Posted Jul 01, 2016 11:02 AM

    Yes, you can also use bop_sinfo to gather the schema name.  If you don't know the dbms or object names and need the schema name you can check the table and object reference.

    Table and Object Cross-References - CA Service Management - 14.1 - CA Technologies Documentation

     

    D:\>bop_sinfo -q tz

    Factory tz < Timezone >

     

    D:\>bop_sinfo -q wrkshft

    Factory wrkshft < Bop_Workshift >