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>
This commit is contained in:
@@ -25,49 +25,32 @@ Scripts and documentation for setting up ROA Oracle Database on Windows servers:
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Download Oracle 21c XE or SE from Oracle
|
||||
2. Install Oracle (see `docs/00-INSTALL-ORACLE-XE.md` or `docs/00-INSTALL-ORACLE-SE.md`)
|
||||
3. Copy DMP files to `C:\DMPDIR\`
|
||||
4. Copy `config.example.ps1` to `config.ps1` and edit values
|
||||
5. Run scripts in order: `01` -> `07`
|
||||
### Oracle 21c Express Edition (XE) - Gratuit
|
||||
1. Download și instalează Oracle 21c XE (see `docs/00-INSTALL-ORACLE-XE.md`)
|
||||
2. Copiază fișierele DMP în `C:\DMPDIR\`
|
||||
3. Rulează instalarea:
|
||||
```cmd
|
||||
RunAll.cmd
|
||||
```
|
||||
|
||||
### Option A: Use Batch Wrappers (Recommended)
|
||||
### Oracle 21c Standard Edition (SE) - Licență
|
||||
1. Download și instalează Oracle 21c SE (see `docs/00-INSTALL-ORACLE-SE.md`)
|
||||
- În wizard: "Create and configure a single instance database"
|
||||
- Global database name: `ROA`
|
||||
- **Debifează** "Create as Container database"
|
||||
2. Copiază fișierele DMP în `C:\DMPDIR\`
|
||||
3. Rulează instalarea:
|
||||
```cmd
|
||||
RunAll.cmd
|
||||
```
|
||||
|
||||
The batch wrappers handle PowerShell execution policy automatically:
|
||||
### Rulare script individual (dacă e necesar)
|
||||
|
||||
```cmd
|
||||
# Complete installation (all scripts in order)
|
||||
RunAll.cmd
|
||||
|
||||
# Or run individual scripts
|
||||
Run.cmd 01-setup-database.ps1
|
||||
Run.cmd 02-create-sys-objects.ps1
|
||||
Run.cmd 03-import-contafin.ps1
|
||||
Run.cmd 04-create-synonyms-grants.ps1
|
||||
Run.cmd 05-import-companies.ps1
|
||||
Run.cmd 07-verify-installation.ps1
|
||||
```
|
||||
|
||||
### Option B: PowerShell Direct (requires Bypass)
|
||||
|
||||
If running PowerShell directly, use `-ExecutionPolicy Bypass`:
|
||||
|
||||
```powershell
|
||||
# From PowerShell
|
||||
powershell -ExecutionPolicy Bypass -File .\scripts\01-setup-database.ps1
|
||||
powershell -ExecutionPolicy Bypass -File .\scripts\07-verify-installation.ps1 -Detailed
|
||||
```
|
||||
|
||||
### Option C: Set Execution Policy (Admin required)
|
||||
|
||||
```powershell
|
||||
# Run as Administrator (one-time setup)
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
|
||||
|
||||
# Then run scripts normally
|
||||
.\scripts\01-setup-database.ps1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
@@ -103,6 +86,7 @@ roa-windows-setup/
|
||||
│ ├── 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
|
||||
│ ├── 08-post-install-config.ps1# ROAUPDATE folders, SERVER_INFO, jobs
|
||||
│ └── 99-uninstall-roa.ps1 # Uninstall/cleanup script
|
||||
│
|
||||
├── config/ # Configuration templates
|
||||
@@ -120,6 +104,10 @@ roa-windows-setup/
|
||||
│ ├── sys-objects.sql # SYS custom objects (AUTH_PACK, etc.)
|
||||
│ ├── synonyms-public.sql # Public synonyms for CONTAFIN_ORACLE
|
||||
│ ├── grants-public.sql # Public grants
|
||||
│ ├── directories-roaupdate.sql # 54 DIRECTORY objects for PACK_UPDATE
|
||||
│ ├── server-info-init.sql # SERVER_INFO configuration
|
||||
│ ├── scheduler-jobs.sql # UPDATEROA_ZILNIC, UPDATERTVAI_ZILNIC
|
||||
│ ├── auth-detalii-init.sql # Customer ID for licensing
|
||||
│ ├── verify-objects.sql # Verification queries
|
||||
│ └── uninstall-roa.sql # Cleanup script (removes all ROA objects)
|
||||
│
|
||||
@@ -140,13 +128,14 @@ 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 |
|
||||
| `08-post-install-config.ps1` | ROAUPDATE directories, SERVER_INFO, scheduler jobs, licensing | Yes |
|
||||
| `99-uninstall-roa.ps1` | Remove all ROA objects (cleanup for re-testing) | Optional |
|
||||
|
||||
---
|
||||
|
||||
## Architecture Differences
|
||||
|
||||
### Oracle 21c Standard Edition (non-CDB)
|
||||
### Oracle 21c Standard Edition (non-CDB) - RECOMANDAT pentru producție
|
||||
|
||||
Traditional single-database architecture (legacy compatibility).
|
||||
|
||||
@@ -159,12 +148,19 @@ Traditional single-database architecture (legacy compatibility).
|
||||
| Connection | `system/pass@ROA` |
|
||||
| Datafiles | `C:\app\oracle\oradata\ROA\` |
|
||||
|
||||
**Advantages:**
|
||||
- Simpler administration
|
||||
- Compatible with Oracle 10g migration scripts
|
||||
- No PDB management overhead
|
||||
**La instalare:**
|
||||
- Selectezi "Create and configure a single instance database"
|
||||
- **Debifezi** "Create as Container database"
|
||||
- Global database name: `ROA`
|
||||
- Wizard-ul creează baza de date automat (~30-45 min)
|
||||
|
||||
### Oracle 21c Express Edition (CDB/PDB)
|
||||
**Avantaje:**
|
||||
- Fără limitări de resurse (RAM, CPU, spațiu)
|
||||
- Administrare simplă
|
||||
- Compatibil cu scripturi de migrare Oracle 10g
|
||||
- Fără overhead PDB
|
||||
|
||||
### Oracle 21c Express Edition (CDB/PDB) - Gratuit, pentru testare
|
||||
|
||||
Modern multitenant architecture with Container Database.
|
||||
|
||||
@@ -177,13 +173,23 @@ Modern multitenant architecture with Container Database.
|
||||
| Connection | `system/pass@XEPDB1` |
|
||||
| Datafiles | `C:\app\oracle\oradata\XE\XEPDB1\` |
|
||||
|
||||
**Advantages:**
|
||||
- Free license (Express Edition)
|
||||
- Modern architecture
|
||||
- Easy backup/clone of PDB
|
||||
**La instalare:**
|
||||
- Rulezi installer-ul XE
|
||||
- Baza de date se creează automat (CDB: XE + PDB: XEPDB1)
|
||||
- Nu ai opțiunea non-CDB (XE suportă doar CDB)
|
||||
|
||||
**Avantaje:**
|
||||
- Licență gratuită
|
||||
- Instalare rapidă
|
||||
- Ideal pentru dezvoltare/testare
|
||||
|
||||
**Limitări XE:**
|
||||
- Max 2 CPU threads
|
||||
- Max 2 GB RAM
|
||||
- Max 12 GB date utilizator
|
||||
|
||||
**Connection Warning:**
|
||||
> Always connect to **XEPDB1** (PDB), not to **XE** (CDB root) for ROA operations!
|
||||
> Conectează-te întotdeauna la **XEPDB1** (PDB), NU la **XE** (CDB root) pentru operații ROA!
|
||||
|
||||
---
|
||||
|
||||
@@ -249,9 +255,42 @@ Copy-Item \\server\dmp\*.dmp C:\DMPDIR\
|
||||
.\03-import-contafin.ps1
|
||||
.\04-create-synonyms-grants.ps1
|
||||
.\05-import-companies.ps1
|
||||
.\08-post-install-config.ps1
|
||||
.\07-verify-installation.ps1
|
||||
```
|
||||
|
||||
### Post-Installation Configuration (08-post-install-config.ps1)
|
||||
|
||||
This script completes the ROA setup by configuring:
|
||||
|
||||
1. **ROAUPDATE Directories**: Creates 54 physical folders and Oracle DIRECTORY objects
|
||||
2. **SERVER_INFO**: Encoded passwords, paths, email settings for PACK_UPDATE
|
||||
3. **Customer ID**: Sets AUTH_DETALII for license verification
|
||||
4. **Scheduler Jobs**: UPDATEROA_ZILNIC and UPDATERTVAI_ZILNIC (disabled by default)
|
||||
|
||||
```powershell
|
||||
# Basic usage (defaults: D:\ROAUPDATE, no Customer ID)
|
||||
.\08-post-install-config.ps1
|
||||
|
||||
# With custom ROAUPDATE path and Customer ID
|
||||
.\08-post-install-config.ps1 -RoaUpdatePath "E:\ROAUPDATE" -CustomerId "138"
|
||||
|
||||
# With email configuration
|
||||
.\08-post-install-config.ps1 -EmailTo "admin@company.ro" -EmailSmtp "mail.company.ro"
|
||||
|
||||
# Skip specific parts
|
||||
.\08-post-install-config.ps1 -SkipSchedulerJobs -SkipServerInfo
|
||||
```
|
||||
|
||||
**Enable automatic updates after verification:**
|
||||
```sql
|
||||
-- Enable daily update job
|
||||
EXEC DBMS_SCHEDULER.ENABLE('CONTAFIN_ORACLE.UPDATEROA_ZILNIC');
|
||||
|
||||
-- Run update manually for testing
|
||||
EXEC DBMS_SCHEDULER.RUN_JOB('CONTAFIN_ORACLE.UPDATEROA_ZILNIC');
|
||||
```
|
||||
|
||||
### Add New Company
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user