Ant configuredatabase task reference
Reference information for the configuredatabase Ant task. This reference information is for relational databases only. It does not apply to Cloudant®.
Overview
- Checks whether the MobileFirst tables exist and creates them if necessary.
- If the tables exist for an older version of IBM MobileFirst™ Platform Foundation, migrates them to the current version.
- If the tables exist for the current version of IBM MobileFirst Platform Foundation, does nothing.
- The DBMS type is Derby.
- An inner element <dba> is present.
- The DBMS type is DB2®, and the specified user has the permissions to create databases.
- Create the database if necessary (except for DB2, Oracle 12c, and Cloudant).
- Create a user, if necessary, and grants that user access rights to the database.
Attributes and elements for configuredatabase
Attribute | Description | Required | Default |
---|---|---|---|
kind | Type of database: In MobileFirst Server: Worklight, WorklightReports, or WorklightAdmin In Application Center: ApplicationCenter |
Yes | None |
IBM MobileFirst Platform Foundation V7.1.0 supports four kinds of database: MobileFirst runtimes use Worklight and WorklightReports databases. MobileFirst Administration Services use the WorklightAdmin database. Application Center uses the ApplicationCenter database.
Element | Description | Count |
---|---|---|
derby | Parameters for Derby | 0..1 |
db2 | Parameters for DB2 | 0..1 |
mysql | Parameters for MySQL | 0..1 |
oracle | Parameters for Oracle | 0..1 |
driverclasspath | JDBC driver class path | 0..1 |
admindatabase | Parameters for migrating data from IBM Worklight V6.1.x runtime to IBM MobileFirst Platform Foundation V7.1.0 Administration Services database | 0..1 |
Attribute | Description | Required | Default |
---|---|---|---|
name | Name of the property | Yes | None |
value | Value for the property | Yes | None |
Attributes and elements for admindatabase
Use the <admindatabase> element for migrating data from a MobileFirst runtime database to the MobileFirst Administration Services database. This element is mandatory when you migrate your IBM Worklight runtime projects from V6.1.x and the kind attribute of configuredatabase is Worklight.
Attribute | Description | Required | Default |
---|---|---|---|
runtimeContextRoot | Context root of the MobileFirst runtime | Yes | None |
Element | Description | Count |
---|---|---|
derby | Parameters for Derby | 0..1 |
db2 | Parameters for DB2 | 0..1 |
driverclasspath | JDBC driver class path | 0..1 |
mysql | Parameters for MySQL | 0..1 |
oracle | Parameters for Oracle | 0..1 |
Apache Derby
Attribute | Description | Required | Default |
---|---|---|---|
database | Database name | No | WRKLGHT, WLREPORT, WLADMIN, or APPCNTR, depending on kind. |
datadir | Directory that contains the databases | Yes | None |
schema | Schema name | No | WORKLIGHT, WORKLIGHT, WLADMINISTRATOR, or APPCENTER, depending on kind |
Element | Description | Count |
---|---|---|
property | JDBC connection property | 0.. |
For the available properties, see Setting attributes for the database connection URL.
DB2
Attribute | Description | Required | Default |
---|---|---|---|
database | Database name | No | WRKLGHT, WLREPORT, WLADMIN, or APPCNTR, depending on kind |
server | Host name of the database server | Yes | None |
port | Port on the database server | No | 50000 |
user | User name for accessing databases | Yes | None |
password | Password for accessing databases | No | Queried interactively |
instance | Name of the DB2 instance | No | Depends on the server |
schema | Schema name | No | Depends on the user |
For more information about DB2 user accounts, see DB2 security model overview.
Element | Description | Count |
---|---|---|
property | JDBC connection property | 0.. |
dba | Database administrator credentials | 0..1 |
For the available properties, see Properties for the IBM Data Server Driver for JDBC and SQLJ.
Attribute | Description | Required | Default |
---|---|---|---|
user | User name for accessing database | Yes | None |
password | Password or accessing database | No | Queried interactively |
The user that is specified in a <dba> element must have the SYSADM or SYSCTRL DB2 privilege. For more information, see Authorities overview.
- Download DB2 JDBC drivers from the DB2 JDBC Driver Versions page
- Or fetch the db2jcc4.jar file and its associated db2jcc_license_*.jar files from the DB2_INSTALL_DIR/java directory on the DB2 server.
You cannot specify details of table allocations, such as the table space, by using the Ant task. To control the table space, you must use the manual instructions in section Configuring the DB2 databases manually.
MySQL
Attribute | Description | Required | Default |
---|---|---|---|
database | Database name | No | WRKLGHT, WLREPORT, WLADMIN, or APPCNTR, depending on kind |
server | Host name of the database server | Yes | None |
port | Port on the database server | No | 3306 |
user | User name for accessing databases | Yes | None |
password | Password for accessing databases | No | Queried interactively |
For more information about MySQL user accounts, see MySQL User Account Management.
Element | Description | Count |
---|---|---|
property | JDBC connection property | 0.. |
dba | Database administrator credentials | 0..1 |
client | The host that is allowed to access the database | 0.. |
For the available properties, see Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J.
Attribute | Description | Required | Default |
---|---|---|---|
user | User name for accessing databases | Yes | None |
password | Password for accessing databases | No | Queried interactively |
The user that is specified in a <dba> element must be a MySQL superuser account. For more information, see Securing the Initial MySQL Accounts.
Attribute | Description | Required | Default |
---|---|---|---|
hostname | Symbolic host name, IP address, or template with % as a placeholder | Yes | None |
For more information about the hostname syntax, see Specifying Account Names.
The <driverclasspath> element must contain a MySQL Connector/J JAR file. You can download that file from the Download Connector/J page.
Attribute | Description | Required | Default |
---|---|---|---|
url | Database connection URL | Yes | None |
user | User name for accessing databases | Yes | None |
password | Password for accessing databases | No | Queried interactively |
Oracle
Attribute | Description | Required | Default |
---|---|---|---|
database | Database name, or Oracle service name Note: You
must always use a service name to connect to a PDB database.
|
No | ORCL |
server | Host name of the database server | Yes | None |
port | Port on the database server | No | 1521 |
user | User name for accessing databases. See the note under this table. | Yes | None |
password | Password for accessing databases | No | Queried interactively |
sysPassword | Password for the user SYS | No | Queried interactively if the database does not yet exist |
systemPassword | Password for the user SYSTEM | No | Queried interactively if the database or the user does not exist yet |
For more information about Oracle user accounts, see Overview of Authentication Methods.
Element | Description | Count |
---|---|---|
property | JDBC connection property | 0.. |
dba | Database administrator credentials | 0..1 |
Attribute | Description | Required | Default |
---|---|---|---|
user | User name for accessing databases | Yes | None |
password | Password for accessing databases | No | Queried interactively |
The <driverclasspath> element must contain an Oracle JDBC driver JAR file. You can download Oracle JDBC drivers from JDBC, SQLJ, Oracle JPublisher and Universal Connection Pool (UCP).
You cannot specify details of table allocation, such as the table space, by using the Ant task. To control the table space, you can create the user account manually and assign it a default table space before running the Ant task. To control other details, you must use the manual instructions in section Configuring the Oracle databases manually.
Attribute | Description | Required | Default |
---|---|---|---|
url | Database connection URL | Yes | None |
user | User name for accessing databases | Yes | None |
password | Password for accessing databases | No | Queried interactively |