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
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
Post a Comment