How to connect to Apache Derby database that comes with SMP?
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.
- Download Derby 10.8.2.2 release: (We should only download this version to match version with that shipped in SMP)
- Unzip the zip file
- Copy the following files into new folder (for example, C:\Users\Administrator\Desktop\derby)
- 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%\*
- Close and re-open command line for new environment variables to be available
- 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.
- In command line type below command to run ij, the interactive SQL scripting tool
- 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.