Start-NavDataUpgrade during upgrade to v17/18 - how to detec when it is finished?

radek.bb
Member Posts: 49
I am running upgrade to V17 according to this MS guideline Upgrading Customized C/AL Application to Microsoft Base Application Version 17 .
Everything is fine but...
Task 10 point 1 when I run Start-NavDataUpgrade is asynchronous
In next point they say: "To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress switch. When completed, the table migration extension will be installed."
I want this to be scripted - not manual...
I tried using SingleTransaction option - but it is also asynchronous.
Should I build some weird repeat/try/sleep loop - or is there a better way to do this?
Everything is fine but...
Task 10 point 1 when I run Start-NavDataUpgrade is asynchronous

In next point they say: "To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress switch. When completed, the table migration extension will be installed."
I want this to be scripted - not manual...
I tried using SingleTransaction option - but it is also asynchronous.
Should I build some weird repeat/try/sleep loop - or is there a better way to do this?
0
Best Answers
-
Start-NavDataUpgrade -ServerInstance BC140 -FunctionExecutionMode Serial
Get-NAVDataUpgrade -ServerInstance BC140 -Progress -Interval 30
$notifyParams = @{title="PowerShell Alert";content="NavDataUpgrade Ready."}
Invoke-WebRequest -Uri https://hook.notify17.net/api/raw/asdf -Method POST -Body $notifyParams
I scripted it this way so I got warned by notify17 app at the end of the process. You can do this for every step in your script (replace asdf with your notify17 key).0 -
aa... it does NOT work...
if I have something like this:
Line1: Start-NavDataUpgrade -ServerInstance BC140 -FunctionExecutionMode Serial
Line2: Get-NAVDataUpgrade -ServerInstance BC140 -Progress -Interval 30
Line3: whatever
Line 3 is executed right away - without waiting for completion
Below is my script (using standard approach for upgrade scripts) and its result:
My previous version works fine...
0
Answers
-
I do not like this very much but well... it works...
$ServerReady = $false
Do
{
try
{
$ServerReady = $true
Install-NAVApp -ServerInstance BC17 -Name "System Application" -Version 14.0.0.0
}
catch
{
$ServerReady = $false
Start-Sleep -Seconds 60
}
}
Until($ServerReady)
0 -
Yes to see the Progress you need to execute with -Progress command, keep running this it wont stop it will show and the status bar will close, so keep running this command after a while.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Start-NavDataUpgrade -ServerInstance BC140 -FunctionExecutionMode Serial
Get-NAVDataUpgrade -ServerInstance BC140 -Progress -Interval 30
$notifyParams = @{title="PowerShell Alert";content="NavDataUpgrade Ready."}
Invoke-WebRequest -Uri https://hook.notify17.net/api/raw/asdf -Method POST -Body $notifyParams
I scripted it this way so I got warned by notify17 app at the end of the process. You can do this for every step in your script (replace asdf with your notify17 key).0 -
aaa... now I got it... I just need to use -Interval flag - thanks!
I missed this completely
Thanks!1 -
aa... it does NOT work...
if I have something like this:
Line1: Start-NavDataUpgrade -ServerInstance BC140 -FunctionExecutionMode Serial
Line2: Get-NAVDataUpgrade -ServerInstance BC140 -Progress -Interval 30
Line3: whatever
Line 3 is executed right away - without waiting for completion
Below is my script (using standard approach for upgrade scripts) and its result:
My previous version works fine...
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions