Configuring DB2 to Support Mobiliser

To support Mobiliser applications with DB2 on your SAP Mobile Platform Server, make DB2-specific changes to the dbmaintain script and execute it.

Prerequisites

Install SAP Mobile Platform Server to work with DB2.

Task
  1. Edit the dbmaintain script.
    1. Make a backup copy of <installer_root>/db_tools/db/db2/smp3/sql/dbmaintain.properties.db2.
    2. Use a text editor to open <installer_root>/db_tools/db/db2/smp3/sql/dbmaintain.properties.db2.
    3. Edit these lines:
      database.url=jdbc:db2://{HOST}:{PORT}/{DBNAME}
      
      database.userName={USER}
      database.schemaNames={USER}
      database.password={PASSWORD}
      
      Make thes replacements, including the braces ("{" and "}"):
      • {HOST} with the host name for your database
      • {PORT} with the port number for your database
      • {DBNAME} with smp3, or the new database name, if you changed it from the "smp3" default.
      • {USER} with gomobile, or the new user name if you changed it from the "gomobile" default (two replacements)
      • {PASSWORD} with secret
    4. Save and close the file.
  2. Run the dbmaintain script against your database.
    1. In a terminal window, go to <installer_root>/db_tools/db/db2/smp3/sql.
    2. Enter:

      java -jar com.sap.mobile.platform.server.db.db2.dbmaintain-<version>-scriptarchive-db2.jar -c dbmaintain.properties.db2

      Where <version> is the actual version text in the file name on your system.

      Note: Use Java 7 to invoke this command: either the Java instance that is installed with SAP Mobile Platform Server, or any other available instance.
    3. Respond to the Are you sure you want to continue? prompt.

      When the dbmaintain script has successfully connected to your database, if the dbMaintainer.fromScratch.enabled parameter is true, the script warns you that any existing objects in the database will be dropped if you continue.

      • If this is a fresh installation on a new system, you may safely answer yes to this prompt, and the script continues.
      • To preserve existing objects in your database:
        1. Answer no to the prompt.
        2. Edit this line in the dbmaintain script, replacing true with false:
          dbMaintainer.fromScratch.enabled=true
        3. Re-run the dbmaintain script. again.
    4. Review the "Dry Run Results" and continue if there are no issues.
      The script takes several minutes to complete, then ends with:
      The database has been updated successfully.