1. Import NAV Admin tool from NAV
Dir.
Import-Module 'C:\Program Files\Microsoft Dynamics
NAV\80\Service\NavAdminTool.ps1'
2. Stop NAV service
Set-NAVServerInstance DynamicsNAV80 –Stop
3. Export NAV Application object to
seperate database
Export-NAVApplication -DestinationDatabaseName NAV15-APP
-DatabaseName "Demo
Database NAV" -DatabaseServer TEST-DEV
-ServiceAccount "domain\user"
4. Remove NAV Application from
database.
Remove-NAVApplication -DatabaseName "Demo
Database NAV" -DatabaseServer TEST-DEV -Force
5. Update NAV Middle tier for use a
Tenant database structure
Set-NAVServerConfiguration -ServerInstance
DynamicsNAV80 -KeyName DatabaseName -KeyValue ""
6. Restart Dynamics NAV Server
Set-NAVServerInstance DynamicsNAV80 -Start
7. Mount Application Database to
Dynamics NAV Middle tier Service
Mount-NAVApplication -DatabaseServer TEST-DEV
-DatabaseName NAV15-APP -ServerInstance DynamicsNAV80
8. Mount Company database to Tenant
which is contain two companies (CRONUS Canada, Inc. and CRONUS USA, Inc.) in My
Demo database
Mount-NAVTenant -Id Default -DatabaseServer TEST-DEV
-ServerInstance DynamicsNAV80 -DatabaseName "Demo Database NAV"
-OverwriteTenantIdInDatabase
9. Save the NAV tenant configuration
in Middle tier service
Save-NAVTenantConfiguration -ServerInstance
DynamicsNAV80
10. Move Companies to Tenant database
Import powershell script from installation folder/media,
Eg: C:\Temp\Dynamics.80.NA.1538476.DVD\WindowsPowerShellScripts\Multitenancy
Import-Module
"C:\temp\Dynamics.80.NA.1538476.DVD\WindowsPowerShellScripts\Multitenancy\NAVMultitenancySamples.psm1"
HowTo-MoveCompanyToTenant -ServerInstance
DynamicsNAV80 -FromDatabase "Demo Database NAV" -CompanyName
"CRONUS Canada, Inc." -OldTenantName Default -NewTenantName CRONUSCAN
-ToDatabase CRONUSCAN -DatabaseServer MSSIAP-DEV -ServiceAccount
"Domain\user" -RemoveCompanyWhenMoved
11. Create new database and create
new company in Multi-Tenant envoirment
To create New database, open SQL Management Studio and create a new
database
name: NAV2015-TEST-T1DB and then,
Mount-NAVTenant -Id TESTT1 -DatabaseServer TEST-DEV
-ServerInstance DynamicsNAV80
-DatabaseName
NAV2015-TEST-T1DB
12. Sync New Tenant
Sync-NAVTenant -Tenant TESTT1 -ServerInstance
DynamicsNAV80
13. Create New Company in New
Database
New-NAVCompany -CompanyName NAV2015-T1 -ServerInstance
DynamicsNAV80 -Tenant TESTT1
15. Get List Tenants under the NAV
Server Instance
Get-NAVTenant Dynamicsnav80 |Format-Table
No comments:
Post a Comment