3.7 KiB
3.7 KiB
🚀 What this does
This kit:
- Saves all ODBC drivers, DSNs, and registry settings
- Builds a single
.zipbackup 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)
-
Right-click
export-ODBC.ps1→ Run with PowerShell (Admin) -
Wait until you see:
Export complete. ZIP created at: C:\ODBC_Migration\ODBC_Backup.zip -
Copy that
ODBC_Backup.zipfile to a USB drive or cloud folder.
📥 Step 2 — Restore (New Computer)
- Copy the
ODBC_Backup.zipfile toC:\ODBC_Migration\ - Right-click
restore-ODBC.ps1→ Run with PowerShell (Admin) - 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
- Install missing drivers if needed.
Then re-runrestore-ODBC.ps1one 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 there’s 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-Archivebuilt 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.
