Skip to main content

NAV 2013 R2 - Multi-Tenancy Part 1

Hi all,

As discussed the concept of Mutlitenant in Previous post, let see how we can actually implement it.

Current State -

1. I have a NAV 2013 R2 database in SQL named as "ABC Company Database NAV 2013 R2" which we are going to convert to Mutlitenant.





2. The database have 5 companies as Shown Below.



3. The service instance used to connect is in port No. 8046 with Name as MultiTenent.

STEPS -

For Mutlitenant we Require the Windows Powershell ISE. (It Is Installed with NAV 2013 R2).
Just search it and Run it as Administrator.

1. Preparing the PowerShell -

We need to import NAV Admin Tool, to enable the NAV Commandlets.
-----------------------------------------------------------------------------------
#Prepare PowerShell
Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\71\Service\NavAdminTool.ps1'
-----------------------------------------------------------------------------------

Paste the Above Lines into Powershell and Run It.



2. Next Step is to Split the Application Data and Customer Data.

  Two Steps -
   a) Exporting the NAV Application From Source Database to a New Database.
   b) Remove the NAV Application From the Source Database.


Delete the content of Powershell and Paste Below Commands.
------------------------------------------------------------------------------------
#Split the Application Database and Customer Data
Export-NAVApplication -DatabaseServer "localhost\NAVDEMO" -DatabaseName "ABC Company Database NAV 2013 R2" -DestinationDatabaseName Customer_App_Data
Remove-NAVApplication -DatabaseServer "localhost\NAVDEMO" -DatabaseName "ABC Company Database NAV 2013 R2" -Force
------------------------------------------------------------------------------------
Change the Source and Target Database Name for Application Database. Run the Command and output will be as shown below.



So let's see the impact of The Two Steps Executed Till now. Open SQL Server and Check the Database. You will find a new database for application as shown below.



If you drill down the tables inside database you will see that i does not contain any tables related to customer data.



Commands used in this post can be found in My Sky Drive Folder.

File Name - Command 3 - Move Companies to tenants.ps1

In Next Post we will see how to set service to Support Mutlitenant and How to Mount Application and Customer Data into the Service Tier.

By Saurav Dhyani
saurav-nav.blogspot.in

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

NAV 2013 Upgrade Part III - Data Upgrading.

Hi all, As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes. Let's start the process. Remember -  1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only. 2) The Synchronization of users with SQL Server is no more required.