Application note 1008: OpenLM database migration: Firebird to MS SQL

Scope

This document is intended for system administrators who wish to perform an OpenLM database migration from Firebird to MS SQL. It elaborates the process and tools required for such a migration. This document is closely related to the
Guide to OpenLM Data Migration Tool”,
Upgrade guide of OpenLM Version 1.6 to Version 1.7”,
OpenLM Database Configuration Form”  and
Backing Up Your OpenLM DB
documents, which are recommended for further reading.

Backup the current OpenLM database

It is good practice to begin with backing up the OpenLM database prior to migrating its content. In order to do so:
1. Navigate to the windows services (you can do that by searching for services.msc in the start menu’s search line).
2. Select the “OpenLM Server” service, and Click the Stop icon.

3. Backup the OpenLM database (typically located on:
C:\Program Files\OpenLM\OpenLM Server\db). Please refer to the “Backing Up Your OpenLM DB” document for a more detailed explanation.

Creating a new SQL Server Database: Building the tables

The first stage in migrating the OpenLM database is to create new empty database with OpenLM tables in SQL Server. In order to do so, OpenLM supplies dedicated DDL scripts (*.SQL files) to be applied in the SQL Server application.

1. The DDL scripts for the SQL Server is available for for download on the OpenLM site.

After filling in your name and email, you would be directed to the download section. Select the OpenLM Version 1.7 section:

2. Now choose the DDL scripts section:
The Downloaded file contains two files for MS-SQL, and 2 for Oracle servers. In this document we would make use of the MS-SQL files.

3. Open the Microsoft SQL Server Management Studio
(Start → All Programs →  Microsoft SQL Server → SQL Server Management Studio).

4. Create a new DB: Right click the  “Databases” icon. select  “New Database” from the pop-up menu, as shown below.

5. Enter a new name for the database (e.g.: db_name) and click OK.

6. Drag the “OpenLM_SQLServer.SQL” file from the downloaded directory (e.g.: ddl_170) over to the Microsoft SQL Management Studio window. The Contents of “OpenLM_SQLServer.SQL” is displayed. (The file can also be opened by clicking “File → Open → File…” and selecting “OpenLM_SQLServer.SQL” from the unzipped folder).

7. Enter the new database name after the word “use” as shown below (e.g.: db_name) and click “Execute”

8. Wait until you see the message  “Query executed successfully” as shown below:

Data Migration

Now we get to the actual migration of data from Firebird to SQL Server.

1. Make sure that the original (Firebird) database is backed up, according to the Backup the current OpenLM database section, above.

2. Open the “OpenLM Data Migration” tool.

3. On the Source frame:

a. Select “Firebird”. The “Database Credentials” window appears.

b. Enter the Firebird database path in the appropriate text box.

c.Select your database(*.FDB) and enter the user name and password. By default, the user name is set to ‘sysdba’ and the password is ‘masterkey’

4. Target frame actions:

There are two alternatives for configuring the target frame. One is set for users who use the “Windows Authentication mode”. The 2nd alternative is for users who use the “SQL Server Authentication mode”.

For “Windows Authentication mode”:

a. Select the “MS SQL Server” radio button. The “Database Credentials” window appears.

b. Check the “Integrated security” box and click the “Test connection“ button. A  “Connection successful” message box appears upon completion of the test.

c. Select the database name (i.e. db_name from the “..building the tables” section above) from the “Databases” drop down menu, and click OK.

 

For “SQL Server Authentication mode”:

a. Select the “MS SQL Server” radio button. The “Database Credentials” window appears

b. Check the “Integrated security” box.

c. Enter the User ID and password as configured in the SQL server.

d. Click the “Test connection” button. A  “Connection successful” message box appears upon completion of the test.

e. Select the database name (i.e. db_name from the “..building the tables” section above) from the “Databases” drop down menu, and click OK.

5. After configuring the Source and Target databases, the migration process may begin. Click the “Transfer” button. At the end of the migration process, a notifier window appears.

Please refer to the “Guide to OpenLM Data Migration Tool” document for further information.

Configuring Openlm to work with the SQL Server

Now the OpenLM server must be made to reference the new SQL Server.
1. Open the “OpenLM Database Configuration” tool:
(Start → All Programs → OpenLM → Server → OpenLM Database configuration)

.

2. Click the DB provider drop-down menu. Choose one of the options: “SQL Server Authentication” or “Windows Authentication mode”. The “OpenLM Database Configuration” window changes accordingly:

