• Success
    Manage your Success Plans and Engagements, gain key insights into your implementation journey, and collaborate with your CSMs
    Success
    Accelerate your Purchase to Value engaging with Informatica Architects for Customer Success
  • Communities
    A collaborative platform to connect and grow with like-minded Informaticans across the globe
    Communities
    Connect and collaborate with Informatica experts and champions
    Have a question? Start a Discussion and get immediate answers you are looking for
    Customer-organized groups that meet online and in-person. Join today to network, share ideas, and get tips on how to get the most out of Informatica
  • Knowledge Center
    Troubleshooting documents, product guides, how to videos, best practices, and more
    Knowledge Center
    One-stop self-service portal for solutions, FAQs, Whitepapers, How Tos, Videos, and more
    Video channel for step-by-step instructions to use our products, best practices, troubleshooting tips, and much more
    Information library of the latest product documents
    Best practices and use cases from the Implementation team
  • Learn
    Rich resources to help you leverage full capabilities of our products
    Learn
    Role-based training programs for the best ROI
    Get certified on Informatica products. Free, Foundation, or Professional
    Free and unlimited modules based on your expertise level and journey
    Self-guided, intuitive experience platform for outcome-focused product capabilities and use cases
  • Resources
    Library of content to help you leverage the best of Informatica products
    Resources
    Most popular webinars on product architecture, best practices, and more
    Product Availability Matrix statements of Informatica products
    Monthly support newsletter
    Informatica Support Guide and Statements, Quick Start Guides, and Cloud Product Description Schedule
    End of Life statements of Informatica products
Last Updated Date May 25, 2021 |

Challenge

Events that B2B Data Exchange generates can be archived to manage storage space in the runtime DX repository. The chosen archive tool is based upon requirements in each organization. The archive command line utility is a basic B2B Data Exchange utility that archives events to an XML file and deletes the events from B2B Data Exchange. Use the archive utility if your organization does not require access to archived events as archived events cannot be browsed or restored when archived with this utility.

Data Exchange also offers Data Archive which is an advanced archive tool that archives events and documents to a compressed file store. Refer to the B2B Data Exchange Administrator Guide for more information on Data Archive.

Description

This document focuses on the archive command line utility that should be used when the primary objective is to delete events from the DX runtime repository.

Archive Command Line Utility

Use the archive command line utility to archive events and documents from B2B Data Exchange to an external XML file and delete the events and the documents from B2B Data Exchange.

The following event types can be archived:

  • Root events
  • Parent and child events
  • Events with a final status
  • Legacy audit trail events from earlier B2B Data Exchange versions with a status of Completed or Rejected
  • Reconciliation events with a Reconciled reconciliation status

The archive specification file contains the parameters according to which events are to be archived. Archive events for a specific partner or account can be selected in the specification file. Events can also be archived based on the event creation date and time. The archive specification file also contains pre-configured rules that can be used to limit the archive criteria. If any event to be archived contains reconciliation information, the associated reconciliation event must be set to a status of Reconciled.

After the archive process completes successfully, B2B Data Exchange generates an event for the archive process with a status of Complete. The event contains a log BLOB that describes the object hierarchies in the archive file, the data that the archive utility purged, and any error that the archive utility generated.     

Archive Specification File

The archive specification file contains rules that the archive utility uses to determine which events to archive. The following table describes the archive specification file elements:

Element

Description

Name

Name of the archive rule.

PartnerName

Name of the partner. A partner name can either be specified or use one of the following:

- (ALL). Default. Archives events for all partners and events with no partners.

- (SYSTEM). Archives system events and legacy audit trail events

StorageLocation

Absolute path to the directory in which to create the archive file. The B2B Data Exchange server must be able to access the location where the archive file is stored.

EventAge

Required. The minimum age of the event to be archived based on the last change to the event status.

Specify the age in the following format:

<NumOfDays>d <NumOfHours>h <NumOfMinutes>m

