Archiving data

In Business Integration Connect, 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 datafiles 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 only needs to be run 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:

    UNIX: /opt/IBM/WBIConnect/DBLoader/scripts/Oracle/export.sh
    

    Windows: \WBIConnect_Install_Dir\DBLoader\scripts\Oracle\export.bat
    

    The export script takes the following parameters for Oracle:

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

    Example: ./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:

    UNIX: /opt/IBM/WBIConnect/DBLoader/scripts/DB2/export.sh
    

    Windows: \WBIConnect_Install_Dir\DBLoader\scripts\DB2\export.bat
    

    The export script takes the following parameters for DB2:

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

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

    Note:
    export gives a 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 datafiles from the non-repudiation store on filesystem to the archive. This script needs to be run on the machines which have the non-repudiation file storage system. The script can be found in:
    UNIX: /opt/IBM/WBIConnect/bin
    
    Windows: \WBIConnect_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.e. The DB_ARCHIVE_TASK parameter should be kept as 1.
    3. Run the archive script. The results of the copying will be kept in the destination directory, as specified in the file DBOutput.txt.
    IMPORTANT: STEPS 1 AND 2 ABOVE COPY THE DATA FROM DATASTORES TO THE ARCHIVE LOCATION. ONLY EXECUTE THE NEXT TWO STEPS AS THEY REMOVE DATA FROM DATASTORES ONCE THESE STEPS HAVE BEEN 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 datafiles from the non-repudiation store on the filesystem.

    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/root privileges.

  5. Run the AR_NONREP_MAINTENANCE 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.
    Oracle: execute AR_NONREP_MAINTENANCE(YYYY-MM-DD)
    
    DB2: call AR_NONREP_MAINTENANCE(YYYY-MM-DD)
    

Copyright IBM Corp. 2003, 2004