fix(export): aliasul TNS lipsa facea exportul zilnic sa esueze tacut
La VADECO, backupora.exe rula in fiecare noapte, se termina cu cod 0 si scria "DONE" pentru fiecare schema - dar directorul zilei ramanea gol. Intre 25 si 28.08.2026 nu a existat niciun export. Cauza: schema.txt cere "@XEPDB1", iar 01-setup-database.ps1 scria in tnsnames.ora doar aliasul ROA. expdp cadea instant cu ORA-12154, iar backupora.exe nu-i verifica codul de iesire. Doua scripturi din acelasi kit nu erau de acord asupra numelui bazei, si nimic nu tipa. Indiciul din log, daca reapare: fiecare schema dura exact 16 secunde, indiferent de marime. Timp uniform = expdp moare la conectare, nu exporta. Reparatii, ca sa nu se repete la alt client: - 01-setup-database.ps1 scrie acum doua aliasuri, ROA si numele serviciului, in ambele tnsnames.ora. Curatarea dinaintea rescrierii parcurge fiecare alias gestionat de noi, altfel al doilea s-ar dubla la fiecare rulare. Aliasurile generate de Oracle (XE, LISTENER_XE, ORACLR_CONNECTION_DATA) raman neatinse. - 11-setup-backup-export.ps1 face tnsping inainte de a scrie schema.txt si opreste instalarea daca aliasul nu se rezolva. Mai bine o instalare care se plange decat un backup care nu exista. - lectii-actualizare-roa-alias-tns.md capata sectiunea despre a doua victima a aceleiasi cauze. Lectia generala: unde un script lanseaza un proces extern Oracle, verifica efectul, nu raportul procesului care l-a lansat. Include si blocul NTS din config/sqlnet.ora, ramas necomis: autentificarea OS cere si apartenenta la ORA_OraDB21Home1_DBA, si setarea din sqlnet.ora. Nota: CLAUDE.md apare ca modificat integral - blob-ul din git avea CRLF, iar core.autocrlf=true il normalizeaza la LF. Modificarea reala e o singura linie. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X9Sa54oFKpE2XhD6A7NTch
This commit is contained in:
272
CLAUDE.md
272
CLAUDE.md
@@ -1,136 +1,136 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
ROMFASTSQL is an infrastructure and database management project for ROMFAST, featuring:
|
||||
- Proxmox virtualization cluster (3 nodes: pve1, pvemini, pveelite)
|
||||
- Oracle Database XE 21c with migration support from Oracle 10g
|
||||
- AI chatbot system (Flowise + Claude)
|
||||
- Disaster recovery infrastructure
|
||||
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
proxmox/ # Main infrastructure documentation
|
||||
├── README.md # Master index - START HERE
|
||||
├── cluster/ # Proxmox cluster, UPS, storage management
|
||||
├── lxc102-docker/ # Docker + Portainer + Docker Sandboxes (sbx)
|
||||
├── lxc104-flowise/ # AI Chatbot (Flowise on port 3000)
|
||||
├── lxc108-oracle/ # Oracle XE 21c/18c Database (port 1521/1522)
|
||||
├── lxc110-moltbot/ # MoltBot AI Telegram Bot
|
||||
├── lxc171-claude-agent/ # Claude Code development environment
|
||||
├── vm109-windows-dr/ # Windows Disaster Recovery VM
|
||||
├── vm201-windows/ # Windows 11 (IIS reverse proxy)
|
||||
└── vm302-oracle-test/ # Windows 11 + Oracle 21c test VM (ROA setup validation)
|
||||
|
||||
system_instructions/ # SQL migration guidelines and knowledge base
|
||||
├── system_prompt.md # SQL migration rules - READ BEFORE WRITING SQL
|
||||
└── knowledge_base/ # Example scripts and PACK_MIGRARE.pck
|
||||
|
||||
scripts/ # Utilities
|
||||
├── generare_proces_verbal.py # Generate assembly minutes (DOCX)
|
||||
├── verificare_voturi_AG.py # Verify assembly votes
|
||||
└── ups-monitor/ # UPS monitoring for production Oracle server 10.0.20.36
|
||||
|
||||
input/ # Oracle DMP files for import
|
||||
```
|
||||
|
||||
## Key Documentation Entry Points
|
||||
|
||||
- **Infrastructure overview**: `proxmox/README.md`
|
||||
- **Oprire planificată a clusterului (lucrări electrice) — fără failover HA / fence**: `proxmox/cluster/docs/oprire-planificata-cluster.md`
|
||||
- **SQL migration guidelines**: `system_instructions/system_prompt.md` (always read before generating migration SQL)
|
||||
- **Oracle database setup**: `proxmox/lxc108-oracle/README.md`
|
||||
- **Migration orchestration**: `proxmox/lxc108-oracle/migration/00-MASTER-MIGRATION.sh`
|
||||
- **Chatbot architecture**: `proxmox/lxc104-flowise/docs/prd.md`
|
||||
- **Docker Sandboxes (sbx) — agenți AI izolați**: `proxmox/lxc102-docker/README.md`
|
||||
- **Disaster recovery**: `proxmox/vm109-windows-dr/README.md`
|
||||
- **Instalare/migrare Oracle — care director se folosește**: `proxmox/lxc108-oracle/docs/instalare-si-migrare-oracle.md`
|
||||
- **ROA Windows setup scripts (XE/SE 21c)**: `proxmox/lxc108-oracle/roa-windows-setup/README.md`
|
||||
- **Conectarea clienților vechi (Instant Client 10/11) la 21c — ORA-28040 / ORA-01017 / ORA-12514**: `docs/lectii-conectare-client-oracle.md`
|
||||
- **Actualizarea ROA eșuează tăcut fără aliasul TNS pe server (jobul zice SUCCEEDED, dar nu aplică nimic)**: `docs/lectii-actualizare-roa-alias-tns.md`
|
||||
- **Kit de instalare pentru client (DMP-uri șablon + scripturi, gata de dus la client)**: `proxmox/lxc108-oracle/scripts/build-client-kit.ps1`
|
||||
- **VM 302 test environment for ROA setup**: `proxmox/vm302-oracle-test/README.md`
|
||||
- **Diagnostic spațiu Oracle la clienți (job zilnic + emailuri)**: `docs/diagnostic-spatiu-clienti.md`
|
||||
- **Monitorizare UPS pe serverul Oracle de producție 10.0.20.36 (înlocuiește ViewPower)**: `docs/ups-server36-monitorizare.md`
|
||||
- **Acces SSH la clienți cu chei publice (angajați noi)**: `docs/acces-ssh-chei-angajati.md`
|
||||
- **Acces administrativ la server client prin Tailscale + SSH (fără forward pe router)**: `docs/acces-client-tailscale-ssh.md`
|
||||
- **Cazuri clienți (depanare DB)**: `proxmox/lxc108-oracle/clienti/README.md`
|
||||
- **ROMPETROL ENERGY — recreare PDB Oracle XE 21c după ORA-12954**: `proxmox/lxc108-oracle/clienti/oracle-xe-21c/README.md`
|
||||
|
||||
## Infrastructure Commands
|
||||
|
||||
### Proxmox Cluster
|
||||
```bash
|
||||
ssh root@10.0.20.201 "pvecm status" # Cluster status
|
||||
ssh root@10.0.20.201 "pct list" # List LXC containers
|
||||
ssh root@10.0.20.201 "qm list" # List VMs
|
||||
```
|
||||
|
||||
### Oracle Database (LXC 108)
|
||||
```bash
|
||||
pct exec 108 -- docker exec -it oracle-xe sqlplus / as sysdba
|
||||
pct exec 108 -- docker restart oracle-xe
|
||||
```
|
||||
|
||||
### Flowise Chatbot (LXC 104)
|
||||
```bash
|
||||
pct exec 104 -- systemctl status flowise
|
||||
pct exec 104 -- systemctl restart flowise
|
||||
pct exec 104 -- journalctl -u flowise -f
|
||||
```
|
||||
|
||||
### Validation Scripts
|
||||
```bash
|
||||
# UPS monthly test
|
||||
proxmox/cluster/ups/scripts/ups-monthly-test.sh
|
||||
|
||||
# SSL certificate monitoring
|
||||
proxmox/vm201-windows/scripts/monitor-ssl-certificates.sh
|
||||
|
||||
# Oracle backup monitoring
|
||||
proxmox/vm109-windows-dr/scripts/oracle-backup-monitor-proxmox.sh
|
||||
```
|
||||
|
||||
## Network Layout
|
||||
|
||||
| Service | IP Address | Port | Purpose |
|
||||
|---------|-----------|------|---------|
|
||||
| pvemini (main host) | 10.0.20.201 | 8006 | Proxmox GUI |
|
||||
| Oracle XE 21c | 10.0.20.121 | 1521 | Production database |
|
||||
| Oracle XE 18c | 10.0.20.121 | 1522 | Export compatibility (TSTZ 31) |
|
||||
| Flowise | 10.0.20.161 | 3000 | Chatbot UI |
|
||||
| Gitea | 10.0.20.165 | 3000 | Git server |
|
||||
| Docker + Portainer + sbx | 10.0.20.113 | 9000/9443 | Docker host, sandbox-uri agenți AI |
|
||||
| Claude Agent | 10.0.20.171 | 22 | Development (also via Tailscale: 100.95.55.51) |
|
||||
| MoltBot | 10.0.20.173 | 22 | AI Telegram Bot (also via Tailscale: 100.120.119.70) |
|
||||
| Primary Oracle | 10.0.20.36 | 1521 | Windows production |
|
||||
| DR Oracle | 10.0.20.37 | 1521 | Disaster recovery |
|
||||
|
||||
## SQL Migration Conventions
|
||||
|
||||
When writing Oracle migration scripts, follow the naming convention:
|
||||
```
|
||||
ff_YYYY_MM_DD_##_TYPE.sql
|
||||
```
|
||||
Where TYPE is: DDL, DML, VIEW, PACK, TRIG, etc.
|
||||
|
||||
Always reference `system_instructions/system_prompt.md` for:
|
||||
- Oracle 10g compatibility requirements
|
||||
- PACK_MIGRARE package usage
|
||||
- Migration script patterns and examples
|
||||
|
||||
## Custom Claude Code Commands
|
||||
|
||||
- `/ultimate_validate_command` - Generate comprehensive validation commands
|
||||
- `/plan-handover` - Save implementation plan for session handover
|
||||
- `/branch-plan-handover` - Create branch and save plan
|
||||
- `/context-handover` - Save context for next session
|
||||
|
||||
## Git Workflow
|
||||
|
||||
- Remote: `http://gitea:3000/romfast/ROMFASTSQL.git`
|
||||
- Main branch: `master`
|
||||
- Feature branches merged directly to master
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
ROMFASTSQL is an infrastructure and database management project for ROMFAST, featuring:
|
||||
- Proxmox virtualization cluster (3 nodes: pve1, pvemini, pveelite)
|
||||
- Oracle Database XE 21c with migration support from Oracle 10g
|
||||
- AI chatbot system (Flowise + Claude)
|
||||
- Disaster recovery infrastructure
|
||||
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
proxmox/ # Main infrastructure documentation
|
||||
├── README.md # Master index - START HERE
|
||||
├── cluster/ # Proxmox cluster, UPS, storage management
|
||||
├── lxc102-docker/ # Docker + Portainer + Docker Sandboxes (sbx)
|
||||
├── lxc104-flowise/ # AI Chatbot (Flowise on port 3000)
|
||||
├── lxc108-oracle/ # Oracle XE 21c/18c Database (port 1521/1522)
|
||||
├── lxc110-moltbot/ # MoltBot AI Telegram Bot
|
||||
├── lxc171-claude-agent/ # Claude Code development environment
|
||||
├── vm109-windows-dr/ # Windows Disaster Recovery VM
|
||||
├── vm201-windows/ # Windows 11 (IIS reverse proxy)
|
||||
└── vm302-oracle-test/ # Windows 11 + Oracle 21c test VM (ROA setup validation)
|
||||
|
||||
system_instructions/ # SQL migration guidelines and knowledge base
|
||||
├── system_prompt.md # SQL migration rules - READ BEFORE WRITING SQL
|
||||
└── knowledge_base/ # Example scripts and PACK_MIGRARE.pck
|
||||
|
||||
scripts/ # Utilities
|
||||
├── generare_proces_verbal.py # Generate assembly minutes (DOCX)
|
||||
├── verificare_voturi_AG.py # Verify assembly votes
|
||||
└── ups-monitor/ # UPS monitoring for production Oracle server 10.0.20.36
|
||||
|
||||
input/ # Oracle DMP files for import
|
||||
```
|
||||
|
||||
## Key Documentation Entry Points
|
||||
|
||||
- **Infrastructure overview**: `proxmox/README.md`
|
||||
- **Oprire planificată a clusterului (lucrări electrice) — fără failover HA / fence**: `proxmox/cluster/docs/oprire-planificata-cluster.md`
|
||||
- **SQL migration guidelines**: `system_instructions/system_prompt.md` (always read before generating migration SQL)
|
||||
- **Oracle database setup**: `proxmox/lxc108-oracle/README.md`
|
||||
- **Migration orchestration**: `proxmox/lxc108-oracle/migration/00-MASTER-MIGRATION.sh`
|
||||
- **Chatbot architecture**: `proxmox/lxc104-flowise/docs/prd.md`
|
||||
- **Docker Sandboxes (sbx) — agenți AI izolați**: `proxmox/lxc102-docker/README.md`
|
||||
- **Disaster recovery**: `proxmox/vm109-windows-dr/README.md`
|
||||
- **Instalare/migrare Oracle — care director se folosește**: `proxmox/lxc108-oracle/docs/instalare-si-migrare-oracle.md`
|
||||
- **ROA Windows setup scripts (XE/SE 21c)**: `proxmox/lxc108-oracle/roa-windows-setup/README.md`
|
||||
- **Conectarea clienților vechi (Instant Client 10/11) la 21c — ORA-28040 / ORA-01017 / ORA-12514**: `docs/lectii-conectare-client-oracle.md`
|
||||
- **Aliasul TNS lipsă pe server — eșecuri tăcute (actualizarea ROA „SUCCEEDED" fără să aplice nimic; exportul zilnic `backupora.exe` scrie „DONE" cu directorul gol)**: `docs/lectii-actualizare-roa-alias-tns.md`
|
||||
- **Kit de instalare pentru client (DMP-uri șablon + scripturi, gata de dus la client)**: `proxmox/lxc108-oracle/scripts/build-client-kit.ps1`
|
||||
- **VM 302 test environment for ROA setup**: `proxmox/vm302-oracle-test/README.md`
|
||||
- **Diagnostic spațiu Oracle la clienți (job zilnic + emailuri)**: `docs/diagnostic-spatiu-clienti.md`
|
||||
- **Monitorizare UPS pe serverul Oracle de producție 10.0.20.36 (înlocuiește ViewPower)**: `docs/ups-server36-monitorizare.md`
|
||||
- **Acces SSH la clienți cu chei publice (angajați noi)**: `docs/acces-ssh-chei-angajati.md`
|
||||
- **Acces administrativ la server client prin Tailscale + SSH (fără forward pe router)**: `docs/acces-client-tailscale-ssh.md`
|
||||
- **Cazuri clienți (depanare DB)**: `proxmox/lxc108-oracle/clienti/README.md`
|
||||
- **ROMPETROL ENERGY — recreare PDB Oracle XE 21c după ORA-12954**: `proxmox/lxc108-oracle/clienti/oracle-xe-21c/README.md`
|
||||
|
||||
## Infrastructure Commands
|
||||
|
||||
### Proxmox Cluster
|
||||
```bash
|
||||
ssh root@10.0.20.201 "pvecm status" # Cluster status
|
||||
ssh root@10.0.20.201 "pct list" # List LXC containers
|
||||
ssh root@10.0.20.201 "qm list" # List VMs
|
||||
```
|
||||
|
||||
### Oracle Database (LXC 108)
|
||||
```bash
|
||||
pct exec 108 -- docker exec -it oracle-xe sqlplus / as sysdba
|
||||
pct exec 108 -- docker restart oracle-xe
|
||||
```
|
||||
|
||||
### Flowise Chatbot (LXC 104)
|
||||
```bash
|
||||
pct exec 104 -- systemctl status flowise
|
||||
pct exec 104 -- systemctl restart flowise
|
||||
pct exec 104 -- journalctl -u flowise -f
|
||||
```
|
||||
|
||||
### Validation Scripts
|
||||
```bash
|
||||
# UPS monthly test
|
||||
proxmox/cluster/ups/scripts/ups-monthly-test.sh
|
||||
|
||||
# SSL certificate monitoring
|
||||
proxmox/vm201-windows/scripts/monitor-ssl-certificates.sh
|
||||
|
||||
# Oracle backup monitoring
|
||||
proxmox/vm109-windows-dr/scripts/oracle-backup-monitor-proxmox.sh
|
||||
```
|
||||
|
||||
## Network Layout
|
||||
|
||||
| Service | IP Address | Port | Purpose |
|
||||
|---------|-----------|------|---------|
|
||||
| pvemini (main host) | 10.0.20.201 | 8006 | Proxmox GUI |
|
||||
| Oracle XE 21c | 10.0.20.121 | 1521 | Production database |
|
||||
| Oracle XE 18c | 10.0.20.121 | 1522 | Export compatibility (TSTZ 31) |
|
||||
| Flowise | 10.0.20.161 | 3000 | Chatbot UI |
|
||||
| Gitea | 10.0.20.165 | 3000 | Git server |
|
||||
| Docker + Portainer + sbx | 10.0.20.113 | 9000/9443 | Docker host, sandbox-uri agenți AI |
|
||||
| Claude Agent | 10.0.20.171 | 22 | Development (also via Tailscale: 100.95.55.51) |
|
||||
| MoltBot | 10.0.20.173 | 22 | AI Telegram Bot (also via Tailscale: 100.120.119.70) |
|
||||
| Primary Oracle | 10.0.20.36 | 1521 | Windows production |
|
||||
| DR Oracle | 10.0.20.37 | 1521 | Disaster recovery |
|
||||
|
||||
## SQL Migration Conventions
|
||||
|
||||
When writing Oracle migration scripts, follow the naming convention:
|
||||
```
|
||||
ff_YYYY_MM_DD_##_TYPE.sql
|
||||
```
|
||||
Where TYPE is: DDL, DML, VIEW, PACK, TRIG, etc.
|
||||
|
||||
Always reference `system_instructions/system_prompt.md` for:
|
||||
- Oracle 10g compatibility requirements
|
||||
- PACK_MIGRARE package usage
|
||||
- Migration script patterns and examples
|
||||
|
||||
## Custom Claude Code Commands
|
||||
|
||||
- `/ultimate_validate_command` - Generate comprehensive validation commands
|
||||
- `/plan-handover` - Save implementation plan for session handover
|
||||
- `/branch-plan-handover` - Create branch and save plan
|
||||
- `/context-handover` - Save context for next session
|
||||
|
||||
## Git Workflow
|
||||
|
||||
- Remote: `http://gitea:3000/romfast/ROMFASTSQL.git`
|
||||
- Main branch: `master`
|
||||
- Feature branches merged directly to master
|
||||
|
||||
Reference in New Issue
Block a user