Configuring SapXForm With HVR 4
SAP database typically contains tables that fall into one of the following three categories:
Transparent Tables
Transparent tables are just an ordinary database tables, and can be replicated in a usual way.Pooled and Cluster tables
Pooled and Cluster tables, are special in that the data for several Pooled or Cluster tables is grouped and physically stored together in a single database table. With a help of a third-party "SAP Transform" Engine, HVR is capable to extract and replicate individual tables from SAP table pools and clusters.SAP Transform Engine is a third-party product. It is not shipped as part of the HVR, and is licensed separately.
SAP Catalogs
SAP Catalogs only contain metadata and do not usually need to be replicated. HVR and SAP Transform Engine themselves, however, need data from SAP Catalogs for the purpose of Pooled and Cluster tables processing.
The following diagram shows general architecture of the HVR SAP Transform solution. In a typical SAP database replication scenario, three channels need to be setup:
- saptransp: a channel to replicate the Transparent tables.
- sapmeta: a channel to extract metadata out of SAP Catalog tables. This data is required to build and run sapxform channel.
- sapxform: a channel to extract (transform) and replicate Pooled and Cluster tables.
Prerequisites
In this document the reader is assumed to be familiar with the basic HVR concepts. We also assume that the hub database already exist, and source and destination database locations are already configured.
HVR hub should be installed on Windows. This requirement is due to SAP Transform Engine can only be run on a Windows platform, and HVR requires that the SAP Transform Engine is installed on a hub machine. The SAP Transform Engine also requires .NET Framework version 4.5 to be installed.
Before you begin, all SAP tables that need to be replicated should be identified. The Pooled and Cluster tables should be listed in a plain-text file, each table on a separate line. We will refer to this file further as hvrsaptables.txt. Empty lines are ignored, lines beginning with a hash mark (#) are considered comments and are also ignored.
An example of the hvrsaptables.txt follows:
#SAP tables needed for HVR's sapxform channel BSEC # Cluster table BSEG # Cluster table BSET # Cluster table T009B # Pool table
Transparent tables should be listed separately from the Pooled and Cluster tables.
Installing SAP Transform Engine
SAP Transform Engine is distributed separately from HVR. Once you have obtained a copy of the SAP Transform Engine, copy the executable file sapxform.exe to the $HVR_HOME/lib/transform directory.
Setting up Transparent Channel : saptransp
A Transparent channel is an ordinary database to database one-way replication channel. We will not focus on creating the Transparent channel in details in this document.
Setting up Meta-data Channel : sapmeta
SAP Catalog data is required to build and run the SAP XForm channel. A special Meta channel is used to extract SAP Catalog data into a set of XML files. To set up the Meta channel the following actions are required.
First, a File Location should be create, pointing to a directory where SAP Catalog data will be stored.
Once the new location is added, a predefined Meta channel definition should be imported. To do this, right-click on the hub name, choose Import Catalogs..., navigate to $HVR_HOME/demo/sapxform and choose sapmeta_def.xml file. A new channel called sapmeta will be added to the hub. This channel contains two Location Groups. Add your Source database location to the SRC Location Group. Then add the File Location (created on the previous step) to the METADIR Location Group.
As a last step, execute HVR Refresh in this channel.
Setting up Transform Channel : sapxform
Setting up SAP XForm channel is a complex task which cannot be performed manually. Instead a special script hvrsapxformgen is provided by HVR to generate the SAP XForm channel. This script takes as parameters the file with a list of the Pooled and Cluster tables (hvrsaptables.txt below) and a path to the directory the SAP Catalog data is extracted to (C:\HVR\hvrsapmeta below). It should be invoked from the OS command line as follow:
c:\> hvrsapxformgen sapxform_hub/password sapxform hvrsaptables.txt C:\HVR\hvrsapmeta # Oracle or c:\> hvrsapxformgen -u hvr_user/password sapxform_hub sapxform hvrsaptables.txt C:\HVR\hvrsapmeta # SQL Server
When this channel is generated, users of the HVRGUI must use Reload their hub database, After this, the channel can be setup normally using HVR Refresh and HVR Initialize.