From 88b87a58c0154a961f36df9b5ad5ad34c7272684 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 1 Oct 2025 19:05:20 +0300 Subject: [PATCH] Add Oracle connection settings documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Created CONEXIUNI-ORACLE.md with complete connection details - Oracle XE 21c Docker (LXC 108): CDB XE with PDBs ROA and ROA2 - Oracle 10g VM 107 Windows: connection strings and migration notes - Updated SYS/SYSTEM passwords to romfastsoft (CONTAINER=ALL) - Connection strings for SQL*Plus, JDBC, and TNS - Troubleshooting commands and useful queries - Export/import examples for Data Pump PDB ROA2 fully configured: - CONTAFIN_ORACLE and FIRMANOUA schemas imported - 232 public synonyms created - 149 grants to PUBLIC - All critical packages VALID (PACK_CONTAFIN, PACK_UPDATE, PACK_UTILS, PACK_DREPTURI) - SYS custom objects: AUTH_PACK, UPDATESQLPLUS, EXECUTESCRIPTOS, UTL_MAIL - Ready for DMP template exports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- oracle/CONEXIUNI-ORACLE.md | 250 +++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 oracle/CONEXIUNI-ORACLE.md diff --git a/oracle/CONEXIUNI-ORACLE.md b/oracle/CONEXIUNI-ORACLE.md new file mode 100644 index 0000000..d768fee --- /dev/null +++ b/oracle/CONEXIUNI-ORACLE.md @@ -0,0 +1,250 @@ +# Conexiuni Oracle - ROMFASTSQL + +## 🐳 Oracle XE 21c - Docker în LXC 108 (Proxmox) + +### Informații Server +- **Host**: 10.0.20.105 (LXC 108 pe Proxmox 10.0.20.201) +- **Port**: 1521 +- **Container Docker**: oracle-xe +- **Versiune**: Oracle Database 21c Express Edition +- **CDB**: XE +- **User SYS**: sys / romfastsoft (CONTAINER=ALL) +- **User SYSTEM**: system / romfastsoft (CONTAINER=ALL) + +### PDB-uri Disponibile + +#### 1. PDB: ROA (Producție) +```bash +# Connection String +Host: 10.0.20.105 +Port: 1521 +Service Name: roa +``` + +**Useri:** +- **SYS**: sys / romfastsoft (as SYSDBA) +- **SYSTEM**: system / romfastsoft +- **CONTAFIN_ORACLE**: CONTAFIN_ORACLE / OraclePass123 +- **MARIUSM_AUTO**: MARIUSM_AUTO / OraclePass123 + +**SQL*Plus:** +```bash +sqlplus sys/romfastsoft@10.0.20.105:1521/roa as sysdba +sqlplus system/romfastsoft@10.0.20.105:1521/roa +sqlplus CONTAFIN_ORACLE/OraclePass123@10.0.20.105:1521/roa +sqlplus MARIUSM_AUTO/OraclePass123@10.0.20.105:1521/roa +``` + +**JDBC:** +``` +jdbc:oracle:thin:@10.0.20.105:1521/roa +``` + +**TNS:** +``` +ROA = + (DESCRIPTION = + (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.20.105)(PORT = 1521)) + (CONNECT_DATA = + (SERVER = DEDICATED) + (SERVICE_NAME = roa) + ) + ) +``` + +--- + +#### 2. PDB: ROA2 (Template pentru export DMP) +```bash +# Connection String +Host: 10.0.20.105 +Port: 1521 +Service Name: roa2 +``` + +**Useri:** +- **SYS**: sys / romfastsoft (as SYSDBA) +- **SYSTEM**: system / romfastsoft +- **CONTAFIN_ORACLE**: CONTAFIN_ORACLE / ROMFASTSOFT +- **FIRMANOUA**: FIRMANOUA / ROMFASTSOFT + +**SQL*Plus:** +```bash +sqlplus sys/romfastsoft@10.0.20.105:1521/roa2 as sysdba +sqlplus system/romfastsoft@10.0.20.105:1521/roa2 +sqlplus CONTAFIN_ORACLE/ROMFASTSOFT@10.0.20.105:1521/roa2 +sqlplus FIRMANOUA/ROMFASTSOFT@10.0.20.105:1521/roa2 +``` + +**JDBC:** +``` +jdbc:oracle:thin:@10.0.20.105:1521/roa2 +``` + +**TNS:** +``` +ROA2 = + (DESCRIPTION = + (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.20.105)(PORT = 1521)) + (CONNECT_DATA = + (SERVER = DEDICATED) + (SERVICE_NAME = roa2) + ) + ) +``` + +**Caracteristici ROA2:** +- Template pentru scheme noi (export DMP) +- Tablespace ROA: 2GB (pentru teste/template) +- Profil DEFAULT: parole nelimitate (PASSWORD_LIFE_TIME UNLIMITED) +- Obiecte SYS custom: AUTH_PACK, UPDATESQLPLUS, EXECUTESCRIPTOS, UTL_MAIL +- 232 sinonime publice CONTAFIN_ORACLE +- 149 grant-uri către PUBLIC + +--- + +### Acces SSH/Docker + +**SSH Proxmox:** +```bash +ssh root@10.0.20.201 +``` + +**Acces LXC 108:** +```bash +# Din Proxmox +pct exec 108 -- bash + +# Acces direct Oracle container +pct exec 108 -- docker exec -it oracle-xe bash + +# SQL*Plus direct în container +pct exec 108 -- docker exec oracle-xe sqlplus sys/OraclePass123@localhost:1521/roa as sysdba +``` + +**Comenzi utile:** +```bash +# Status PDB-uri +echo "SELECT name, open_mode FROM v\$pdbs;" | sqlplus -s sys/romfastsoft@localhost:1521/XE as sysdba + +# Verificare tablespace-uri ROA2 +echo "SELECT tablespace_name, bytes/1024/1024 as MB FROM dba_data_files WHERE tablespace_name='ROA';" | sqlplus -s sys/romfastsoft@localhost:1521/roa2 as sysdba + +# Status obiecte +echo "SELECT owner, COUNT(*), SUM(CASE WHEN status='VALID' THEN 1 ELSE 0 END) as valid FROM dba_objects WHERE owner IN ('CONTAFIN_ORACLE', 'FIRMANOUA') GROUP BY owner;" | sqlplus -s sys/romfastsoft@localhost:1521/roa2 as sysdba +``` + +--- + +## 🖥️ Oracle 10g - VM 107 (Windows 7) + +### Informații Server +- **Host**: 10.0.20.122 (VM Windows 7) +- **Port**: 1521 +- **Versiune**: Oracle Database 10g Release 10.2.0.1.0 +- **SID**: ORCL +- **User SYS**: sys / oracle (as SYSDBA) + +### Conexiuni + +**SQL*Plus:** +```bash +sqlplus sys/oracle@10.0.20.122:1521/ORCL as sysdba +sqlplus CONTAFIN_ORACLE/OraclePass123@10.0.20.122:1521/ORCL +``` + +**JDBC:** +``` +jdbc:oracle:thin:@10.0.20.122:1521:ORCL +``` + +**TNS:** +``` +ORCL_VM107 = + (DESCRIPTION = + (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.20.122)(PORT = 1521)) + (CONNECT_DATA = + (SERVER = DEDICATED) + (SID = ORCL) + ) + ) +``` + +**Note:** +- Sursă pentru export DMP Oracle 10g → Oracle 21c +- Archive DMP exportate: `firmanoua.zip` (contafin_oracle.dmp + firmanoua.dmp) +- Folosit pentru migrare către Oracle XE 21c + +--- + +## 📝 Notițe Importante + +### Diferențe Oracle 10g vs 21c +- Oracle 10g folosește **SID** (ORCL) +- Oracle 21c folosește **SERVICE_NAME** (roa, roa2) +- Migrare: Export DMP Oracle 10g → Import Data Pump Oracle 21c (`impdp`) + +### Profile Parole +- **ROA**: Parolele pot expira (setări default Oracle) +- **ROA2**: Parolele NU expiră (PASSWORD_LIFE_TIME UNLIMITED) + +### Backup și Export +```bash +# Export schema FIRMANOUA din ROA2 +expdp system/romfastsoft@10.0.20.105:1521/roa2 \ + SCHEMAS=FIRMANOUA \ + DIRECTORY=DATA_PUMP_DIR \ + DUMPFILE=firmanoua_template_%U.dmp \ + LOGFILE=firmanoua_template.log \ + PARALLEL=2 + +# Export schema CONTAFIN_ORACLE din ROA2 +expdp system/romfastsoft@10.0.20.105:1521/roa2 \ + SCHEMAS=CONTAFIN_ORACLE \ + DIRECTORY=DATA_PUMP_DIR \ + DUMPFILE=contafin_template_%U.dmp \ + LOGFILE=contafin_template.log \ + PARALLEL=2 +``` + +--- + +## 🔧 Troubleshooting + +### Verificare conexiune +```bash +# Test ping +ping 10.0.20.105 + +# Test port Oracle +nc -zv 10.0.20.105 1521 + +# Test SQL*Plus +sqlplus sys/romfastsoft@10.0.20.105:1521/roa as sysdba +``` + +### Restart Oracle Container +```bash +ssh root@10.0.20.201 +pct exec 108 -- docker restart oracle-xe + +# Verificare status +pct exec 108 -- docker ps +pct exec 108 -- docker logs oracle-xe --tail 50 +``` + +### Verificare PDB status +```bash +# Open PDB dacă este MOUNTED +pct exec 108 -- docker exec oracle-xe sqlplus -s sys/romfastsoft@localhost:1521/XE as sysdba <