SYS.INFO e log de aplicatie (SYS.pINFO din AUTH_PACK scrie ~7 randuri la fiecare conectare, ~13.500 randuri / ~2 MB pe luna) si nimic din baza nu-l citeste. Creat de installer in tablespace-ul SYSTEM si nepurjat niciodata, a umplut SYSTEM la doi clienti si a oprit actualizarea cu ORA-01653 - eroarea apare pe orice script, pentru ca AUTH_PACK scrie acolo la conectare. SIGMA 03.08.2026 - ff_2026_07_29_02_COMUN_TVA11 picat pe MARCU AUTOMOTIVE 08.08.2026 - 552.581 randuri / 80 MB, SYSTEM cu 5 MB liberi Installer: - sys-objects.sql: SYS.INFO (tabela + segment LOB) se creeaza in tablespace-ul ROA, cu fallback pe SYSTEM daca ROA inca nu exista - scheduler-jobs.sql: job nou SYS.SYSINFO_PURJARE_ZILNIC, zilnic 03:30, retentie 90 zile, stergere in transe de 10.000 randuri; creat ENABLED, pentru ca nu are nimic de configurat iar uitat dezactivat reproduce chiar problema pe care o rezolva. In schema SYS: privilegiile ANY nu se aplica pe obiectele SYS cat timp O7_DICTIONARY_ACCESSIBILITY=FALSE - uninstall-roa.sql: dezinstalarea sterge si jobul - 00-INSTALL-ORACLE-XE.md / -SE.md: pas post-instalare pentru plafonul SYSTEM (maxsize 2000M) si mutarea SYS.INFO la instalarile vechi Documentatie noua (docs/diagnostic-spatiu-clienti.md): jobul DIAGSPATIU_ZILNIC si pragurile lui, formatul emailurilor de alerta si cum se citesc din mbox-urile Thunderbird, procedura de tunel SSH catre serverul unui client, triajul alertelor si starea la 08.08.2026 pe fiecare client. Reparatia la AUTOMOTIVE e deja aplicata in productie (plafon 600 -> 2000 MB, truncate SYS.INFO): SYSTEM a trecut de la 65 MB la 1545 MB de crestere posibila. Scriptul de livrare pentru ceilalti clienti e scris, dar nepublicat: COMUN sys_2026_08_08_02_SYS_INFO_TABLESPACE_PURJARE.sql Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rft5ofNa4Ux5VEh4YnhJRC
410 lines
9.8 KiB
Markdown
410 lines
9.8 KiB
Markdown
# Installing Oracle 21c Standard Edition on Windows
|
|
|
|
## Overview
|
|
|
|
Oracle 21c Standard Edition 2 (SE2) is a licensed product for production use.
|
|
Unlike Express Edition, SE has no resource limitations.
|
|
|
|
| Feature | Express Edition | Standard Edition 2 |
|
|
|---------|-----------------|-------------------|
|
|
| License | Free | Paid (per socket) |
|
|
| CPU | 2 threads max | Unlimited |
|
|
| RAM | 2 GB max | Unlimited |
|
|
| User Data | 12 GB max | Unlimited |
|
|
| Architecture | CDB only | CDB or non-CDB |
|
|
|
|
For large ROA installations (50+ companies), SE2 is recommended.
|
|
|
|
---
|
|
|
|
## Download
|
|
|
|
1. Go to Oracle Database Downloads:
|
|
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
|
|
|
|
2. Download **Oracle Database 21c for Windows x64**
|
|
- File: `WINDOWS.X64_213000_db_home.zip` (~2.9 GB)
|
|
- Requires Oracle account
|
|
|
|
3. You will also need the Oracle Database license key
|
|
|
|
---
|
|
|
|
## System Requirements
|
|
|
|
| Requirement | Minimum | Recommended |
|
|
|-------------|---------|-------------|
|
|
| OS | Windows Server 2016+ | Windows Server 2019/2022 |
|
|
| RAM | 8 GB | 16 GB+ |
|
|
| Disk | 30 GB | 100 GB+ |
|
|
| CPU | 4 cores | 8+ cores |
|
|
|
|
---
|
|
|
|
## Installation
|
|
|
|
### Step 1: Extract ZIP
|
|
|
|
```powershell
|
|
# Create Oracle Home directory first
|
|
mkdir C:\app\oracle\product\21c\dbhome_1
|
|
|
|
# Extract directly to Oracle Home
|
|
Expand-Archive WINDOWS.X64_213000_db_home.zip -DestinationPath C:\app\oracle\product\21c\dbhome_1
|
|
```
|
|
|
|
### Step 2: Run Installer
|
|
|
|
1. Open Command Prompt **as Administrator**
|
|
|
|
2. Navigate to Oracle Home:
|
|
```powershell
|
|
cd C:\app\oracle\product\21c\dbhome_1
|
|
```
|
|
|
|
3. Run setup:
|
|
```powershell
|
|
.\setup.exe
|
|
```
|
|
|
|
### Step 3: Installation Wizard
|
|
|
|
1. **Configuration Option**
|
|
- Select: **Create and configure a single instance database**
|
|
- Click Next
|
|
|
|
2. **System Class**
|
|
- Select: **Server Class**
|
|
- Click Next
|
|
|
|
3. **Database Edition**
|
|
- Select: **Standard Edition 2**
|
|
- Click Next
|
|
|
|
4. **Installation Type**
|
|
- Select: **Typical Install** (simpler)
|
|
- Or **Advanced Install** for custom settings
|
|
- Click Next
|
|
|
|
5. **For Typical Install:**
|
|
- Oracle base: `C:\app\oracle`
|
|
- Database file location: `C:\app\oracle\oradata`
|
|
- Database edition: Standard Edition 2
|
|
- Character set: **WE8MSWIN1252** (for Romanian support)
|
|
- Global database name: **ROA**
|
|
- Password: `romfastsoft`
|
|
- **Uncheck:** Create as Container database (for non-CDB)
|
|
|
|
6. **Summary** - Review and click Install
|
|
|
|
7. **Installation Progress** - Wait (~30-45 minutes)
|
|
|
|
8. **Finish** - Note connection information
|
|
|
|
---
|
|
|
|
## Non-CDB vs CDB Architecture
|
|
|
|
### Non-CDB (Traditional - Recommended for ROA)
|
|
|
|
Single database, simpler administration:
|
|
|
|
```
|
|
+---------------------------+
|
|
| Database: ROA |
|
|
| +---------------------+ |
|
|
| | Schema: CONTAFIN | |
|
|
| +---------------------+ |
|
|
| | Schema: COMPANY1 | |
|
|
| +---------------------+ |
|
|
| | Schema: COMPANY2 | |
|
|
| +---------------------+ |
|
|
+---------------------------+
|
|
```
|
|
|
|
Connection: `system/romfastsoft@ROA`
|
|
|
|
### CDB (Multitenant)
|
|
|
|
Container with pluggable databases:
|
|
|
|
```
|
|
+---------------------------------------------+
|
|
| CDB: ROA |
|
|
| +---------------------------------------+ |
|
|
| | CDB$ROOT | |
|
|
| +---------------------------------------+ |
|
|
| +---------------------------------------+ |
|
|
| | ROAPDB1 - Application Data | |
|
|
| +---------------------------------------+ |
|
|
+---------------------------------------------+
|
|
```
|
|
|
|
Connection: `system/romfastsoft@ROAPDB1`
|
|
|
|
> **Recommendation:** Use **non-CDB** for compatibility with Oracle 10g migration scripts.
|
|
|
|
---
|
|
|
|
## Post-Installation Configuration
|
|
|
|
### Verify Services Running
|
|
|
|
```powershell
|
|
Get-Service Oracle* | Format-Table Name, Status, StartType
|
|
```
|
|
|
|
Expected services:
|
|
| Service | Description |
|
|
|---------|-------------|
|
|
| OracleServiceROA | Database instance |
|
|
| OracleOraDB21Home1TNSListener | TNS Listener |
|
|
| OracleVssWriterROA | VSS Writer for backups |
|
|
|
|
### Test Connection
|
|
|
|
```powershell
|
|
# Set Oracle environment
|
|
$env:ORACLE_HOME = "C:\app\oracle\product\21c\dbhome_1"
|
|
$env:ORACLE_SID = "ROA"
|
|
$env:PATH = "$env:ORACLE_HOME\bin;$env:PATH"
|
|
|
|
# Test connection
|
|
sqlplus system/romfastsoft@localhost:1521/ROA
|
|
```
|
|
|
|
### Plafonul SYSTEM și creșterea SYS.INFO (OBLIGATORIU!)
|
|
|
|
Standard Edition nu are limita de date a lui XE, dar `SYSTEM` are aceeași problemă: `SYS.INFO` —
|
|
logul de login al ROA — crește ~13.500 rânduri (~2 MB) pe lună, scrise de `SYS.pINFO` din
|
|
`AUTH_PACK` la fiecare conectare, și **nu se purjează niciodată**. Când `SYSTEM` se umple, **orice**
|
|
script de actualizare pică cu `ORA-01653: unable to extend table SYS.INFO`, indiferent ce conține
|
|
(SIGMA 03.08.2026, AUTOMOTIVE 08.08.2026).
|
|
|
|
Instalările noi sunt acoperite: `sys-objects.sql` creează `SYS.INFO` în tablespace-ul `ROA`, iar
|
|
`scheduler-jobs.sql` creează jobul `SYS.SYSINFO_PURJARE_ZILNIC` (03:30, retenție 90 zile).
|
|
**Plafonul lui `SYSTEM` rămâne de ridicat manual:**
|
|
|
|
```sql
|
|
-- ca SYSDBA, după crearea bazei; înlocuiește calea cu cea reală din dba_data_files
|
|
ALTER DATABASE DATAFILE '<ORADATA>\SYSTEM01.DBF' AUTOEXTEND ON NEXT 50M MAXSIZE 2000M;
|
|
|
|
SELECT file_name, ROUND(bytes/1048576,2) mb, ROUND(maxbytes/1048576,2) max_mb, autoextensible
|
|
FROM dba_data_files WHERE tablespace_name = 'SYSTEM';
|
|
```
|
|
|
|
La o instalare mai veche, unde `SYS.INFO` a rămas în `SYSTEM`:
|
|
|
|
```sql
|
|
ALTER TABLE SYS.INFO MOVE TABLESPACE ROA LOB (INFO) STORE AS (TABLESPACE ROA);
|
|
```
|
|
|
|
> Diagnosticul zilnic care prinde asta automat, pragurile și triajul alertelor:
|
|
> `E:\proiecte\ROMFASTSQL\docs\diagnostic-spatiu-clienti.md`.
|
|
|
|
## Memory Configuration (Opțional)
|
|
|
|
Pentru Standard Edition cu 16GB RAM:
|
|
|
|
```sql
|
|
-- Connect as SYSDBA
|
|
sqlplus sys/romfastsoft@localhost:1521/ROA as sysdba
|
|
|
|
-- Check current settings
|
|
SHOW PARAMETER memory;
|
|
SHOW PARAMETER sga;
|
|
SHOW PARAMETER pga;
|
|
|
|
-- Configure memory (adjust based on available RAM)
|
|
ALTER SYSTEM SET MEMORY_TARGET = 8G SCOPE = SPFILE;
|
|
ALTER SYSTEM SET MEMORY_MAX_TARGET = 10G SCOPE = SPFILE;
|
|
|
|
-- Restart database for changes
|
|
SHUTDOWN IMMEDIATE;
|
|
STARTUP;
|
|
```
|
|
|
|
Recommended memory allocation:
|
|
| RAM Available | MEMORY_TARGET | MEMORY_MAX_TARGET |
|
|
|---------------|---------------|-------------------|
|
|
| 8 GB | 4 GB | 6 GB |
|
|
| 16 GB | 8 GB | 10 GB |
|
|
| 32 GB | 16 GB | 20 GB |
|
|
|
|
---
|
|
|
|
## Ce NU trebuie făcut manual
|
|
|
|
Următoarele sunt create **automat** de scriptul `01-setup-database.ps1`:
|
|
|
|
| Component | Script |
|
|
|-----------|--------|
|
|
| Tablespace ROA | `01-setup-database.ps1` |
|
|
| DMPDIR directory | `01-setup-database.ps1` |
|
|
| Password profile (UNLIMITED) | `01-setup-database.ps1` |
|
|
| User CONTAFIN_ORACLE | `01-setup-database.ps1` |
|
|
| sqlnet.ora (client vechi) | `01-setup-database.ps1` |
|
|
|
|
**NU rula manual comenzile SQL pentru acestea** - scripturile le fac automat!
|
|
|
|
---
|
|
|
|
## Listener Configuration
|
|
|
|
Check `listener.ora`:
|
|
```powershell
|
|
notepad C:\app\oracle\product\21c\dbhome_1\network\admin\listener.ora
|
|
```
|
|
|
|
Should contain:
|
|
```
|
|
LISTENER =
|
|
(DESCRIPTION_LIST =
|
|
(DESCRIPTION =
|
|
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
|
|
)
|
|
)
|
|
|
|
SID_LIST_LISTENER =
|
|
(SID_LIST =
|
|
(SID_DESC =
|
|
(GLOBAL_DBNAME = ROA)
|
|
(ORACLE_HOME = C:\app\oracle\product\21c\dbhome_1)
|
|
(SID_NAME = ROA)
|
|
)
|
|
)
|
|
```
|
|
|
|
Check `tnsnames.ora`:
|
|
```powershell
|
|
notepad C:\app\oracle\product\21c\dbhome_1\network\admin\tnsnames.ora
|
|
```
|
|
|
|
Should contain:
|
|
```
|
|
ROA =
|
|
(DESCRIPTION =
|
|
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
|
|
(CONNECT_DATA =
|
|
(SERVER = DEDICATED)
|
|
(SERVICE_NAME = ROA)
|
|
)
|
|
)
|
|
```
|
|
|
|
---
|
|
|
|
## Enterprise Manager Database Express
|
|
|
|
Access EM Express:
|
|
```
|
|
https://localhost:5500/em/
|
|
```
|
|
|
|
If not configured, enable it:
|
|
```sql
|
|
sqlplus sys/romfastsoft@localhost:1521/ROA as sysdba
|
|
|
|
EXEC DBMS_XDB_CONFIG.SETHTTPPORT(5500);
|
|
EXEC DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
|
|
```
|
|
|
|
---
|
|
|
|
## Troubleshooting
|
|
|
|
### OracleServiceROA Not Starting
|
|
|
|
1. Check Oracle alert log:
|
|
```powershell
|
|
Get-Content C:\app\oracle\diag\rdbms\roa\ROA\trace\alert_ROA.log -Tail 100
|
|
```
|
|
|
|
2. Common issues:
|
|
- Insufficient memory
|
|
- Disk space
|
|
- Port 1521 already in use
|
|
|
|
### ORA-01034: ORACLE not available
|
|
|
|
Start the database manually:
|
|
```powershell
|
|
sqlplus / as sysdba
|
|
SQL> STARTUP;
|
|
```
|
|
|
|
### ORA-12514: TNS listener does not know of service
|
|
|
|
```powershell
|
|
# Register database with listener
|
|
sqlplus / as sysdba
|
|
SQL> ALTER SYSTEM REGISTER;
|
|
|
|
# Check listener
|
|
lsnrctl status
|
|
lsnrctl services
|
|
```
|
|
|
|
### Database Won't Shut Down
|
|
|
|
```sql
|
|
-- Force shutdown
|
|
SHUTDOWN ABORT;
|
|
|
|
-- Start clean
|
|
STARTUP;
|
|
```
|
|
|
|
---
|
|
|
|
## Backup Configuration (Recommended)
|
|
|
|
### Enable Archivelog Mode
|
|
|
|
```sql
|
|
sqlplus sys/romfastsoft@localhost:1521/ROA as sysdba
|
|
|
|
-- Check current mode
|
|
ARCHIVE LOG LIST;
|
|
|
|
-- If NOARCHIVELOG, enable:
|
|
SHUTDOWN IMMEDIATE;
|
|
STARTUP MOUNT;
|
|
ALTER DATABASE ARCHIVELOG;
|
|
ALTER DATABASE OPEN;
|
|
|
|
-- Verify
|
|
ARCHIVE LOG LIST;
|
|
```
|
|
|
|
### Configure RMAN
|
|
|
|
```powershell
|
|
rman target sys/romfastsoft@ROA
|
|
|
|
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
|
|
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
|
|
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
|
|
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\backup\%F';
|
|
```
|
|
|
|
---
|
|
|
|
## Next Steps
|
|
|
|
After Oracle SE installation:
|
|
|
|
1. Copy `config.example.ps1` to `config.ps1`
|
|
2. Edit `config.ps1`:
|
|
- Set `$ORACLE_HOME = "C:\app\oracle\product\21c\dbhome_1"`
|
|
- Set `$SERVICE_NAME = "ROA"`
|
|
- Set `$DATAFILE_DIR = "C:\app\oracle\oradata\ROA"`
|
|
3. Run `01-setup-database.ps1`
|
|
|
|
See main `README.md` for complete workflow.
|
|
|
|
---
|
|
|
|
**Last Updated:** 2026-01-28
|
|
**Project:** ROMFASTSQL - Oracle SE Installation Guide
|