Files
ROMFASTSQL/CLAUDE.md
Marius 015cd797a1 fix(oracle): SYS.INFO iese din SYSTEM + job de purjare + diagnostic spatiu clienti
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
2026-08-08 17:38:54 +03:00

5.2 KiB

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/                    # Python utilities
├── generare_proces_verbal.py   # Generate assembly minutes (DOCX)
└── verificare_voturi_AG.py     # Verify assembly votes

input/                      # Oracle DMP files for import

Key Documentation Entry Points

  • Infrastructure overview: proxmox/README.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
  • ROA Windows setup scripts (XE/SE 21c): proxmox/lxc108-oracle/roa-windows-setup/README.md
  • 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
  • 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

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)

pct exec 108 -- docker exec -it oracle-xe sqlplus / as sysdba
pct exec 108 -- docker restart oracle-xe

Flowise Chatbot (LXC 104)

pct exec 104 -- systemctl status flowise
pct exec 104 -- systemctl restart flowise
pct exec 104 -- journalctl -u flowise -f

Validation Scripts

# 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