web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Migrating to Multitenancy

(0) ShareShare
ReportReport
Posted on by 22

Hi,

I am trying to prepare a multitenant environment for testing purpose. So far able to achieve this with multiple company in one tenant database. I want to create separate tenant database for each company. I checked the MSDN article around this but not able to achieve the result.

The below script will create 5 company in "Demo Database NAV (8-0)" database, separate the application & business data and finaly mound both database to the default tenant.

Run “Microsoft Dynamics NAV 2015 Administration Shell” as Administrator

Set-ExecutionPolicy unrestricted –Force

Step 1: Create new company and copy all data from an existing company

Copy-NAVCompany -ServerInstance DynamicsNAV80 -SourceCompanyName 'CRONUS International Ltd.' -DestinationCompanyName 'CRONUS A'

Copy-NAVCompany -ServerInstance DynamicsNAV80 -SourceCompanyName 'CRONUS International Ltd.' -DestinationCompanyName 'CRONUS B'

Copy-NAVCompany -ServerInstance DynamicsNAV80 -SourceCompanyName 'CRONUS International Ltd.' -DestinationCompanyName 'CRONUS C'

Copy-NAVCompany -ServerInstance DynamicsNAV80 -SourceCompanyName 'CRONUS International Ltd.' -DestinationCompanyName 'CRONUS D'

Copy-NAVCompany -ServerInstance DynamicsNAV80 -SourceCompanyName 'CRONUS International Ltd.' -DestinationCompanyName 'CRONUS E'

 

Step 2: Extracts the application tables form NAV database to a separate database.

Export-NAVApplication -DatabaseServer 'LPNOA1-46' -DatabaseName 'Demo Database NAV (8-0)' -DestinationDatabaseName 'Demo Database NAV (8-0)-App'

 

Step 3: Remove the application tables form NAV database

Remove-NAVApplication -DatabaseServer 'LPNOA1-46' -DatabaseName 'Demo Database NAV (8-0)' -Force

 

Step 4: Configures settings for a Microsoft Dynamics NAV Server instance

Set-NAVServerInstance –ServerInstance ‘DynamicsNAV80’ -stop

Set-NAVServerConfiguration –ServerInstance ‘DynamicsNAV80’ –element appSettings –KeyName ‘DatabaseName’ –KeyValue ‘’

Set-NAVServerInstance –ServerInstance ‘DynamicsNAV80’ –Start

 

Step 5: Mounts the Microsoft Dynamics NAV application against the specified server instance

Mount-NAVApplication –ServerInstance ‘DynamicsNAV80’ –DatabaseServer 'LPNOA1-46' –DatabaseName 'Demo Database NAV (8-0)-App'

 

Step 6: Mounts a tenant database against the specified Microsoft Dynamics NAV Server instance

Mount-NAVTenant –ServerInstance ‘DynamicsNAV80’ -Id Default –DatabaseServer ‘LPNOA1-46’ -DatabaseName ‘Demo Database NAV (8-0)’ –OverwriteTenantIdInDatabase

As I understood from the MSDN article the script should work like this:

.\HowTo-MoveCompanyToTenant -ServerInstance DynamicsNAV80 -FromDatabase 'Demo Database NAV (8-0)' -CompanyName 'CRONUS A' -OldTenantName default -NewTenantName 'CronusA'

Your assistance will be very much appreciated.

Thanks,

Manish Sinha

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,999 Super User 2025 Season 2 on at

    Please check this video

    www.youtube.com/watch

  • Manish Sinha Profile Picture
    22 on at

    I understand there are multiple way to do this, I want to complete this using the MSDN article (msdn.microsoft.com/.../dn271703%28v=nav.80%29.aspx).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans