A web application for comparing Oracle database schemas and data between two databases — a Read DB and a Write DB.
- Schema Diff — side-by-side comparison of database objects (tables, views, triggers, procedures, sequences), including column-level diffs with type and nullability details.
- Data Diff — row-level comparison of table data between both databases, with support for large tables (up to 5,000 rows fetched, 200 diff rows returned per side).
- SQL Scripts — generate DDL definitions and INSERT statements from the Read database for any object.
- Configuration — view the connection details for both databases.
| Layer | Technology |
|---|---|
| Backend | Python · FastAPI · SQLAlchemy · oracledb |
| Frontend | Preact · Vite · TypeScript |
| Database | Oracle (tested with Oracle XE) |
backend/ FastAPI app (uvicorn)
dm-front/ Preact + Vite frontend
.env Database connection strings (not committed)
Copy .env.sample to .env and fill in your Oracle connection strings:
READ_DB=oracle+oracledb://user:pass@host:1521/?service_name=XEPDB1
WRITE_DB=oracle+oracledb://user:pass@host:1521/?service_name=XEPDB1WSL2 note: If the backend runs inside WSL2 and Oracle is on the Windows host, use the WSL2 gateway IP (
ip route show default) instead oflocalhost.
python -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
cd backend
uvicorn app.main:app --reloadcd dm-front
npm install
npm run devVite proxies /api requests to http://localhost:8000.
| Method | Path | Description |
|---|---|---|
| GET | /api/schema/diff |
Full schema diff between both DBs |
| GET | /api/schema/table-columns/{table_name} |
Column-level diff for a specific table |
| GET | /api/data/tables |
All tables with comparison status |
| GET | /api/data/row-diff/{table_name} |
Row-level diff for a table (10s timeout) |
| GET | /api/sql/objects |
List all objects in the Read DB |
| GET | /api/sql/ddl/{object_type}/{object_name} |
DDL for an object |
| GET | /api/sql/inserts/{table_name} |
Generated INSERT statements |
| GET | /api/config |
Database connection info |
