🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
Moving the MDriven Server Admin Database to SQLite

This article explains how to move the MDriven Server admin database to SQLite.

All current clean installs of the MDriven Server use SQLite for the admin database by default.

Overview

To move to SQLite, you set up a clean install of the MDriven Server, which will use SQLite. Then you upload your model and data back into it. The exact steps depend on where your user data is stored:

  • Option A: Your user data is in the built-in VistaDB database.
  • Option B: Your user data is in an external database, such as SQL Server.

Phase 1: Preparation

Step 1: Back up your model

Back up the model currently running on the MDriven Server. You'll need it after the clean install.

You can back up the model in one of these ways:

WARNING: Don't continue until you have a backup of the model version that is running on the server. Without it, you can't restore your application after the clean install.

Step 2: Back up your user data

Before changing the server, secure your existing user data based on your setup:

  • If using VistaDB (Option A): Create an XML backup of the user data on your current MDriven Server. For instructions on how to do this, see MDriven Backup & Restore Guide.
  • If using an external database (Option B): Make a full copy of your external user data database before you change anything.

Phase 2: Clean Install & MDriven Server Setup

Step 1: Do a clean install of the MDriven Server

Install a new MDriven Server. A clean install automatically uses SQLite for the admin database.

To make sure the server runs correctly and connects to Turnkey, follow the recommendations in Deploying MDriven Server & Turnkey Core on IIS.

Step 2: Reset the MDriven Server user password (if needed)

Use the /AppData/PwdReset file to reset the MDriven Server user "a" password. You must be able to log in to complete the next phase.

Phase 3: Restore Data and Model

Option A: Your user data is in VistaDB

  1. Upload your model: Log in to the server or use the MDriven Designer and upload the model you backed up in Phase 1.
  2. Restore your user data: Upload the XML user data backup you made in Phase 1.
  3. Restore settings: If your old MDriven Server had custom settings, apply them to the new MDriven Server.

Option B: Your user data is in an external database

  1. Connect to a dummy database: Connect the new MDriven Server to a dummy (empty, temporary) external database by updating the connection string in the MDriven Server UI. Don't connect your real database yet.
  2. Upload your model: Upload the model you backed up in Phase 1. This makes sure the new SQLite admin database has the current model version, which matches your real external database.
  3. Connect your real external database: Change the MDriven Server's database connection string from the dummy database to your real user data database.
  4. Upload the model again: Upload the model one more time. This is to confirm that the admin database is completely in sync with your external database.

See also