将 Business Central 更新到 v20 时调用错误

发布于 2025-01-20 21:28:57 字数 5983 浏览 5 评论 0原文

试图更新到BC20,我在Invoke-navapplicationdatabaseconconversion命令中遇到错误:

Invoke-navapplicationdatabaseconconversion:在服务器上进行技术升级的数据库“ Demo Database BC(19-0)” 无法运行“ Local -Host \ bcdemo”,因为数据库的应用程序版本'131112'大于或等于 平台版本“ 131112”。

有人知道解决这个问题还是我需要做的事情? 这是我的整个脚本:

    $OldBcServerInstance = "BC190"
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\NavAdminTool.ps1"
Restart-NAVServerInstance -ServerInstance $OldBcServerInstance


$OldBcServerInstance = "BC190"
$NewBcServerInstance = "BC200"
$ApplicationDatabase = "Demo Database BC (19-0)" 
$DatabaseServer = "localhost\BCDEMO"
$SystemAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\system application\source\Microsoft_System Application.app"
$BaseAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\BaseApp\Source\Microsoft_Base Application.app"
$ApplicationAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\Application\Source\Microsoft_Application.app"
$NewBCVersion = "20.0.37253.38230"
$PartnerLicense = "C:\BBS\5317559_BC20\5317559.flf"
$CustomerLicense = "The file path and name of the customer license"
$AddinsFolder = "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\Add-ins\"



Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase
Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseName -KeyValue $ApplicationDatabase
Set-NavServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "EnableTaskScheduler" -KeyValue false
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $SystemAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $BaseAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $ApplicationAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path "C:\projects\LoanVisionLite\Bestborn Business Solutions, LLC_LoanVisionLite_1.0.0.0.app" -SkipVerification
Get-NAVAppInfo -ServerInstance $NewBcServerInstance | Where-Object {$_.Publisher -notlike 'Microsoft'} | Repair-NAVApp
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "System Application" -Version $NewBCVersion
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "Base Application" -Version $NewBCVersion
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "Application" -Version $NewBCVersion

Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.BusinessChart' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'BusinessChart\Microsoft.Dynamics.Nav.Client.BusinessChart.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.FlowIntegration' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'FlowIntegration\Microsoft.Dynamics.Nav.Client.FlowIntegration.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.OAuthIntegration' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'OAuthIntegration\Microsoft.Dynamics.Nav.Client.OAuthIntegration.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.PageReady' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'PageReady\Microsoft.Dynamics.Nav.Client.PageReady.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.PowerBIManagement' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'PowerBIManagement\Microsoft.Dynamics.Nav.Client.PowerBIManagement.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.RoleCenterSelector' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'RoleCenterSelector\Microsoft.Dynamics.Nav.Client.RoleCenterSelector.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.SatisfactionSurvey' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'SatisfactionSurvey\Microsoft.Dynamics.Nav.Client.SatisfactionSurvey.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.SocialListening' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'SocialListening\Microsoft.Dynamics.Nav.Client.SocialListening.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.VideoPlayer' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'VideoPlayer\Microsoft.Dynamics.Nav.Client.VideoPlayer.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.WebPageViewer' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'WebPageViewer\Microsoft.Dynamics.Nav.Client.WebPageViewer.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.WelcomeWizard' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'WelcomeWizard\Microsoft.Dynamics.Nav.Client.WelcomeWizard.zip')

Set-NAVApplication -ServerInstance $NewBcServerInstance -ApplicationVersion $NewBCVersion -Force
Start-NAVDataUpgrade -ServerInstance $NewBcServerInstance -FunctionExecutionMode Serial
Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName SolutionVersionExtension -KeyValue "437dbf0e-84ff-417a-965d-ed2bb9650972" -ApplyTo All
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance

Trying to update to BC20 and I am getting an error at the Invoke-NAVApplicationDatabaseConversion command saying:

Invoke-NAVApplicationDatabaseConversion : A technical upgrade of database 'Demo Database BC (19-0)' on server
'LOCALHOST\BCDEMO' cannot be run, because the database�s application version '131112' is greater than or equal to the
platform version '131112'.

