A comprehensive Streamlit application for migrating data from Oracle to MySQL databases with an intuitive web interface.
🔄 Database Migration
- Oracle to MySQL data migration
- Batch processing for large datasets
- Real-time progress tracking
- Error handling with resume functionality
🗺️ Smart Mapping
- Automatic table discovery
- Interactive table mapping
- Column-level mapping with data type conversion
- Custom transformation rules (Y/N → True/False, date formats)
⚙️ Configuration Management
- Easy database connection setup
- Migration settings customization
- Error handling strategies
- Performance optimization options
📊 Monitoring & Reporting
- Real-time migration progress
- Detailed error reporting
- Performance statistics
- Migration validation
- Python 3.8 or higher
- Oracle Database client libraries
- MySQL Database access
- Required Python packages (see requirements.txt)
Windows:
- Download Oracle Instant Client from Oracle website
- Extract to a folder (e.g.,
C:\oracle\instantclient_21_6) - Add the folder to your PATH environment variable
Linux/macOS:
# Follow Oracle Instant Client installation guide for your OSpip install -r requirements.txt# If you encounter cx_Oracle installation issues:
pip install cx_Oracle --upgrade
# For Windows, you might need:
pip install cx_Oracle --no-binary cx_OracleOracle Database (Source):
- Host: localhost (or your Oracle server)
- Port: 1521 (default)
- Service Name: XE (or your service name)
- Username: psp
- Password: psp
MySQL Database (Target):
- Host: localhost (or your MySQL server)
- Port: 3306 (default)
- Database: db_psp
- Username: root
- Password: (empty or your password)
streamlit run app.pyThe application will open in your web browser at http://localhost:8501
- Configure Oracle connection settings
- Configure MySQL connection settings
- Test both connections to ensure they work
- View all tables from both databases
- Select Oracle tables to migrate
- Map each Oracle table to corresponding MySQL table
- Map columns between selected tables
- Configure data transformations:
- Y/N → True/False for boolean fields
- Date format conversions
- Custom field mappings
- Set batch size (default: 1000 rows)
- Configure error handling strategy
- Set date format for MySQL
- Enable/disable table truncation
- Start migration process
- Monitor real-time progress
- Handle errors with continue/stop options
- Resume paused migrations
- View detailed results
- Stop on Error: Migration stops at first error
- Skip and Continue: Skip problematic data and continue
- Ask User: Prompt user for each error encountered
- Boolean Conversion: Oracle Y/N → MySQL True/False
- Date Format: Configurable date format conversion
- Null Handling: Proper null value management
- Data Type Mapping: Automatic Oracle to MySQL type mapping
- Batch Processing: Configurable batch sizes
- Connection Pooling: Multiple database connections
- Parallel Processing: Process multiple tables simultaneously
- Progress Monitoring: Real-time progress tracking
-
Oracle Connection Failed
- Verify Oracle Instant Client installation
- Check database connection parameters
- Ensure Oracle service is running
-
MySQL Connection Failed
- Verify MySQL server is running
- Check database credentials
- Ensure database exists
-
Import Errors
- Install missing Python packages:
pip install -r requirements.txt - For Oracle: Install Oracle Instant Client
- For MySQL: Install MySQL connector
- Install missing Python packages:
-
Data Type Errors
- Review column mappings
- Check data type compatibility
- Use transformation rules for incompatible types
-
Performance Issues
- Reduce batch size for large tables
- Enable connection pooling
- Check database server resources
- ORA-00942: Table or view does not exist
- Access denied: Check database permissions
- Data too long: Check column length constraints
- Constraint violation: Check foreign key relationships
psp-db-migration-app/
├── app.py # Main Streamlit application
├── database_manager.py # Database connection and operations
├── migration_engine.py # Migration logic and data processing
├── utils.py # Utility classes and helpers
├── requirements.txt # Python dependencies
├── README.md # This file
└── migration.log # Migration log file (created during execution)
For issues and questions:
- Check the troubleshooting section above
- Review the migration logs for detailed error information
- Ensure all dependencies are properly installed
- Verify database connections and permissions
This project is provided as-is for database migration purposes.