Moving Multi-Valued (MV) Data to SQL Server


The information contained in this guide outlines the steps required to move a MV file to Microsoft SQL server using Kore's SQL Accelerator and Kourier products.  We suggest the following directory structure to organize the various files used in this process.

Directory Usage
...\ODS\Inbox Contains the datasets to be imported by the SQL DTS/SSIS packages.  This directory must be visible to both your MV server and the SQL server.
...\ODS\Logs Contains the logs files generated by each DTS/SSIS package.
...\ODS\Config Contains the configuration files used by the Kore's SQL Accelerator.
...\ODS\Schema Contains schema information generated by the quick-start tools.

Assumptions made in the Guide

  1. The column names used in the Kourier export must match the column names in the target SQL table.
  2. The name of the Kourier export will match the name of the target SQL table.
  3. The name of the export file will follow the naming convention of:  2n_7n_sql_table.export_mode
  4. A DSN has been created that points to the ...\ODS\Inbox.
  5. An Integration ID has been created with a SITE_ID property.

Exporting a MV File to SQL Server 

  1. In most MV systems, the dictionaries for a file do not accurately reflect the structure of the data.  Use the KT.FILEUSAGE tool to analyze the data in a file and compare it to the data defining dictionaries (D-type) for the file.  .
  1. Review and edit the results of the KT.FILEUSAGE command in Microsoft Excel using this procedure.
  1. Use the KT.SCHEMA2EXPORT command to build the Kourier exports for a file.  An export will be created for all single-valued fields (the parent export), all multi-valued fields and all associated multi-valued fields (the child exports).  Each export will be mapped directly into a single SQL table.  A Kourier Service will also be created to run the exports created by this command.
  1. Review each export created by the KT.SCHEMA2EXPORT command. The overall goal of each export is to take advantage of the power of SQL without carrying along MV database conventions that work against you in the SQL environment.
  1. Review the service created by the KT.SCHEMA2EXPORT command.
  1. While in the service, use the DDL button to create a SQL script that can be pasted into the SQL Query tool to create the SQL table(s) based upon the fields referenced in each export.
  1. While in the service, use the RUN button to run the service.  This will execute each export and move the result of each export to the ...\ODS\Inbox.
  1. Use the Accelerator to create the DTS/SSIS packages by selecting the BATCH button and selecting the files sent to the ...\ODS\Inbox in step 7.  Make sure to change any file path name containing a drive letter to a UNC path name.  This will allow the DTS/SSIS job to be run from any SQL server instance provided that server has access to the UNC path.
  1. Run the DTS /SSIS job to load the exported data.  Resolve any errors that may occur. The most common errors are:
  1. Repeat the above steps on each MV file you plan on moving to SQL Server.

Create the DTS/SSIS Master Package

Once you have created and tested all the individual DTS/SSID packages create one master DTS/SSID package that runs all the individual packages.  This allows you to schedule all jobs as a single unit.  For the DTS master package, make sure to limit the maximum number of tasks executed in parallel to 1.  This setting can be found on the General tab in the package properties.