Commit Graph

10 Commits

Author SHA1 Message Date
Marius
ef1e40675f 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>
2026-01-29 01:42:39 +02:00
Marius
648342c0a8 Add post-install configuration for ROA Windows setup
New files:
- 08-post-install-config.ps1: Creates ROAUPDATE folders (54 dirs),
  Oracle DIRECTORY objects, SERVER_INFO config, scheduler jobs
- directories-roaupdate.sql: 54 UPD_* directory objects for PACK_UPDATE
- server-info-init.sql: Encoded passwords, paths, email settings
- scheduler-jobs.sql: UPDATEROA_ZILNIC, UPDATERTVAI_ZILNIC (disabled)
- auth-detalii-init.sql: Customer ID for licensing

Updates:
- RunAll.cmd: Added step 6 (08-post-install-config.ps1)
- README.md: Simplified Quick Start, single execution path (RunAll.cmd)
- 00-INSTALL-ORACLE-*.md: Removed redundant manual steps (handled by scripts)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:24:15 +02:00
Marius
aaf5942f6b Fix 04-create-synonyms-grants.ps1 to use SQL files instead of inline SQL
The script had inline SQL that was missing 20 synonyms compared to
synonyms-public.sql, causing PACK_DEF and other packages to fail with
missing synonym errors (SYN_VNOM_UM_ISO, SYN_ATAS_*, SYN_SAL_*, etc.).

Changes:
- Remove all inline SQL (~350 lines)
- Now runs synonyms-public.sql (81 synonyms vs 61 before)
- Now runs grants-public.sql for all grants and ACL
- Add verification of SESIUNE context

This ensures the script stays in sync with the SQL files and
prevents future desync issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:30:12 +02:00
Marius
bcb558f1dc 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>
2026-01-28 20:56:58 +02:00
Marius
75a5daab6f Improve listener restart wait logic with active polling
- Increase wait time from 10s to max 60s after listener restart
- Add active polling every 5s to check if service is registered
- Log progress while waiting for service registration
- Fixes race condition where script proceeds before service is ready

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:33:16 +02:00
Marius
d00d4d94c2 Add SYS grants and master installation scripts for ROA
- run-all-sys.sql: Master script that executes sys-objects.sql,
  sys-grants.sql, and any scripts in sys-updates/ folder in order
- sys-grants.sql: Grants EXECUTE on AUTH_PACK, DBMS_SCHEDULER,
  DBMS_LOCK, UTL_* packages to CONTAFIN_ORACLE; creates public
  synonyms for SYS procedures; creates DMPDIR directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:32:02 +02:00
Marius
498025160e Fix PowerShell $Host reserved variable conflict in ROA setup scripts
- Rename $Host parameter to $DbHost in oracle-functions.ps1 (Invoke-SqlPlus,
  Test-OracleConnection, Get-OracleVersion, Test-PDB, Get-ServiceName)
- Update all function calls in 01-setup-database.ps1 to use -DbHost instead of -Host
- Fix ${Host} -> ${DbHost} in log message (line 147)
- Fix Write-Log "" -> Write-Host "" to avoid empty string parameter error
- Add DbHost/Port parameters and config.ps1 support to setup script
- Update sys-updates/README.md to clarify folder is for future patches only

Tested successfully on ROACENTRAL (10.0.20.130) with Oracle XE 21c.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:30:31 +02:00
Marius
a74d93f3ac Fix uninstall script: kill sessions before dropping users
- Added roa_kill_user_sessions helper procedure
- Kill all active sessions BEFORE attempting DROP USER
- Improved company user detection (also checks for synonyms to CONTAFIN_ORACLE)
- Added more Oracle 21c internal users to exclusion list
- Better error handling and output messages
- Helper procedure auto-cleanup at end

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:45:33 +02:00
Marius
33a3581823 Add ROA uninstall/cleanup script for testing iterations
- sql/uninstall-roa.sql: Removes all ROA objects in correct order
  - Drops company users (dynamically detected by ROA tablespace)
  - Drops CONTAFIN_ORACLE user CASCADE
  - Drops public synonyms pointing to CONTAFIN_ORACLE
  - Drops SYS custom objects (AUTH_PACK, AUTH_SERII, INFO, etc.)
  - Drops application context SESIUNE
  - Drops tablespace ROA including datafiles
- scripts/99-uninstall-roa.ps1: PowerShell wrapper with confirmation
- Updated README with uninstall documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:13:06 +02:00
Marius
989477f7a4 Add ROA Oracle Database Windows setup scripts with old client support
PowerShell scripts for setting up Oracle 21c/XE with ROA application:
- Automated tablespace, user creation and imports
- sqlnet.ora config for Instant Client 11g/ODBC compatibility
- Oracle 21c read-only Home path handling (homes/OraDB21Home1)
- Listener restart + 10G password verifier for legacy auth
- Tested on VM 302 with CONTAFIN_ORACLE schema import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:08:02 +02:00