Archiving data

In WebSphere Partner Gateway, archiving is used to move the inactive (non-repudiation) content to a safe media. Archiving consists of removing old data from the LG_MSG_ARCHIVE and LG_CERT_ARCHIVE tables. It also moves the payload data files from the non-repudiation store on the file system to the archive. The archived files can be restored if the non-repudiation data is needed.

Caution:
Purging certain database tables will remove information about files stored in the system. Before purging database tables, review Removing old files.
  1. Run the export script to copy the data from the tables to the archive:

    Oracle

    For Oracle, the catexp.sql or catalog.sql script needs to be run to allow the database to be exported. Refer to the Oracle documentation for details. The catexp.sql or catalog.sql script needs to be run only once on a database. You do not need to run it again before you perform the export.

    Note:
    The actual names of the script files depend on your operating system. The script filenames and the method for running them are described in your Oracle operating system-specific documentation.

    Before you begin using Export, confirm the following:

    The export script needs to be run from a system which has the Oracle client installed. Also, the ORACLE HOME, ORACLE SID, and ORACLE PATH environment variables must be defined. The script is located in one of the following locations, depending on your platform:

    UNIX: /opt/{INSTALL DIR}/DBLoader/scripts/Oracle/export.sh

    Windows: \{INSTALL DIR}\DBLoader\scripts\Oracle\export.bat The export script takes the following parameters for Oracle:

    Syntax of export script:

    ./export <system password> <connect string>
     <destination directory> <schema name> <cut off date YYYYMMDD>

    Example of export script:

    ./export password connectstring /tmp bcgapps 20030101

    The archive, named export.dmp, and the export.log file will be added to the /tmp/20030101 folder.

    DB2

    The export script needs to be run from the DB2 command window after establishing a connection with the database. The script is located in one of the following, based on your platform:

    UNIX: /opt/{INSTALL DIR}/DBLoader/scripts/DB2/export.sh

    Windows: \{INSTALL DIR}\DBLoader\scripts\DB2\export.bat The export script takes the following parameters for DB2:

    Syntax of export script:

    ./export <cutoff date YYYY-MM-DD> <archive location>
     <database name> <database user name> <database password>

    Example of export script:

    ./export 2003-01-01 /tmp bcgapps bcgapps
     db2inst1 pa55word

    Note:
    The export script gives an SQL3100W warning which can be safely ignored.

    The archive and the msgarchive.txt log file will be added to the /tmp/2003-01-01 folder.

  2. Run the archive script to copy the payload data files from the non-repudiation store on the file system to the archive. This script needs to be run on the machines that have the non-repudiation file storage system. The script can be found in one of the following paths, depending on your platform:

    UNIX: /opt/{INSTALL DIR}/bin

    Windows: \{INSTALL DIR}\bin

    1. Execute the setenv script to ensure that the PATH and CLASSPATH variables are set properly.
    2. The DBArchiveParams.properties file is used by the archive script to get all of the required information. Edit the DBArchiveParams.properties file to ensure that the correct parameters are being passed. Refer to the sample entries for more details. Make sure that the entries correspond to the correct database type. The cut-off date should be the same as in step 1. The DB_ARCHIVE_TASK parameter should be kept as 1.
    3. Run the archive script. The results of the copy operation will be kept in the destination directory, as specified in the DBOutput.txt file.
    CAUTION:
    Steps 1 and 2 above copy the data from the data stores to the archive location. Do not execute steps 3 and 4, which remove the data from the data stores, until the copy operations have completed successfully.
  3. Set the DB_ARCHIVE_TASK parameter in the DBArchiveParams.properties to 0.
  4. Run the archive script again to purge the payload data files from the non-repudiation store on the file system.

    This script needs to be run on the machines which have the non-repudiation file storage system. Also, this script must be run with administrator or root privileges.

  5. Run the AR_NONREP_MAINTENANCE database stored procedure to purge the archived data from the LG_MSG_ARCHIVE and LG_CERT_ARCHIVE tables. It takes the cut-off date as the input parameter. This stored procedure is available in the database and is added during installation.

    Syntax of the AR_NONREP_MAINTENANCE stored procedure:

    Oracle: execute AR_NONREP_MAINTENANCE(YYYY-MM-DD)
    DB2: call AR_NONREP_MAINTENANCE(YYYY-MM-DD)

Copyright IBM Corp. 2003, 2005