The archive includes events where the status was changed before the specified number of days, hours, and minutes.

For example: 20d 12h 0m

This value means that the archive utility includes only events where the event status was changed at least 20 days and 12 hours ago.

ArchiveEvents

Indicates whether to archive events.

If PurgeEvents is set to true, use this element to specify whether the events will be archived before they are deleted from the repository.

If ArchiveEvents is set to false, the PurgeEvents element cannot be set to false. Default is true.

PurgeEvents

Indicates whether to delete events from the Data Exchange Repository. Use this element to delete events from the repository after they are archived. If PurgeEvents is set to false, the ArchiveEvents element cannot be set to false.

IncludeLogBlobs

Indicates whether the log data for log events will be included in the archive. Default is false.

Following are examples of archive specification files:

Requirement– Purge events for all partners or events with no partner that are older than 1 day.

                        <ArchiveTask>
                              <ArchiveRule>
                                    <Name>Archive events older than a day</Name>
                                    <PartnerName>(ALL)</PartnerName>
                                    <StorageLocation>c:\temp\archive </StorageLocation>
                                    <EventAge>1d 0h 0m</EventAge>
                                    <ArchiveEvents>false</ArchiveEvents>
                                    <PurgeEvents>true</PurgeEvents>
                                    <IncludeLogBlobs>false</IncludeLogBlobs>
                          </ArchiveRule>
                    </ArchiveTask> 

Requirement– Purge audit trail and system events older than 5 days

                    <ArchiveTask>
                          <ArchiveRule>
                                    <Name>System Events</Name>
                                    <PartnerName>(SYSTEM)</PartnerName>
                                    <StorageLocation>c:\temp\archive\system</StorageLocation>
                                    <EventAge>5d 00h 00m</EventAge>
                                    <ArchiveEvents>false</ArchiveEvents>
                                    <PurgeEvents>true</PurgeEvents>
                                    <IncludeLogBlobs>true</IncludeLogBlobs>
                          </ArchiveRule>
                    </ArchiveTask>

Archive Command Syntax

After the archive rules are defined in the specification file, run the archive utility with the command line. The archive utility creates the archive file and deletes the archived events from B2B Data Exchange.

The archive utility uses the following syntax:

archive
<-s|--specification> file
<-u|--user> userID
<-p|--password> user password
[--server "hostname:port"]

The following table describes options and arguments for the archive utility commands:

Option

Argument

Description

-s
--specification

file

Required. Absolute path and file name of the archive specification file.

-u
-user

userID

Required. User ID of a B2B Data Exchange user account with archiving privileges.

-p
--password

User password

Required. B2B Data Exchange user password. Enter a value depending on whether ISP or native authentication mode is used.

--server

“hostname:port”

Optional. Host name and port number of the Data Exchange server. If this option is not passed, the archive utility connects to the localhost server with the default port 18095.

The argument must be enclosed in quotation marks, such as:

archive --server “localhost:18095”...

Examples by Operating System:

Windows:

<DXInstallationDir>\dx-tools\archive.bat -s c:\temp\archive\archive_spec_file.xml -u admin -p xxxx  --server “infa-server:18095”

Unix

<DXInstallationDir>\dx-tools\ archive.sh -s \infa\temp\archive\archive_spec_file.xml -u admin -p xxxx  --server “infa-server:18095”

Truncate all events in DX repository

Follow the steps below to delete all of the event history in the B2B DX repository at once:

  1. Stop DX services.
  2. From the command line, navigate to ..\DataExchange\dx_tools folder and execute:

    repoutil -c truncateEvents -l <repository JDBC URL> -u <repository JDBC user name> -p <repository JDBC password>
     
  3. A confirmation message is displayed. Acknowledge the confirmation to proceed with removal of the events.

Note: The command executes the ‘truncate table …’ which means that there is no database transaction log of that operation.

Table of Contents

Success

Link Copied to Clipboard