# Leapwork Trial to Enterprise Migration

**Leapwork** offers users three different types of Licenses i.e. **Trial, Platform & Enterprise**. In this article, we will learn how to smoothly migrate the Leapwork automation tool from a **Trial Version to Enterprise Version**.

## Pre-requisites

1. Download **Leapwork** software [Click here](https://account.leapwork.com/downloads "https://account.leapwork.com/downloads")  
2. Download **Migration Tool** [Click here](/content/migration-tool/index.html)  
3. Make sure the **MSSQL server** and **SSMS** are installed with all prerequisite access.

There can be two scenarios one can face while migrating to an Enterprise version of **Leapwork:**

1. **Scenario1**: Migrating to the same Leapwork version for Enterprise. **E.g**.: (Leapwork Trial Version 2022.2.700 to Leapwork Enterprise Version 2022.2.700)
2. **Scenario 2**: Migrating to an upgraded version of Leapwork Enterprise. **E.g**.: (Leapwork 2021.1.387 to Leapwork 2022.2.700)

In **Scenario 1,** there is no need to upgrade the Trial version and we can directly jump to “ **Backup Process.”**  
In **Scenario 2**, Upgrade the Leapwork version to the version on which we are migrating to the enterprise. **( _Recommended to follow a backup process before upgrading_),** after the upgrade please follow the process from " **Step 1- Backup Process"**

## Step 1 - Backup Process

To prevent data loss and prepare for any unforeseen problems during the migration, we strongly recommend you perform a backup of **Leapwork** before starting the migration process.

### Recommended Steps:

1. Export all the flows and save them.
2. Stop the controller service and take a backup of _**C:\Program Files\Leapwork\Assets**_ folder, which has the SQLite database files. Refer to this article for backup best practices. [Click here.](https://support.leapwork.com/s/article/BestPracticesLeapworkdatabasebackupforTrialPlatformversion63306fd83c636)
3. Save the encryption key for the database, including the **admin password.**

## Step 2 - Uninstall the Trial Version

1. Uninstall the **Trial** version, Go to Control Panel – **Program & Features**  
     
   Select **Leapwork** and **uninstall** it.  
   **_*Note - Ensure you have taken the backup of the Assets before deleting this folder._**

2. Remove the **folder** C:\Program Files\ **Leapwork**  
3. Remove the **Leapwork** Folder from the registry editor.
   _**Path** - **Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Leapwork**_

## Step 3 - MSSQL Server Database user permissions:

1. Open SSMS. Connect to the SQL Server.
2. Go to **Security**- Logins - Username, Right-click and go to the properties.
3. In Server Roles, the user must have **dbcreator** and **public** roles selected.
   
4. In User Mapping, the user should have a public role map with the master, asset & report database.

## Step 4 - Install the Enterprise Version

- Follow the steps in the [Installation Guide: Download and install - Enterprise Version of Leapwork](https://support.leapwork.com/s/article/Installation-Guide-Download-and-install-Enterprise-Version-of-Leapwork).

Open the studio and try to make any flow, save, modify & delete just to confirm you have all the necessary permissions over the database created in the enterprise installation.

## Step 5 - Migration Process

By default in the Migration Tool, the **configuration tab** will not be enabled. To **enable** follow the steps in the reference article - [Click Here](https://support.leapwork.com/s/article/EnableConfigurationTabinLeapworkMigrationTool633081235ebad)

1. Open the Migration Tool.

**Encryption Key** – Encryption key of Trial version database

**Username** – MSSQL username

**Password** – MSSQL password

**Server Address** – Hostname or IP of the machine on which MSSQL is hosted/installed.
   
   **Initial Catalog** – Leave it as default “master”.
   
   **Integrated Security** – Leave it as default SSPI.
   
   **Connection Type**– Choose “Trusted Connection” if are using windows authentication for MSSQL, else choose “Standard Security” if you use SQL User authentication.
   
   **Asset database name** – Choose the database one you have created for Asset during enterprise installation.
   
   **Report database name** - Choose the database one you have created for Report during enterprise installation.
   
   **Database**– Select MSSQL.

Click on **Test Connection**, if it’s successful, click on **SAVE**.

_**Note**– If you are using windows authentication for MSSQL, before performing migration go to services. Right on the **Leapwork_Controller service**, and go to **properties**, and go **Log On** Tab. Put the credential used to log on into the MSSQL Server._

**_Click OK, and restart the service._**

2. Go to the **Migration Tool**, STOP the controller service on the migration tool, and go to Migration TAB.
   
3. Explore the “ **Assets**” folder from the backup, select all the SQLite DB listed as shown in the above image.
4. Click on **Migrate**, a popup will appear for the encryption key. Enter the encryption key for the SQLite database saved in the backup process.
5. Wait for the Migration process to **finish**.
6. Click **Configuration** and **start** the controller service.
7. **Launch** Leapwork.
   
8. Click on the hyperlink and generate the license key for the Enterprise Version. Enter the license key and you are ready to use the enterprise version.

**For any clarification, please contact our [Priority Support](mailto:prioritysupport@leapwork.com).**
