Skip to Content

This article provides step by step instructions to connect to Apache Derby database, using command line interface, that comes with SAP Mobile Platform 3.0. The syntax provided is for Windows platform but the concept is same for Linux environment.

  1. Download Derby 10.8.2.2 release: (We should only download this version to match version with that shipped in SMP)
    http://archive.apache.org/dist/db/derby/db-derby-10.8.2.2/db-derby-10.8.2.2-bin.zip
  2. Unzip the zip file
  3. Copy the following files into new folder (for example, C:\Users\Administrator\Desktop\derby)
    • derbyclient.jar
    • derby.jar
    • derbynet.jar
    • derbyrun.jar
    • derbytools.jar
  4. Set the following environment variables
    SETX JAVA_HOME C:\SAP\MobilePlatform3\sapjvm_8
    SETX PATH %JAVA_HOME%\bin:%PATH%
    SETX DERBY_HOME C:\Users\Administrator\Desktop\derby
    SETX CLASSPATH .;%DERBY_HOME%\*
  5. Close and re-open command line for new environment variables to be available
  6. Stop SMP server to stop the already started derby. In SMP, Derby is not started in server mode. That means that once SMP is started, the CLI would refuse to connect. It can only connect if SMP has been shut down.
  7. In command line type below command to run ij, the interactive SQL scripting tool
    java org.apache.derby.tools.ij
  8. To connect to the SMP derby database use the below command. “C:/SAP/MobilePlatform3/Server/db/derby/smp3” is the full path to SMP 3 Derby database.
    connect 'jdbc:derby:C:/SAP/MobilePlatform3/Server/db/derby/smp3;create=false;user=gomobile;password=secret';
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply