DB2 Alphablox Repository Conversion Utility Help

Contents

  1. Interactive Operation
  2. Command Line Mode
  3. Example Command Line Mode
  4. Source and Destination Property Files
  5. Example Source and Destination Property Files
  6. Creating a Custom Repository

Interactive Operation

java -cp [class path] com.alphablox.util.convert.Convert

When no arguments are specified, the Repository Conversion Utility will go into an interactive mode.  The user will be prompted for the repository task to be completed along with all the parameters required to complete the operation.

NOTE: Please use the supplied batch file (RepositoryConversion.bat) in the <db2alphablox_dir>\to_pack\bin directory to run the Repository Conversion Utility. This batch file sets all required environment classpath settings.


Command Line Mode

The full description of what the repository convert task may be specified on the command line.  In this mode, the conversion utility will complete the operation without further input from the user.  Since the universe of possible operations is large, the command line can get a little complicated.

java -cp [class path] com.alphablox.util.convert.Convert operation destination [source] [arguments]

operationdescription
HELP Displays command line help.
CHANGE Changes the active repository to the destination repository.
COPY Copies the source repository to the destination repository, for example from the file system to an Oracle database.
DELETE Permanently deletes the destination repository.
MOVEMoves the source repository to the destination repository, for example from the file system to an oracle database. The original repository is deleted.
NEW | CREATE Create a new repository as specified by the destination and populate with the default repository values.
VERIFY Runs a number of repository validation operations on the destination repository.

destination is a required argument that points to a properties file that describes the target repository

source is an optional argument used for the COPY and MOVE operations

argumentsdescription
SERVER:name The instance name of the server. This argument must be specified.
DEBUG Outputs additional debugging information.
LOG:fileSpecifies the name of the conversion log file. The default file is 'repositoryconvert.log'
OVERWRITE Cause the conversion utility to overwrite any existing repository found at the destination. Without this argument, the conversion utility will stop if it detects an existing repository at the destination. The argument is used for the NEW, COPY, MOVE, and DELETE operations.
USEDEST Sets the DB2 Alphablox properties file to use the destination repository as its repository. The argument is used for the NEW, COPY, and MOVE operations
PROPS:option Use in conjunction with the SERVER:name argument to cause the conversion utility to extract the server properties from the source property file and distribute to the appropriate global and server instance specific property lists.  The global.list and specific.list files are used to determine property destination.

Option Settings:

  • ALL: Move global and specific properties
  • GLOBAL: Move global properties
  • SPECIFIC: Move specific properties
UPDATE Causes a MOVE or COPY operation to update the destination repository with information from the source repository rather than replacing the contents of the destination repository.
DDL:file Overrides the default DDL schema file allowing the user to specify an alternate source of DDL applied to new and existing repository. Normally, this override should not be used unless the repository needs to be created with a different DDL.
NOPORTTEST Use in conjunction with the USEDEST argument to force the conversion utility not to test the port DB2 Alphablox is running on.


Example Command Line Mode

Copy the source to a new destination and change the active repository for the AlphabloxAnalytics (default name) instance to the destination repository.

java -cp [class path] com.alphablox.util.convert.Convert COPY destination.properties source.properties SERVER:AnalysisServer USEDEST

Copy the source to a destination overwriting any existing repository.

java -cp [class path] com.alphablox.util.convert.Convert COPY destination.properties source.properties OVERWRITE SERVER:AnalysisServer

Copy the source to a destination and change the active repository for the AlphabloxAnalytics (default name) instance to the destination repository. Remove the source repository on success. Show debug messages.

java -cp [class path] com.alphablox.util.convert.Convert MOVE destination.properties source.properties DEBUG SERVER:AnalysisServer USEDEST

Create a new destination repository without moving any data from a source.

java -cp [class path] com.alphablox.util.convert.Convert CREATE destination.properties SERVER:AnalysisServer

Create a new destination repository without moving any data from a source. Use a different DDL schema file (d:\temp\sql.txt) to describe the table structure and initial data.

java -cp [class path] com.alphablox.util.convert.Convert CREATE destination.properties DDL:d:\temp\sql.txt SERVER:AnalysisServer

Change the active repository for the AlphabloxAnalytics (default name) instance to the destination repository.

java -cp [class path] com.alphablox.util.convert.Convert CHANGE destination.properties SERVER:AnalysisServer

Verify that the destination repository is in good working condition.

java -cp [class path] com.alphablox.util.convert.Convert VERIFY destination.properties DEBUG SERVER:AnalysisServer

