databene

 
  • Increase font size
  • Default font size
  • Decrease font size

Instaling Mad For DB

 

Download Mad For DB

Download the latest version of Mad For DB from the download page.

 

Unzip Mad For DB

Unzip the downloaded file in an appropriate directory, e.g. /Developer/Applications or C:\Program Files\Development.

 

Set MAD4DB_HOME

Create an environment variable MAD4DB_HOME that points to the path you extracted Mad For DB to.

Windows Details: Open the System Control Panel, choose Advanced Settings - Environment Variables. Choose New in the User Variables section. Enter MAD4DB_HOME as name and the path as value (e.g. C:\Program Files\Development\mad4db-0.1). Click OK some times.

Mac/Unix/Linux Details: Open the file .profile in your user directory. Add an entry that points to benerator, e.g.: export MAD4DB_HOME=/Developer/Applications/mad4db-0.1

 

Extend the system's PATH

extend the system's path with the directory where Benerator has its binaries: $BENERATOR_HOME/bin:

Windows Details

Open the System Control Panel, choose Advanced Settings - Environment Variables.

  • If no PATH variable exists, click New in the User Variables section. Enter PATH as name and enter %MAD4DB_HOME%\bin as value.
  • If a PATH variable exists, click Edit in the User Variables section. Enter %MAD4DB_HOME%\bin as value.

Click OK some times.

Mac/Unix/Linux Details

Open the file .profile in your user directory. Add a path entry that points to benerator (after the definition of BENERATOR_HOME):

export PATH=$PATH:$MAD4DB_HOME/bin

 

Optional: Install JDBC drivers

Benerator comes with open source JDBC drivers (for connecting to a database). No extra installation is necessary for them:

• MySQL Connector
• HSQL DB
• H2 DB
• Derby Client
• PostgreSQL
• jTDS Driver (MS SQL Server or Sybase)
• Jaybird (Firebird DB)

However, if you need to use a closed source database driver, the vendor usually requires you to accept usage conditions before you can download and install their driver. So, if you are using Oracle DB or DB2, get the JDBC drivers from these sites:
• Oracle [http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html]: Download the JDBC driver 11.1.0.7 zip file. It is backwards compatible down to Oracle 9. Extract the contained file ojdbc6.jar to benerator's lib directory.
• DB2 [http://www-306.ibm.com/software/data/db2/java]: Follow the link 'IBM Data Server Driver for JDBC and SQLJ', download the driver archive and copy the contained file db2jcc.jar to benerator's lib directory.

 

Optional: Set up log4j

Troubleshooting is simpler if you make use of log4j's configuration capabilities. If you do not know (or care) about logging, simply skip this step. Otherwise put a custom log4j.xml or log4j.properties file into the MAD4DB_HOME/lib directory.

 

For Unix/Linux/Mac systems: Set permissions

Open a shell on the installation's root directory and execute

chmod a+x bin/mad4db 

 

Mac OS X configuration

On Mac OS X you need to provide benerator with an explicit configuration of the JAVA_HOME path. See http://developer.apple.com/qa/qa2001/qa1170.html for a good introduction to the OS X way of setting up Java. It is based on aliases conventions. If you are not familiar with that, you should read the article. If Java 6 (or newer) is the default version you will use, you can simply define JAVA_HOME by adding the following line to your .profile: in your user directory:

export JAVA_HOME=/Library/Java/Home 

If it does not work or if you need to use different Java versions, it is easier to 'hard-code' JAVA_HOME like this:

export  JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home