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

  • Manish Sinha Profile Picture
    22 on at
    RE: Migrating to Multitenancy

    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).

  • Suggested answer
    Mohana Yadav Profile Picture
    60,232 Super User 2025 Season 1 on at
    RE: Migrating to Multitenancy

    Please check this video

    www.youtube.com/watch

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans