databene

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

Environment Files

An environment file carries the identifier of the environment in its name: An environment 'mydb' is configured in a properties file 'mydb.env.properties'. The environment name is the only required argument for command line execution of DB Sanity.

The related properties file first is searched in the current working directory. If it is not found there, DB Sanity looks up the environment in a central configuration directory below your user's home directory: $USER.HOME/databene/. This way you do not need to copy environment files for each DBSanity project you are using and can reuse them in other Databene applications like Benerator. You can as well specify an environment name that refers to another directory. For example, an environment name 'config/test' refers to a file'config/test.env.properties'.

In the file, you need to specify details for connecting your database with a JDBC driver:

Name
Description
 
db_url
JDBC URL of the database
required
db_driver
Java class name of the JDBC driver
required
db_user
user name for database login
optional
db_password
password for database login
optional
db_catalog
the (JDBC) catalog to use
optional
db_schema
the (JDBC) schema to use
optional


If you are not familiar with JDBC, you can look up driver archive names, class names and url formats in a table in the Benerator documentation: http://databene.org/databene-benerator/116-my-first-ide-and-maven-based-benerator-project.html.

 

Recommended further reading: Command Line Arguments.