Creating and configuring the databases with Ant tasks

If you did not manually create databases, you can use Ant tasks to create and configure your databases.

About this task

If you did not use the procedure in Optional creation of databases to create the databases manually, complete the following steps.

Important: You use this procedure to create a relational database, if needed, and to populate it with the required tables. If you deploy with Cloudant® as a database, you do not need to perform this procedure.

Procedure

  1. Review the sample configuration files in Sample configuration files, and copy the Ant file that corresponds to your database. The files for creating a database are named after the following pattern:
    create-database-database.xml
    For more information, see table 1, Sample configuration files provided with IBM MobileFirst™ Platform Foundation, in Sample configuration files.
  2. Follow step 4 of the page Sample configuration files to edit the Ant file and replace the placeholder values for the properties at the beginning of the file.
  3. Run the following commands to create the databases.
    ant -f create-database-database.xml databases
    You can find the Ant command in product_install_dir/shortcuts.

If the databases are created, and you must create only the databaseTABLES.

  1. Edit the Ant script that you use later to create and configure the databases.
  2. Review the sample configuration files in Sample configuration files, and copy the Ant file that corresponds to your database. The files for configuring an existing database are named after this pattern:
    configure-appServer-database.xml
    For more information, see table 1, Sample configuration files provided with IBM MobileFirst Platform Foundation, in Sample configuration files.
  3. See step 4 of the page Sample configuration files to edit the Ant file and replace the placeholder values for the properties at the beginning of the file.
  4. Run the following commands to create the databases.
    ant -f configure-appServer-database.xml databases
    You can find the Ant command in product_install_dir/shortcuts.