Does anyone know a fix for this or what I need to do?
Here is my whole script:

    $OldBcServerInstance = "BC190"
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\NavAdminTool.ps1"
Restart-NAVServerInstance -ServerInstance $OldBcServerInstance


$OldBcServerInstance = "BC190"
$NewBcServerInstance = "BC200"
$ApplicationDatabase = "Demo Database BC (19-0)" 
$DatabaseServer = "localhost\BCDEMO"
$SystemAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\system application\source\Microsoft_System Application.app"
$BaseAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\BaseApp\Source\Microsoft_Base Application.app"
$ApplicationAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\Application\Source\Microsoft_Application.app"
$NewBCVersion = "20.0.37253.38230"
$PartnerLicense = "C:\BBS\5317559_BC20\5317559.flf"
$CustomerLicense = "The file path and name of the customer license"
$AddinsFolder = "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\Add-ins\"



Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase
Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseName -KeyValue $ApplicationDatabase
Set-NavServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "EnableTaskScheduler" -KeyValue false
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $SystemAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $BaseAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $ApplicationAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path "C:\projects\LoanVisionLite\Bestborn Business Solutions, LLC_LoanVisionLite_1.0.0.0.app" -SkipVerification
Get-NAVAppInfo -ServerInstance $NewBcServerInstance | Where-Object {$_.Publisher -notlike 'Microsoft'} | Repair-NAVApp
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "System Application" -Version $NewBCVersion
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "Base Application" -Version $NewBCVersion
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "Application" -Version $NewBCVersion

Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.BusinessChart' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'BusinessChart\Microsoft.Dynamics.Nav.Client.BusinessChart.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.FlowIntegration' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'FlowIntegration\Microsoft.Dynamics.Nav.Client.FlowIntegration.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.OAuthIntegration' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'OAuthIntegration\Microsoft.Dynamics.Nav.Client.OAuthIntegration.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.PageReady' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'PageReady\Microsoft.Dynamics.Nav.Client.PageReady.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.PowerBIManagement' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'PowerBIManagement\Microsoft.Dynamics.Nav.Client.PowerBIManagement.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.RoleCenterSelector' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'RoleCenterSelector\Microsoft.Dynamics.Nav.Client.RoleCenterSelector.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.SatisfactionSurvey' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'SatisfactionSurvey\Microsoft.Dynamics.Nav.Client.SatisfactionSurvey.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.SocialListening' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'SocialListening\Microsoft.Dynamics.Nav.Client.SocialListening.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.VideoPlayer' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'VideoPlayer\Microsoft.Dynamics.Nav.Client.VideoPlayer.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.WebPageViewer' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'WebPageViewer\Microsoft.Dynamics.Nav.Client.WebPageViewer.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.WelcomeWizard' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'WelcomeWizard\Microsoft.Dynamics.Nav.Client.WelcomeWizard.zip')

Set-NAVApplication -ServerInstance $NewBcServerInstance -ApplicationVersion $NewBCVersion -Force
Start-NAVDataUpgrade -ServerInstance $NewBcServerInstance -FunctionExecutionMode Serial
Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName SolutionVersionExtension -KeyValue "437dbf0e-84ff-417a-965d-ed2bb9650972" -ApplyTo All
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深白境迁sunset 2025-01-27 21:28:57

我相信您收到错误是因为您使用的是版本 19 PowerShell 模块:

Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\NavAdminTool.ps1"

为了从一个版本到另一个版本进行技术升级,您必须使用新版本的 PowerShell 模块。根据您安装新版本的位置,它可能是例如:

Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\NavAdminTool.ps1"

请注意,文件夹 190 已更改为 200

I believe you are getting the error because you are using the version 19 PowerShell Modules:

Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\NavAdminTool.ps1"

In order to do the technical upgrade from one version to another you must use the PowerShell Modules of the new version. Depending on your where you installed the new version it could be e.g.:

Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\NavAdminTool.ps1"

Note that the folder 190 has been changed to 200.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文