SDA: How to migrate from Derby to Oracle or Microsoft SQL Server


Some pilots will have installed the default Derby database. As part of going into production implementers may  want to migrate what has been implemented into the production database.



Note: Derby is to be used for prototyping/testing/evaluation purposes only.


To Java tool can be used to achieve this.

The attached document describes the steps required to achieve and is to be used with the Tool found in the file:


Note: The Migration tool is not officially supported by Serena and Serena would encourage you to make a secure backup of the Derby Database before proceeding.

The following steps are described within the PDF Document:

Step 1: Install the DB Migrator tool
Step 2: Install the Database JAR file in the Migration tool
Step 3: Stop SDA Server
Step 4: Backup the current SDA profile
Step 5: Create an empty schema
Step 6: Start the SDA server
Step 7: Run the Migration script
Step 8: Review the final output
Step 9: Restart the SDA server
Step 10: Test the new database


For more information download the PDF Document and the accompanying Java tool


How To-Best Practice
Comment List
  • Buildfile: install.with.groovy.xml migrate-database: [unzip] Expanding: C:\temp\SDA-DB-Migrator\ into C:\Users\dmsys\AppD ata\Local\Temp\install-2799174884668140814.tmp [echo] current dir C:\temp\SDA-DB-Migrator [echo] Found sub-installer UDeployInstaller.groovy [echo] Enter the directory where the Serena RA Server is installed. [Defaul t: C:\Users\dmsys\.serena\ra] [echo] Migrating Serena RA Server at: C:\Users\dmsys\.serena\ra [echo] Enter the directory of the expanded war. [Default: c:\Program Files\ Serena\Common\tomcat\8.0\webapps\serena_ra] [echo] Enter the database type Serena RA should migrate to. [derby, mysql, oracle, sqlserver, postgres] sqlserver [echo] Enter the database driver. [Default: LServerDriver] [echo] Enter the absolute path to sqlserver driver jar file C:\temp\SDA-DB-Migrator\lib\ext\sqljdbc41.jar [echo] Enter the database connection string. Eg. jdbc:sqlserver://localhost :1433;DatabaseName=Serena_RA jdbc:sqlserver://dm14db:1433;DatabaseName=serena_ra [echo] Enter the destination database username. [Default: Serena_RA] serena_ra [echo] Enter the destination database password. [Default: password] serena_ra [echo] [echo] Exporting the current Serena RA database... [dbunit] Executing export: [dbunit] in format: xml to datafile: C:\temp\SDA-DB-Migrator\database\e xport.xml [echo] Database Migration Failed. (press return to exit installer) [delete] Deleting directory C:\Users\dmsys\AppData\Local\Temp\install-2799174 884668140814.tmp BUILD FAILED : java.lang.OutOfMemoryError: Java heap space Total time: 778 minutes 33 seconds C:\temp\SDA-DB-Migrator>
  • Hi Paul , I find derby migrating to Sql and has jumped me the following error " BUILD FAILED: java.lang.OutOfMemoryError : Java heap space" perform the same migration in a virtual machine but does not reach this error because the size bd sda folder did not weigh much , the date and weighs 5 gb therefore need more memory , you have any idea where I could solve this problem ?
  • There is somewhere a detail you can log me where is the downside?
  • Hello Paul, I deleted the file ExportXML and released again to deliver the following steps [echo] [echo] Exporting the current Serena RA database... [dbunit] Executing export: [dbunit] in format: xml to datafile: C:\Temp\SDA-DB-Migrator\database\e xport.xml Successfully wrote file 'C:\Temp\SDA-DB-Migrator\database\export.xml' [echo] [echo] Serena RA database exported [echo] Creating Database ... [echo] Creating Serena RA Database Schema ... [echo] Database Migration Failed. (press return to exit installer)
  • Hello Alfredo can you please confirm all the inputs you gave to the script, by copying and pasting all the options supplied when running the script. Can you also confirm the database you are importing into and the version. Also the OS that the script is being run on. Thanks Paul
  • Paul hello, good afternoon I find myself looking at the SDA database derby to Sqlserver following the instructions you have given me this jumping a mistake which I detail below you, please if you could help me identify that I could be missing [echo] [echo] Exporting the current Serena RA database... [echo] [echo] Skipping database export. Export file already exists: C:\Temp\SDA-DB -Migrator\database\export.xml [echo] Creating Database ... [echo] Creating Serena RA Database Schema ... [echo] Database Migration Failed. (press return to exit installer) Thanks, Alfredo
  • Hello Alfredo Please delete the file C:\Temp\SDA-DB -Migrator\database\export.xml and then retry.
Related Discussions