Migrating data from a MySQL database to an Oracle database


Use the procedure in this topic to migrate data stored in the MySQL database used by the previous version of BMC Release Process Management to a new Oracle database.  

Note

Migration of database data is supported only for BMC Release Process Management.

Before you begin

Ensure that the following conditions exist:

  • Your environment complies with the System-requirements.
  • You have downloaded SQL Developer version 3.0 from the Oracle website and have installed it on your computer (usually the client computer).
  • MySQL server is configured for access to the client computer and the previous version of BMC Release Process Management is installed and running.
  • You have downloaded MySQL Java Database Connectivity Java Archive (JDBC JAR) for the appropriate MySQL server version.
  • You have successfully installed the newer version of BMC Release Process Management with an Oracle database.
  • The Oracle user account has sufficient privileges to create, update, delete, and manage permissions on tables. Use the system account, if available.
  • The Tomcat service for the previous version of BMC Release Process Management is shut down.
  • The Postgres database service, if installed, is running.

To migrate the database schema to the newer product version

  1. Ensure that Remote Desktop Connection is available to the server that you want to host the newer version of BMC Release Process Management.
  2. Install BMC Release Process Management using the standard installer, as described in Fresh-installation or Silent-installation.
     During the installation, do not specify the same database used by the older version of the product, so that it does not get overwritten. Specify a new, unique name for the new database, such as brpm_2_6 or brpm_4_3.
  3. Migrate data from the old database to the new database:
    • To migrate from a MySQL database to an Oracle database, see .
    • To migrate from a Postgres database to an Oracle database, use the same migration task, but use the Postgres Java Database Connectivity Java Archive (JDBC JAR) while configuring the source connection.
  4. Open a command prompt and switch to the directory where BMC Release Process Management is installed (for example, C:\BRPM\server).
  5. Ensure that the PATH environment variable includes C:\BRPM\lib\jruby\bin and that no other ruby runtimes are specified in this variable.
  6. Enter jruby -S rake db:migrate.
  7. After the database schema migrates successfully from the old product version to the new product version (this might take some time), start the Tomcat service for the new BMC Release Process Management installation.
  8. Log on to the product with the same credentials as used in the previous product version.

 To migrate from MySQL to Oracle

  1. Back up the MySQL server database of the previous version of BMC Release Process Management.
  2. Back up the Oracle database that was installed by the installer of the newer version of BMC Release Process Management.
  3. Start SQL Developer.
  4. Click Tools > Preferences.
  5. Navigate the tree view and click Data Modeler\Third Party JDBC Drivers.
  6. Add the MySQL JAR file location by specifying the full path (including the JAR file name).
  7. Restart SQL Developer.
  8. Create a connection to the MySQL database:
    1. Navigate the Connections tree view, right-click the root node, and select New Connection.
    2. Click the MySQL tab, and specify all the access details of the MySQL server database.
    3. Click Test to ensure that the connection is successful.
    4. Click Save.
  9. Create a connection to the new Oracle database:
    1. Navigate the Connections tree view, right-click the root node, and select New Connection.
    2. Click the Oracle tab, and specify all the access details (including a super user and database SID) for the Oracle server.
    3. Click Test to ensure that the connection is successful.
    4. Click Connect.
    5. Navigate the Connections tree view to the list of database tables for the new Oracle connection, and delete all the existing tables and indexes so that all of the tables are clean.
  10. Click Tools > Migration > Migrate.
  11. On the Repository page in the displayed wizard, create a connection to the MySQL server:
    1. Click the plus icon to create new connection.
    2. Specify all access details for the MySQL server, including a super user and SID.
    3. Click Test to ensure that the connection is successful, and then click Save.
    4. Click Next.
  12. On the Project page, specify all access details, including project name and output directory, and then click Next.
  13. On the Source Database page, set Mode to Online, select the MySQL connection of BMC Release Process Management that you just created as the source database connection (from the older version of the product), and then click Next.
  14. On the Capture page, select the older BMC Release Process Management database so that it appears in the list on the right, and then click Next.
  15. On the Convert page, accept the default settings by clicking Next.
  16. On the Target Database page, set Mode to Online, select the Oracle connection that you created for the newer product version as the target database connection, ensure that the drop target objects check box is cleared, and then click Next.
  17. On the Move Data page, select the MySQL connection of the older version of BMC Release Process Management as the source database connection, and then click Next.
  18. On the Summary page, verify all the details, and click Finish.
  19. Adjust the names of indexes in the database:
    1. In the Connections tree view, navigate to the Oracle connection, and select open SQL worksheet.
    2. Rename all the indexes that have truncated names.
    3. Modify the value in the Default column for each table.

      Note

      Use a script for this step, such as the Script-for-renaming-indexes-in-the-migrated-database.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*