Fix ROA Windows setup scripts for Oracle XE deployment

Key fixes:
- Add Run.cmd/RunAll.cmd wrappers with ExecutionPolicy Bypass
- Add Get-ListenerHost() to auto-detect listener IP address
- Fix impdp connection using EZConnect format (host:port/service)
- Add parallel=1 for Oracle XE compatibility
- Fix Write-Log to accept empty strings with [AllowEmptyString()]
- Fix Get-SchemaObjectCount regex for Windows line endings (\r\n)
- Fix path comparison for DMP file copy operation
- Add GRANT EXECUTE ON SYS.AUTH_PACK TO PUBLIC for PACK_DREPTURI
- Fix VAUTH_SERII view to use SYN_NOM_PROGRAME (has DENUMIRE column)
- Add sections 10-11 to grants-public.sql for SYS object grants

Tested on VM 302 (10.0.20.130) with Oracle XE 21c.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Marius
2026-01-28 20:56:58 +02:00
parent 75a5daab6f
commit bcb558f1dc
9 changed files with 503 additions and 68 deletions

View File

@@ -308,7 +308,9 @@ EXIT;
$impdpPath = Join-Path $oraHome "bin\impdp.exe"
$importLogFile = "$($item.Schema)_import_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"
$connString = "SYSTEM/`"$SystemPassword`"@$ServiceName"
# Use EZConnect format for impdp (handles listener bound to specific IP)
$dbHost = Get-ListenerHost -OracleHome $oraHome
$connString = "SYSTEM/`"$SystemPassword`"@${dbHost}:1521/$ServiceName"
# Check if dump has different schema name (remapping needed)
$remapParam = ""
@@ -324,7 +326,8 @@ EXIT;
"dumpfile=$dumpFileName",
"logfile=$importLogFile",
"schemas=$($item.Schema)",
"table_exists_action=REPLACE"
"table_exists_action=REPLACE",
"parallel=1" # Required for Oracle XE
)
if ($remapParam) {