Add optional SQL index rebuild parameters (ONLINE ON/OFF, MAXDOP) to Sync-NAVApp / Start-NAVAppDataUpgrade.
Idea / Problem
On large Business Central/NAV databases (1 TB+), extension deployment and data upgrade can take very long due to SQL index/key rebuilds (e.g., custom keys on G/L Entry). The cmdlets appear to use a fixed rebuild option like:
REBUILD WITH (ONLINE=ON, MAXDOP=1)
In customer environments this leads to extended maintenance windows.
Example / Evidence
Key on G/L Entry:
ONLINE=ON, MAXDOP=1→ 06:42 minONLINE=OFF, MAXDOP=4→ 02:50 min (acceptable during maintenance window where blocking is allowed)
Proposed solution
Add optional parameters to control SQL rebuild behavior, while keeping defaults unchanged:
-SqlOnline On|Off(default: On / current behavior)-SqlMaxDop(default: 1 / current behavior)
Example:
Sync-NAVApp … -SqlMaxDop 4 -SqlOnline Off
Start-NAVAppDataUpgrade … -SqlMaxDop 4 -SqlOnline Off
Benefit
Faster deployments and shorter maintenance windows for large databases, with a configurable trade-off between concurrency (ONLINE=ON) and speed (ONLINE=OFF) and better CPU utilization via MAXDOP.