Delete the destination repository and send the log information to a deleterepository.txt file.

java -cp [class path] com.alphablox.util.convert.Convert DELETE destination.properties LOG:deleterepository.txt SERVER:AnalysisServer


Source and Destination Property Files

The source and destination for repository conversion operations are described in separate property files. These property files contain both properties intended for the conversion utility as well as properties for the underlying JNDI service provider (and in some cases the properties are shared). The following list describes only those properties that are specifically used by the repository conversion utility.

RepositoryTarget=target

Set the type of repository that is the target of the property file. This property can be one of the following (these are case sensitive):

JDBCTarget | ABXTarget

fileroot=file system path

Sets the location of the file system part of the repository. This is used to adjust the server settings when changing the location of the repository.


Example Source and Destination Property Files

Oracle

RepositoryTarget=JDBCTarget
java.naming.factory.initial=com.alphablox.jndisp.AlphaBloxContextFactory
java.naming.provider.url.server=<server>
java.naming.provider.url.port=<port>
java.naming.provider.url.sid=<SID>
database_driver=oracle.jdbc.driver.OracleDriver
dbisolationlevel=default
fileroot=C:\alphablox\analytics\repository\servers\
commandfile=oracle.dmlsql
user=user
password=password

Microsoft SQL Server

RepositoryTarget=JDBCTarget
java.naming.factory.initial=com.alphablox.jndisp.AlphaBloxContextFactory
java.naming.provider.url.server=<server>
java.naming.provider.url.port=<port>
java.naming.provider.url.catalog=<catalog>
database_driver=com.alphablox.server.data.jdbc.MSSQLDriver
dbisolationlevel=default
fileroot=C:\alphablox\analytics\repository\servers\
commandfile=mssql.dmlsql
user=user
password=password

Sybase

RepositoryTarget=JDBCTarget
java.naming.factory.initial=com.alphablox.jndisp.AlphaBloxContextFactory
java.naming.provider.url.server=<server>
java.naming.provider.url.port=<port>
java.naming.provider.url.catalog=<catalog>
database_driver=com.sybase.jdbc.SybDriver
dbisolationlevel=default
fileroot=C:\alphablox\analytics\repository\servers\
commandfile=sybase.dmlsql
user=user
password=password

DB2 UDB v7

RepositoryTarget=JDBCTarget
java.naming.factory.initial=com.alphablox.jndisp.AlphaBloxContextFactory
java.naming.provider.url.server=<server>
java.naming.provider.url.port=<port>
java.naming.provider.url.alias=<alias>
database_driver=COM.ibm.db2.jdbc.net.DB2Driver
dbisolationlevel=default
fileroot=C:\alphablox\analytics\repository\servers\
commandfile=db2.dmlsql
user=user
password=password

DB2 UDB v8 v9

RepositoryTarget=JDBCTarget
java.naming.factory.initial=com.alphablox.jndisp.AlphaBloxContextFactory
java.naming.provider.url.server=<server>
java.naming.provider.url.port=<port>
java.naming.provider.url.alias=<alias>
database_driver=com.ibm.db2.jcc.DB2Driver
dbisolationlevel=default
fileroot=C:\alphablox\analytics\repository\servers\
commandfile=db2v8.dmlsql
user=user
password=password

Alphablox File System

RepositoryTarget=ABXTarget
java.naming.factory.initial=com.alphablox.jndisp.AlphaBloxContextFactory
java.naming.provider.url=alphabloxfile:c:\alphablox\AnalysisServer\repository\
fileroot=C:\alphablox\analytics\repository\servers\

Creating a Custom Repository

There are some cases where the Repository Conversion utility will not be able to execute the table creation because the database settings are not default. Conversely, a database administrator might want to look over the table schema and optimize it to best suit their database environment. These changes can be done through the DDL argument. The DDL argument allows a different DDL schema file to be used to create the repository tables. In the same directory as the Conversion Utility start file, included are: db2.dmlsql, oracle.dmlsql, oracle7.dmlsql, mssql.dmlsql, and sybase.dmlsql. These files are the defaults used to create the repository for the supported platforms. Below are the steps to use if you need to use a user defined DDL schema file:

  1. Install DB2 Alphablox and select a file-based repository
  2. Edit the corresponding dmlsql file in the <db2alphablox_dir>/Tools/convert directory
  3. Run the Repository Conversion Utility with the DDL:<directory_and_file> option or run the Conversion Utility interactively and select option 7, then 3.
  4. If any errors occur, determine where the error happened in the DDL schema file and edit it to solve the error.