A Windows tool for migrating data between relational databases (SQL Server, Oracle, PostgreSQL).
- 🔄 Cross-database data migration
- 🗄️ Support for SQL Server, Oracle, PostgreSQL
- 🎨 Modern graphical interface (Avalonia UI)
- 📊 Selective table selection with search/filter
- 🔧 Automatic data type mapping
- 🔑 Primary Key and UNIQUE constraint migration
- 📈 Real-time progress bar
- 🚀 Automatic target database creation
- 💾 Single-file executable (.exe)
- 📁 Save/Load connection configurations
- 🔀 Three migration modes: Schema+Data, Schema Only, Data Only
- ↩️ Automatic rollback on failure (Schema+Data mode)
- Windows 10/11 (64-bit)
- .NET 10.0 Runtime (included in standalone exe)
- Download
DatabaseMigrator.exefrom Releases - Run the executable directly
- .NET 10.0 SDK
- PowerShell 7+ (Windows)
PowerShell:
# Build and publish for Windows x64
.\publish.ps1
# The executable will be in: .\release\DatabaseMigrator.exeBatch/CMD:
REM Build and publish for Windows x64
publish.bat
REM The executable will be in: .\release\DatabaseMigrator.exeManual with dotnet CLI:
dotnet publish src/DatabaseMigrator/DatabaseMigrator.csproj \
-c Release \
-r win-x64 \
--self-contained \
-p:PublishSingleFile=true- Launch the application
- In the "Database Connections" tab:
- Source Database: Enter connection details for the source DB
- Target Database: Enter connection details for the target DB
- Click "Connect to Databases"
- Select the tables to migrate in the "Table Selection" tab
- Use the search box to filter tables by name
- Use "Select All" and "Deselect All" buttons for quick management
- Row counts are loaded automatically
Select one of three migration modes:
- Schema + Data: Creates tables and migrates data (with automatic rollback on failure)
- Schema Only: Creates only the table structure without data
- Data Only: Migrates data only (tables must already exist in target)
- Go to the "Migration" tab
- Review the status information
- Click "Start Migration"
- Monitor progress with the progress bar
- The target database will be created automatically if it doesn't exist
- Type: SqlServer
- Server: Server name or IP
- Port: 1433 (default)
- Database: Database name
- Username: sa or SQL user (leave empty for Windows Auth)
- Password: Account password
- Type: Oracle
- Server: TNS name or IP
- Port: 1521 (default)
- Database: SID or service name (e.g., XE, ORCL)
- Username: Oracle user
- Password: Account password
- Type: PostgreSQL
- Server: Server name or IP
- Port: 5432 (default)
- Database: Database name
- Username: postgres or other user
- Password: Account password
The application supports saving and loading connection configurations:
- Save: File → Save Configuration (or Ctrl+S)
- Load: File → Load Configuration (or Ctrl+O)
Configurations are saved as JSON files and include both source and target connection settings.
The application automatically maps data types between different database systems:
| SQL Server | PostgreSQL | Oracle |
|---|---|---|
| int | integer | NUMBER(10) |
| bigint | bigint | NUMBER(19) |
| varchar(n) | varchar(n) | VARCHAR2(n) |
| nvarchar(n) | varchar(n) | NVARCHAR2(n) |
| varchar(max) | text | CLOB |
| nvarchar(max) | text | NCLOB |
| datetime2 | timestamp | TIMESTAMP(6) |
| bit | boolean | NUMBER(1) |
| text | text | CLOB |
| varbinary | bytea | BLOB |
| uniqueidentifier | uuid | RAW(16) |
- Connection failures: Clear error messages with troubleshooting hints
- Schema creation errors: Detailed logging of DDL operations
- Constraint migration: Primary Keys and UNIQUE constraints are automatically recreated
- Data migration errors: Automatic rollback of created tables (in Schema+Data mode)
- Validation: Data-only mode validates table existence before starting
The application logs all operations to help with troubleshooting:
- Connection attempts and results
- Table discovery and row counts
- Schema DDL generation
- Data migration progress
- Error details with stack traces
MIT License - See LICENSE file for details.
Contributions are welcome! Please read the ARCHITECTURE.md file to understand the codebase structure.