16.3. Switching to a Production Database

You can use the Database Configuration Tool to switch to a production database. The Database Configuration Tool is an Apache Ant script that sets the database to be used by JBoss Enterprise Application Platform. The script can be found in the JBOSS_HOME/jboss-as/tools/schema/ directory.


  • Apache Ant must be installed.
  • The database that you wish to use must already exist.
  • A user with permission to make changes to that database must already exist.
  • The JDBC driver JAR file for the database must be in the server configuration's lib/ directory.


You can only use the Database Configuration Tool to change the database configuration once. Also, it must be run before any other changes are made. If you try to run the script on an installation that has already been configured, it may not work as intended.
  1. Back Up Your Server Profile

    Make a copy of the server profile for which you plan to configure your database as the Database Configuration Tool modifies the configuration settings. cp -R JBOSS_HOME/jboss-as/server/Profile /path/to/backup/folder.
  2. Run the Database Configuration Tool

    Change to the directory containing the Database Configuration Tool script: cd JBOSS_HOME/jboss-as/tools/schema
  3. Run Apache Ant

    Run the ant command to launch the script.
  4. Enter Data

    Following the prompts, enter the following information as it is requested:
    • the type of database being used,
    • the name of the database,
    • the host name or IP Address of the database,
    • the TCP port being used for the database,
    • the user name needed to access the database, and
    • the password for the user account.


    You could also add these values directly to the build.properties file (found in the same directory) before running the script. The Database Configuration Tool will not prompt you for these properties if it finds you have already added them to the file.

The Database Configuration Tool updates the relevant configuration files and exits. JBoss Enterprise Application Platform is then reconfigured for use with the production database.