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

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searchi...

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.