How to Create a Multitenant Environment in NAV 2018

,

This guide will show you how to create a NAV 2018 multitenant environment. This guide is based on a standard Demo NAV 2018 Cronus database and assumes that you already have a database restored on a SQL server.

 

Create a multitenant database

Go to your NAV service tier and paste the below script into PowerShell ISE running as administrator. Make sure that you replace the version to what you are using in the import module line e.g. 110. On both lines at the bottom, make sure that you put in your SQL server and database name. On the second to last line, choose a name for your object database. In my example below I have chosen to call it “Cronus_OBJ”.

Run the script line by line.

############################## STEP 1 ############################

#Prepare PowerShell

Set-ExecutionPolicy unrestricted -Force

Import-Module ‘C:\Program Files\Microsoft Dynamics NAV\110\Service\NavAdminTool.ps1’

 

#Split the Application Database and Customer Data

 

Export-NAVApplication -DatabaseServer “cronus-sql” -DatabaseName “Demo Database NAV (11-0) Demo” -DestinationDatabaseName Cronus_OBJ

Remove-NAVApplication -DatabaseServer “cronus-sql” -DatabaseName “Demo Database NAV (11-0) Demo” -Force

############################## STEP 1 ############################

 

Your database is now multitenant.

 

Create a multitenant service

Create a normal NAV service with the newly created Object/Application database against it. Tick the database as multitenant and then start the service.

Once the service is running, expand the service to reveal the new tenant option and then click on tenants. On the right hand side, click on mount tenant. Fill in the “ID” field with a name such as “default”. Fill in both the “Database Name” and “Database Server” fields and tick both “Allow Writing to Application Database” and “Overwrite Tenant ID in Database”. Click “OK”.

Right click the new tenant and click on “Synchronize Tenant”.

Your new RTC server address will look like this: NAV2018:8992/DynamicsNAV110Demo/default

This is your normal server address but with the tenant ID on the end.

 

The process is complete.

The following two tabs change content below.