1
0
Files
odbc-migration-kit/README.md
2025-10-10 15:30:57 -07:00

3.7 KiB
Raw Blame History

ODBC Migration Kit Banner

🚀 What this does

This kit:

  • Saves all ODBC drivers, DSNs, and registry settings
  • Builds a single .zip backup package
  • Automatically lists vendor download links (Microsoft, Oracle, MySQL, PostgreSQL, etc.)
  • Recreates everything on a new computer in one click

🖥️ Requirements

  • Windows 10 or 11
  • Administrator permissions
  • PowerShell 5.1 or higher

🧰 Files Included

File Purpose
export-ODBC.ps1 Run this on the old computer to export settings
restore-ODBC.ps1 Run this on the new computer to import everything
ODBC_Backup.zip The automatically created backup package
ODBC_Migration_Report.md Report with driver download links

📤 Step 1 — Backup (Old Computer)

  1. Right-click export-ODBC.ps1Run with PowerShell (Admin)

  2. Wait until you see:

    Export complete. ZIP created at: C:\ODBC_Migration\ODBC_Backup.zip
    
  3. Copy that ODBC_Backup.zip file to a USB drive or cloud folder.


📥 Step 2 — Restore (New Computer)

  1. Copy the ODBC_Backup.zip file to C:\ODBC_Migration\
  2. Right-click restore-ODBC.ps1Run with PowerShell (Admin)
  3. The script will:
    • Extract your backup
    • Recreate DSNs
    • Import registry keys
    • Tell you which drivers are missing (with clickable download links)

Example output:

=== Missing ODBC Drivers Detected ===
  - ODBC Driver 18 for SQL Server (64-bit)
    Download: https://learn.microsoft.com/sql/connect/odbc/download-odbc-driver-for-sql-server
  1. Install missing drivers if needed.
    Then re-run restore-ODBC.ps1 one more time (safe to run twice).

📦 Files Created During Backup

C:\ODBC_Migration\
 ├── ODBC_Backup.zip
 ├── export_log.txt
 ├── export\
 │   ├── ODBC_Migration_Report.md
 │   ├── odbc_driver_product_map.csv
 │   ├── odbc_installer_hits.csv
 │   ├── odbc_drivers.csv
 │   ├── odbc_dsns.xml
 │   ├── ODBC_System.reg
 │   ├── ODBC_User.reg
 │   └── ODBC_System32.reg

🛠️ Troubleshooting

Issue Fix
PowerShell says “script execution disabled” Open PowerShell as admin → Set-ExecutionPolicy RemoteSigned
ZIP not created Ensure theres enough space on C:\ and that PowerShell ran as admin
Missing driver link says “Search manually” Use the Markdown report to see full list of known download sites
Restore errors out Run again after installing missing drivers

🧑‍💻 Technical Details (for advanced users)

  • Uses Get-OdbcDsn, Get-OdbcDriver, and registry exports
  • Detects installed products from HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
  • Generates CSV and Markdown reports with official vendor links
  • Compressed using Compress-Archive built into PowerShell
  • Logs stored in C:\ODBC_Migration

🧡 Credits

Created by Gene Amos for easy ODBC migration between home or work PCs.
Licensed under MIT.
Feel free to fork and improve.