3. Fill in the information in the blank text boxes.
4. Click “Check” to check the OpenLM server’s connection to SQL Server.
5. Click “Apply” to finish the configuration.

Please refer to “OpenLM Database Configuration Form” for further information.

Revision table

Revision Date Author Notes
Rev 0.1 – Preliminary Oct 11, 2011 Orik / Mira Preliminary
Rev 1.0 Oct 11, 2011 Orik / Mira Revised
Rev 1.1 July 03, 2012 Orik Slight changes

Backing Up Your Openlm DB

Backing Up Your OpenLM DB

Introduction

OpenLM Server uses Firebird Embedded Server by default. By purchasing the External DB support extension, the user is licensed to use external DB such as Oracle, MS SQL Server or Firebird Server.

This document describes a backup procedure to OpenLM Server. The suggested backup procedure must be tuned in order to accommodate different computing environments.

Cold Versus Hot Backup

This article only describes a procedure for cold backup. This method requires the system to be halted in order to assure a consistent backup file.

Hot backup is recommended for critical systems and requires the support of a professional DBA. This configuration will not be discussed in this article.

Embedded DB

OpenLM uses an embedded DB by default. The database file is located by default in C:\Program Files\OpenLM\OpenLM Server\db\. The DB file name is OPENLM_DB.GDB or OPENLM_DB.FDB in new versions.

External DB

OpenLM Server supports external databases such as Oracle, MS SQL Server or Firebird Server. When using external DB, the backup is done using the DB tools, usually by a DBA.

Backup procedure

  • Stop OpenLM Service; the picture below shows a manual stop of the service.

  • Backup the DB file (embedded) or the External DB.
  • Start the service.

A script that implements the backup including stopping the service is recommended.

 

Guide to OpenLM Data Migration Tool

General

Purpose: The purpose of OpenLM Data Migration Tool is to allow OpenLM customers to transfer OpenLM information between different databases. The tool supports four types of databases and allows the migration of OpenLM information between them.

Supported databases: Oracle, MS SQL Server, Firebird Server, Firebird embedded (OpenLM default storage).

System requirements: Microsoft Windows XP, Vista, Server 2003, Server 2008. Microsoft .NET Framework 3.5.

How to get it? Contact OpenLM sales department sales@openlm.com.

Installation: Install OpenLM Data Migration Tool using the supplied EXE file.

Preparations

Prepare the source database:

  • Consult OpenLM Support regarding the available migration release.
  • Stop your OpenLM Server.
  • Backup source Database.
  • Upgrade Database if there is a need.

Prepare the destination database:

  • It is recommended to create a specific database/schema for OpenLM tables.
  • It is also recommend to create a specific DB user with access rights only to OpenLM’s database/schema. Use this specific user to perform all tasks elaborated in this document.
  • Use OpenLM DDL scripts to create the database structure in the destination database.

Operation

Launch the tool from Start->All Programs->OpenLM Data Migration tool

We will demonstrate the operation by doing an Embedded Firebird (Default OpenLM DB) to MS SQL Server migration.

Select the Firebird database by clicking the radio button. A dialog will open:

Select the database file from the disk (*.GDB), use OpenLM username and password and mark the embedded check box (Contact OpenLM support for full connection string).

Then click OK, the tool will try to connect to the database and will pop a message with the connection status.

Then specify the destination database type. In this example – MS SQL Server:

In this example we used the “Integrated Security” option (for using “Windows Authentication”). If you use “SQL Server Authentication”, uncheck the “Integrated Security” and enter UserID and Password.  After clicking “Test Connection”, the application will populate the Databases combo box. Select the destination database from the list and click OK. OpenLM will pop a message that will indicate if the application managed to connect to the database.

After that, click “Transfer”. The application will transfer all the information from the source database to the destination database.

After the data was migrated, use OpenLM configuration form to set OpenLM Server to use your new database.

Where OpenLM stores its information

Usage information

All FLEXlm usage information is stored in a relational database provided with OpenLM software. The default database provided with OpenLM is Firebird database. The database file is called OPENLM_DB.FDB and it is located in the DB folder under the OpenLM installation folder.
OpenLM also supports external databases like Oracle or MS SQL Server. Configuration can easily be done by using OpenLM configuration form.

Configuration Information

OpenLM configuration is stored in an XML file named OpenLM_Server.exe.config. The file is storing DB settings, licensing settings and more.

Since the files stores access credentials to Active Directory and SMTP server the content of the file is encrypted.