Skip to end of metadata
Go to start of metadata

To completely build (or rebuild) a SuperSTAR database using the settings in the project XML file, use the following command:

snu -create -insert <project>

Replace <project> with the filename of the project file. This must be the full path if it is not located in the current directory. For example:

snu -create -insert D:\SuperCHANNEL\MyProject.xml

Source Database Login Password

If the source database requires a login password, then you will need to specify this. The SuperCHANNEL GUI does not save this to the project file.

There are three options for specifying the password:

  • Use the -sp parameter on the command line. You will be prompted to enter the password. For example:

    snu -create -insert -sp D:\SuperCHANNEL\MyProject.xml
  • Use the -sp parameter and specify the password on the command line. For example:

    snu -create -insert -sp:MyPassword D:\SuperCHANNEL\MyProject.xml
  • Edit the project file so that it includes the password. To do this you need to open the project file in a text editor and locate the <DATABASE /> element that identifies the source database. This will look something like this:

    <DATABASE LOCATION="jdbc:sqlserver://localhost;databaseName=Retail Banking" METHOD="SOURCE" SCHEMA="dbo" USERNAME="STRdbuser"/>

    Add the PASSWORD="<password>". attribute. For example:

    <DATABASE LOCATION="jdbc:sqlserver://localhost;databaseName=Retail Banking" METHOD="SOURCE" SCHEMA="dbo" USERNAME="STRdbuser" PASSWORD="MyPassword"/>

    Make sure you are editing the <DATABASE /> element for the source database (the one with the attribute METHOD="SOURCE"). There will also be a <DATABASE /> element for the target database (with the attribute METHOD="TARGET").

    For security reasons, the SuperCHANNEL GUI never saves passwords to the project file. If you subsequently open the project in the GUI and save your changes, any password you have manually added to the project file will be stripped out during the save.

Out of these three options, the first one is the most secure, because the password itself is never displayed on screen. However, it is not a suitable strategy for automation because it requires the user to input the password when SNU is run. If you are implementing an automated solution then you will need to use one of the other methods.

As both of these methods require the database password to be stored in plain text (either in your script file that executes SNU or in the project file) you will need to take care to protect your password security by restricting read access to these files.

Redirecting Log Output

When you run SNU it outputs all log and error messages to the screen.

You may prefer to save this information to a log file. To do this, simply redirect the log and error messages to text files.

For example, the following command redirects logging information to a file called output.log and error messages to a file called output.err. No output will be written to the command window.

snu -create -insert D:\SuperCHANNEL\MyProject.xml 1>output.log 2>output.err

Silent Mode

By default, SNU outputs details of every cleansing action to the standard output (or to the text file if the log information is being redirected). For example:

If there are thousands of cleansing actions, the log file can grow very large. In this situation it becomes desirable to exclude the cleansing action information from the log file.

To do this, use the -silent and -suppress options to hide these messages. For example:

snu -create -insert -silent -suppress D:\SuperCHANNEL\MyProject.xml

Command Abbreviations

Some of the command line options can be abbreviated. For example you can specify -c and -i instead of -create and -insert:

snu -c -i -sp D:\SuperCHANNEL\MyProject.xml

For a full list of command line options, see Command Line Options - SNU.

Example: Running SNU from a Batch File

When automating the database build process, you may need to call SNU from a batch file. The following is an example of a Windows batch file that you could use to run SNU.

This file redirects the log output to output and error files, and writes the current date and time to the start and end of each log file.

@echo off
echo Currently Building Database
echo ---------------------------------
echo Please wait...
echo Start %date% %time%
call snu -c -i project.xml 1>output.log 2>output.err
echo Finish %date% %time%
echo Build Complete