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>
This commit is contained in:
Marius
2026-01-28 17:13:06 +02:00
parent 4f51ee48f6
commit 33a3581823
3 changed files with 469 additions and 2 deletions

View File

@@ -73,7 +73,8 @@ roa-windows-setup/
│ ├── 04-create-synonyms-grants.ps1 # Public synonyms and grants
│ ├── 05-import-companies.ps1 # Batch import company schemas
│ ├── 06-add-company.ps1 # Add new company to existing server
── 07-verify-installation.ps1# Verify installation completeness
── 07-verify-installation.ps1# Verify installation completeness
│ └── 99-uninstall-roa.ps1 # Uninstall/cleanup script
├── config/ # Configuration templates
│ └── sqlnet.ora # Compatibility for Instant Client 10/11
@@ -83,7 +84,15 @@ roa-windows-setup/
│ └── import-company.par # Company schema import template
├── sql/ # SQL scripts
── (to be added)
── create-tablespace.sql # ROA tablespace creation
│ ├── create-user-contafin.sql # CONTAFIN_ORACLE user creation
│ ├── create-user-company.sql # Company user template
│ ├── configure-profile.sql # Profile settings
│ ├── sys-objects.sql # SYS custom objects (AUTH_PACK, etc.)
│ ├── synonyms-public.sql # Public synonyms for CONTAFIN_ORACLE
│ ├── grants-public.sql # Public grants
│ ├── verify-objects.sql # Verification queries
│ └── uninstall-roa.sql # Cleanup script (removes all ROA objects)
└── test/ # Testing scripts
└── clone-vm300.sh # Proxmox VM cloning for testing
@@ -102,6 +111,7 @@ roa-windows-setup/
| `05-import-companies.ps1` | Batch import company schemas from DMP files | Yes |
| `06-add-company.ps1` | Add new company to existing server | Optional |
| `07-verify-installation.ps1` | Verify installation completeness (objects, grants, synonyms) | Yes |
| `99-uninstall-roa.ps1` | Remove all ROA objects (cleanup for re-testing) | Optional |
---
@@ -238,6 +248,36 @@ exp system/password@ORCL file=C:\backup\COMPANY.dmp owner=COMPANY
---
## Uninstall / Cleanup
To remove all ROA objects and start fresh (useful for testing):
```powershell
# Interactive (with confirmation)
.\scripts\99-uninstall-roa.ps1 -SystemPassword "romfastsoft"
# Force (no confirmation)
.\scripts\99-uninstall-roa.ps1 -SystemPassword "romfastsoft" -Force
```
Or run the SQL script directly:
```sql
sqlplus sys/romfastsoft@localhost:1521/XEPDB1 as sysdba @sql/uninstall-roa.sql
```
**This removes:**
- All company user schemas (using ROA tablespace)
- CONTAFIN_ORACLE user and all objects
- Public synonyms pointing to CONTAFIN_ORACLE
- SYS custom objects (AUTH_PACK, AUTH_SERII, INFO, etc.)
- Application context SESIUNE
- Tablespace ROA (including datafile)
> **Warning:** This permanently deletes all ROA data! Use only for testing or before reinstallation.
---
## Troubleshooting
### ORA-28040: No matching authentication protocol