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

@@ -90,8 +90,9 @@ function Initialize-LogFile {
function Write-Log {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, Position = 0)]
[string]$Message,
[Parameter(Mandatory = $false, Position = 0)]
[AllowEmptyString()]
[string]$Message = "",
[Parameter(Mandatory = $false)]
[ValidateSet('Info', 'Warning', 'Error', 'Success', 'Debug')]
@@ -101,6 +102,17 @@ function Write-Log {
[switch]$NoConsole
)
# Handle empty messages (blank lines)
if ([string]::IsNullOrEmpty($Message)) {
if ($script:LogFile) {
Add-Content -Path $script:LogFile -Value "" -Encoding UTF8
}
if (-not $NoConsole) {
Write-Host ""
}
return
}
$timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
$logMessage = "[$timestamp] [$Level] $Message"