Clarity Service Management

Expand all | Collapse all

CA SDM - Which function performs archiving and purge in CA SDM?

Jump to Best Answer
  • 1.  CA SDM - Which function performs archiving and purge in CA SDM?

    Posted 04-16-2018 02:30 PM
    Hello Sirs,  I am investigating the archiving and purge functionality of CA SDM because the production database
    is growing sharply.
    I understood how to do the programming and even how to include new objects (tables). I used the following
    documents as basis:
    https://comm.support.ca.com/.../how-to-archive-an.../kb000010666
    https://docops.ca.com/.../how-to-archive-and-purge-historical...
    https://communities.ca.com/docs/DOC-231150996
    However, I would like to use the archiving functionality to delete SDM information and load in a historal
    database  for legal issues and to facilitate company reporting. I looked at the form "list_arcpur_rule.htmpl"
    to try to identify which function is used internally to perform the archiving, but I could not identify it.
    Can anyone tell me which command performs this function and whether it is possible to execute it by spel or
    by webservice?
    The ideia is use CA PAM to control the archiving and purge method to migrate information to a historical
    database.
    Thanks.


  • 2.  Re: CA SDM - Which function performs archiving and purge in CA SDM?

    Posted 04-16-2018 02:35 PM

    Mario,

     

    I'm not sure if this answers your question, but there is a specific daemon, arcpur_srvr that is used to handle the archive/purging process. I'm not aware of a method to execute the daemon or pass information to it outside of the expected design.



  • 3.  Re: CA SDM - Which function performs archiving and purge in CA SDM?

    Posted 04-17-2018 11:00 AM

    Hi Alex,

    Thanks for your tip. I understand that this daemon is responsible for triggering the archiving process and then I found the method that is executed, however this method is a call in spel and not a function that could be executed externally. I'm analyzing the solution as one and trying to find a better way out.

    Thank you.



  • 4.  Re: CA SDM - Which function performs archiving and purge in CA SDM?

    Posted 04-17-2018 09:19 AM

    Hello Mario,


    As far as I am aware, I do not know of how you can leverage PAM to use the archive/purge function that you are describing.

     

    You are asking about creating a historical database for reporting purposes.  One thought I could suggest is to use a replication tool at the database level to copy out the existing content that you currently have in your production database and use that to create your historical DB, then use archive/purge to remove the older content you have accumulated in your production.

     

    I also believe you can take the archive files generated and load the archive files into the historical DB as well.



  • 5.  Re: CA SDM - Which function performs archiving and purge in CA SDM?

    Posted 04-17-2018 04:47 PM

    Hi David,

    You are right. Your solution is the most complete and correct, but for internal issues of my organization is also the most complex and costly. I found the functions of the archiving process in spel in the file "arcpur.frg" and I am trying to execute them through a SOAP call through CA PAM. Here is the information I found:

     

    arcpur.frg file:

     

    #define syntax strict
    ////////////////////////////////////////////////////////////////////////////
    // Copyright (C) 2000, 1995 Computer Associates International, Inc
    //
    // Copyright (C) 1995 Legent Software, Inc., as an
    // unpublished work. This notice does not imply unrestricted or public
    // access to these materials which are a trade secret of Legent
    // Corporation or its subsidiaries or affiliates (together referred to
    // as "LEGENT"), and which may not be reproduced, used, sold or
    // transferred to any third party without LEGENT's prior written consent.
    //
    // All Rights Reserved.
    //
    // RESTRICTED RIGHTS LEGEND
    // Use, duplication, or disclosure by the Government is subject to
    // restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
    // Technical Data and Computer Software clause at DFARS 252.227-7013.
    ////////////////////////////////////////////////////////////////////////////
    //
    // This frg file provides two methods that are callable from an external
    // scheduler program to start and stop an archive and purge process.
    //
    ////////////////////////////////////////////////////////////////////////////

    void start_arcpur(string rule_name, int hours)
    {
    object arcpur_addr;
    arcpur_addr = (object)("@|arcpur_srvr|arcpur_obj|0");
    if (hours <= 0) hours = -1;
    send_wait(0, arcpur_addr, "start_arcpur", rule_name, hours);
    if (msg_error())
    {
    printf ("Error: see stdlog for detail.");
    }
    else
    printf ("The start_arcpur request has been issued. See stdlog for any error");
    }

    void stop_arcpur(string rule_name)
    {
    object arcpur_addr;
    arcpur_addr = (object)("@|arcpur_srvr|arcpur_obj|0");
    send_wait(0, arcpur_addr, "stop_arcpur", rule_name);
    if (msg_error()) {
    printf ("Error: see stdlog for detail.");
    }
    else {
    printf ("The stop_arcpur request has been issued. See stdlog for any error");
    }
    }

     

    Webservice method:

     

    callServerMethod

     

    Description
    Use this method to invoke an arbitrary server-side method. These are methods defined in the proprietary “spell” scripting language.

     

     

    My solution is :
    1 - Use the archiving method to generate the file with the data without performing the purge. (this step can be scheduled in SDM or by the PAM, if by PAM with more control of the process);
    2 - Work the generated files to load via pdm_load in the historical tables;
    3 - Check if all data has been loaded;
    4 - If the load is correct perform the deletion of the data through pdm_load -r.

     

    That way I will be able to handle the errors and make sure that I will only delete SDM information when the historical tables are loaded. Also in case of error I will have the generated files as a backup. Using CA PAM I can generate logs and even send emails and statistics to the managers of my company.

     

    Please tell me what you think about this? Thank you for your help.



  • 6.  Re: CA SDM - Which function performs archiving and purge in CA SDM?
    Best Answer

    Posted 04-17-2018 11:49 PM

    Note that you can also call the arcpur.frg file from the bop_cmd command on the SDM server

     

    e.g.

    bop_cmd -f arcpur.frg "start_arcpur('rule name')"

     

    Regards,

    Gordon.



  • 7.  Re: CA SDM - Which function performs archiving and purge in CA SDM?

    Posted 04-18-2018 08:56 AM

    Hi Gordon! 

     

    Thank you very much! The command "bop_cmd" works perfectly!

     

    Thanks

     

    Mário Gomes