Using Ant tasks to upgrade the reports database
You can choose to use Ant tasks to upgrade your reports database to IBM MobileFirst™ Platform Foundation V7.1.0. This is the preferred way.
Procedure
- See the procedure at Identify the MobileFirst WAR file and prepare the Ant deployment script to identify and specify the correct properties of the Ant sample that you use for your application server and your database, for example configure-liberty-db2.xml if you have WebSphere® Application Server Liberty profile and a DB2® database.
- After you identify and specify the properties, add the
following properties about the reports database to your Ant sample,
according to your database type.
- For DB2:
<property name="database.db2.worklightreports.password" value="************"/> <property name="database.db2.worklightreports.dbname" value="****UPDATE**** - Database name for MobileFirst runtime Reports (example: WRKLGHT)"/> <property name="database.db2.worklightreports.schema" value="****UPDATE**** - Database Schema for MobileFirst runtime Reports (example: WLREPORT)"/> <property name="database.db2.worklightreports.username" value="****UPDATE**** - DB2 user name (example: wluser)"/>
- For MySQL:
<property name="database.mysql.worklightreports.password" value="************"/> <property name="database.mysql.worklightreports.dbname" value="****UPDATE**** - Database name for MobileFirst runtime Reports (example: WLREPORT)"/> <property name="database.mysql.worklightreports.username" value="****UPDATE**** - MySQL user name (example: wluser)"/>
- For Oracle:
<property name="database.oracle.worklightreports.password" value="************"/> <property name="database.oracle.worklightreports.dbname" value="****UPDATE**** - Database name for MobileFirst runtime Reports (example: WRKLGHT)"/> <property name="database.oracle.worklightreports.username" value="****UPDATE**** - User name for the MobileFirst runtime Reports database (example: WLREPORT)"/>
- For DB2:
- Modify the database target according to your database type.
Find the <target name="databases"> target in your
Ant sample, and add the following element to that target:
- For DB2:
<configuredatabase kind="WorklightReports"> <db2 database="${database.db2.worklightreports.dbname}" server="${database.db2.host}" instance="${database.db2.instance}" user="${database.db2.worklightreports.username}" port="${database.db2.port}" schema="${database.db2.worklightreports.schema}" password="${database.db2.worklightreports.password}"> </db2> <driverclasspath> <fileset dir="${database.db2.driver.dir}"> <include name="db2jcc4.jar"/> <include name="db2jcc_license_*.jar"/> </fileset> </driverclasspath> </configuredatabase>
- For MySQL:
<configuredatabase kind="WorklightReports"> <mysql database="${database.mysql.worklightreports.dbname}" server="${database.mysql.host}" port="${database.mysql.port}" user="${database.mysql.worklightreports.username}" password="${database.mysql.worklightreports.password}"> </mysql> <driverclasspath> <pathelement location="${database.mysql.driver}"/> </driverclasspath> </configuredatabase>
- For Oracle:
<configuredatabase kind="WorklightReports"> <oracle database="${database.oracle.worklightreports.dbname}" server="${database.oracle.host}" port="${database.oracle.port}" user="${database.oracle.worklightreports.username}" password="${database.oracle.worklightreports.password}"> </oracle> <driverclasspath> <pathelement location="${database.oracle.driver}"/> </driverclasspath> </configuredatabase>
- For DB2:
- Modify the minimal-update target. Find
the <target name="minimal-update"> target and
the <updateapplicationserver> element, and change
the useWorklightReports property to true:
<target name="minimal-update"> <updateapplicationserver useWorklightReports="true" contextroot="${worklight.contextroot}">
- According to your database type, add the
following element to your <target name="minimal-update"> target:
- For DB2:
<database kind="WorklightReports"> <db2 database="${database.db2.worklightreports.dbname}" server="${database.db2.host}" user="${database.db2.worklightreports.username}" port="${database.db2.port}" schema="${database.db2.worklightreports.schema}" password="${database.db2.worklightreports.password}"> </db2> <driverclasspath> <fileset dir="${database.db2.driver.dir}"> <include name="db2jcc4.jar"/> <include name="db2jcc_license_*.jar"/> </fileset> </driverclasspath> </database>
- For MySQL:
<database kind="WorklightReports"> <mysql database="${database.mysql.worklightreports.dbname}" server="${database.mysql.host}" port="${database.mysql.port}" user="${database.mysql.worklightreports.username}" password="${database.mysql.worklightreports.password}"> </mysql> <driverclasspath> <pathelement location="${database.mysql.driver}"/> </driverclasspath> </database>
- For Oracle:
<database kind="WorklightReports"> <oracle database="${database.oracle.worklightreports.dbname}" server="${database.oracle.host}" port="${database.oracle.port}" user="${database.oracle.worklightreports.username}" password="${database.oracle.worklightreports.password}"/> <driverclasspath> <pathelement location="${database.oracle.driver}"/> </driverclasspath> </database>
- For DB2:
What to do next
After you complete these steps, you can resume the upgrade procedure in Identify the MobileFirst WAR file and prepare the Ant deployment script.
Parent topic: Upgrading the reports database