Fix ROA Windows setup scripts discovered during VM 302 testing

- 03-import-contafin.ps1: Auto-detect DMP file when not specified
- 05-import-companies.ps1: Default DumpDirectory to C:\DMPDIR
- 08-post-install-config.ps1: Fix SERVER_INFO column names (NAME/VALUE)

Tested full installation on VM 302 (Oracle XE 21c):
- CONTAFIN_ORACLE: 344 objects imported
- CAPIDAVATOUR: 3418 objects imported
- 54 ROAUPDATE directories created
- Scheduler jobs configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Marius
2026-01-29 01:42:39 +02:00
parent 648342c0a8
commit ef1e40675f
3 changed files with 111 additions and 89 deletions

View File

@@ -11,7 +11,7 @@
- Verifies import (object count, invalid objects)
.PARAMETER DumpFile
Path to the CONTAFIN_ORACLE DMP file. Required.
Path to the CONTAFIN_ORACLE DMP file. If not specified, auto-detects from DmpDir.
.PARAMETER OracleHome
Oracle home directory. If not specified, auto-detects.
@@ -45,8 +45,7 @@
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[ValidateScript({ Test-Path $_ })]
[Parameter(Mandatory = $false)]
[string]$DumpFile,
[Parameter(Mandatory = $false)]
@@ -79,6 +78,24 @@ $ErrorActionPreference = 'Stop'
$logPath = Join-Path $PSScriptRoot "..\logs\03-import-contafin_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"
Initialize-LogFile -LogPath $logPath -ScriptName "03-import-contafin.ps1"
# Auto-detect DumpFile if not specified
if (-not $DumpFile) {
Write-Host "[INFO] DumpFile not specified, searching in $DmpDir..." -ForegroundColor Yellow
$candidates = Get-ChildItem -Path $DmpDir -Filter "*contafin*.dmp" -ErrorAction SilentlyContinue |
Sort-Object LastWriteTime -Descending
if ($candidates) {
$DumpFile = $candidates[0].FullName
Write-Host "[INFO] Auto-detected DumpFile: $DumpFile" -ForegroundColor Green
} else {
throw "No CONTAFIN_ORACLE dump file found in $DmpDir. Please specify -DumpFile parameter or copy *contafin*.dmp to $DmpDir"
}
}
# Validate DumpFile exists
if (-not (Test-Path $DumpFile)) {
throw "DumpFile not found: $DumpFile"
}
try {
Write-LogSection "Importing CONTAFIN_ORACLE Schema"