Six Win32 packages for deploying Oracle 21c connectivity to Windows clients via Intune. Choose the packages that match your use case — ODBC-only for Excel/Access, full client for SQL*Plus/OCI/JDBC.
- Which packages do you need?
- Package overview & dependency chain
- Repository layout
- Step 1 — Download and populate the folders
- Step 2 — Create the .intunewin packages
- Step 3 — Configure each app in Intune
- Return codes
- What the scripts do on the client
- Install results on the client
- Log files on the client
- TNS_ADMIN
- Creating Oracle ODBC DSNs
- Troubleshooting
| Use case | Packages to deploy |
|---|---|
| Excel / Access / ODBC apps only | VCRedist + Oracle ODBC |
| SQL*Plus, OCI, JDBC, full Oracle tooling | VCRedist + Oracle Client |
| Both ODBC apps and full tooling on the same machine | VCRedist + Oracle ODBC + Oracle Client |
ODBC packages are much lighter (~25–40 MB .intunewin vs ~500–700 MB for the full client). Use them wherever the full client is not strictly needed.
┌─────────────────────────┐ ┌─────────────────────────┐
│ VCRedist 2015-2022 x64 │ │ VCRedist 2015-2022 x86 │
│ (no dependencies) │ │ (no dependencies) │
└────────────┬────────────┘ └──────────┬──────────────┘
│ auto-install │ auto-install
┌───────┴────────┐ ┌────────┴────────┐
▼ ▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌───────────────────────┐
│ Oracle ODBC │ │Oracle Client │ │ Oracle ODBC │ │ Oracle Client x86 │
│ x64 │ │ x64 │ │ x86 │ │ deps: VCRedist x86 │
│ (Excel x64, │ │ (SQL*Plus, │ │ (Excel x86, │ │ + Oracle Cli x64│
│ Power BI) │ │ OCI, JDBC) │ │ Access) │ └───────────────────────┘
└──────────────┘ └──────────────┘ └──────────────┘
Upload order to Intune: VCRedist x64 → VCRedist x86 → Oracle ODBC x64 → Oracle ODBC x86 → Oracle Client x64 → Oracle Client x86
Oracle21_Intune/
│
├── vcredist_x64/
│ ├── VC_redist.x64.exe ← ADD: Microsoft VC++ 2015-2022 x64
│ ├── Install-VCRedist_x64.ps1
│ ├── Uninstall-VCRedist_x64.ps1
│ └── Detect-VCRedist_x64.ps1
│
├── vcredist_x86/
│ ├── VC_redist.x86.exe ← ADD: Microsoft VC++ 2015-2022 x86
│ ├── Install-VCRedist_x86.ps1
│ ├── Uninstall-VCRedist_x86.ps1
│ └── Detect-VCRedist_x86.ps1
│
├── odbc_x64/
│ ├── instantclient-basic-windows.x64-21.*.zip ← ADD: Oracle download
│ ├── instantclient-odbc-windows.x64-21.*.zip ← ADD: Oracle download
│ ├── tnsnames.ora ← ADD: your file
│ ├── sqlnet.ora ← ADD: your file
│ ├── Install-OracleODBC_x64.ps1
│ ├── Uninstall-OracleODBC_x64.ps1
│ └── Detect-OracleODBC_x64.ps1
│
├── odbc_x86/
│ ├── instantclient-basic-nt-21.*.zip ← ADD: Oracle download
│ ├── instantclient-odbc-nt-21.*.zip ← ADD: Oracle download
│ ├── tnsnames.ora ← ADD: your file
│ ├── sqlnet.ora ← ADD: your file
│ ├── Install-OracleODBC_x86.ps1
│ ├── Uninstall-OracleODBC_x86.ps1
│ └── Detect-OracleODBC_x86.ps1
│
├── x64/
│ ├── setup.exe + Oracle installer files ← ADD: extracted Oracle Client x64
│ ├── tnsnames.ora ← ADD: your file
│ ├── sqlnet.ora ← ADD: your file
│ ├── client_install_x64.rsp
│ ├── Install-Oracle21c_x64.ps1
│ ├── Uninstall-Oracle21c_x64.ps1
│ └── Detect-Oracle21c_x64.ps1
│
├── x86/
│ ├── setup.exe + Oracle installer files ← ADD: extracted Oracle Client x86
│ ├── tnsnames.ora ← ADD: your file
│ ├── sqlnet.ora ← ADD: your file
│ ├── client_install_x86.rsp
│ ├── Install-Oracle21c_x86.ps1
│ ├── Uninstall-Oracle21c_x86.ps1
│ └── Detect-Oracle21c_x86.ps1
│
└── dsn/
└── Create-OracleDSN.ps1 ← configure DSN names + TNS aliases, deploy as Intune platform script
Download from Microsoft Visual C++ Redistributable latest:
| File | Destination |
|---|---|
VC_redist.x64.exe |
vcredist_x64\ |
VC_redist.x86.exe |
vcredist_x86\ |
Download from Oracle — free, no login required:
| File | Download page | Destination |
|---|---|---|
instantclient-basic-windows.x64-21.*.zip |
Windows x64 → Basic | odbc_x64\ |
instantclient-odbc-windows.x64-21.*.zip |
Windows x64 → ODBC | odbc_x64\ |
instantclient-basic-nt-21.*.zip |
Windows x86 → Basic | odbc_x86\ |
instantclient-odbc-nt-21.*.zip |
Windows x86 → ODBC | odbc_x86\ |
Place the fully extracted Oracle 21c installer content into x64\ and x86\.
Copy your files into every package folder that needs them:
odbc_x64\, odbc_x86\, x64\, x86\
Download Microsoft Win32 Content Prep Tool.
IntuneWinAppUtil.exe -c "C:\Build\vcredist_x64" -s "Install-VCRedist_x64.ps1" -o "C:\Build\Output" -q
IntuneWinAppUtil.exe -c "C:\Build\vcredist_x86" -s "Install-VCRedist_x86.ps1" -o "C:\Build\Output" -q
IntuneWinAppUtil.exe -c "C:\Build\odbc_x64" -s "Install-OracleODBC_x64.ps1" -o "C:\Build\Output" -q
IntuneWinAppUtil.exe -c "C:\Build\odbc_x86" -s "Install-OracleODBC_x86.ps1" -o "C:\Build\Output" -q
IntuneWinAppUtil.exe -c "C:\Build\x64" -s "Install-Oracle21c_x64.ps1" -o "C:\Build\Output" -q
IntuneWinAppUtil.exe -c "C:\Build\x86" -s "Install-Oracle21c_x86.ps1" -o "C:\Build\Output" -q| Package | Approximate .intunewin size |
|---|---|
| VCRedist x64 | ~15 MB |
| VCRedist x86 | ~10 MB |
| Oracle ODBC x64 | ~25–40 MB |
| Oracle ODBC x86 | ~25–40 MB |
| Oracle Client x64 | ~500–700 MB |
| Oracle Client x86 | ~500–700 MB |
Go to Intune > Apps > Windows > Add > Windows app (Win32). Upload in the order listed below so dependencies are available before they are referenced.
| Setting | Value |
|---|---|
| Name | VCRedist 2015-2022 (x64) |
| Install command | powershell.exe -ExecutionPolicy Bypass -File Install-VCRedist_x64.ps1 |
| Uninstall command | powershell.exe -ExecutionPolicy Bypass -File Uninstall-VCRedist_x64.ps1 |
| Install behaviour | System |
| Max install time | 30 min |
| OS architecture | 64-bit |
| Min OS | Windows 10 1909 |
| Detection script | Detect-VCRedist_x64.ps1 / Run as 32-bit: No |
| Dependencies | — |
| Setting | Value |
|---|---|
| Name | VCRedist 2015-2022 (x86) |
| Install command | powershell.exe -ExecutionPolicy Bypass -File Install-VCRedist_x86.ps1 |
| Uninstall command | powershell.exe -ExecutionPolicy Bypass -File Uninstall-VCRedist_x86.ps1 |
| Install behaviour | System |
| Max install time | 30 min |
| OS architecture | 32-bit or 64-bit |
| Min OS | Windows 10 1909 |
| Detection script | Detect-VCRedist_x86.ps1 / Run as 32-bit: Yes |
| Dependencies | — |
For 64-bit applications: Excel 64-bit, Power BI Desktop, 64-bit ODBC data sources.
| Setting | Value |
|---|---|
| Name | Oracle ODBC Driver 21c (x64) |
| Install command | powershell.exe -ExecutionPolicy Bypass -File Install-OracleODBC_x64.ps1 |
| Uninstall command | powershell.exe -ExecutionPolicy Bypass -File Uninstall-OracleODBC_x64.ps1 |
| Install behaviour | System |
| Max install time | 30 min |
| OS architecture | 64-bit |
| Min OS | Windows 10 1909 |
| Detection script | Detect-OracleODBC_x64.ps1 / Run as 32-bit: No |
| Dependencies | VCRedist 2015-2022 (x64) — Auto Install: Yes |
For 32-bit applications: Excel 32-bit, Access, legacy line-of-business apps.
| Setting | Value |
|---|---|
| Name | Oracle ODBC Driver 21c (x86) |
| Install command | powershell.exe -ExecutionPolicy Bypass -File Install-OracleODBC_x86.ps1 |
| Uninstall command | powershell.exe -ExecutionPolicy Bypass -File Uninstall-OracleODBC_x86.ps1 |
| Install behaviour | System |
| Max install time | 30 min |
| OS architecture | 32-bit or 64-bit |
| Min OS | Windows 10 1909 |
| Detection script | Detect-OracleODBC_x86.ps1 / Run as 32-bit: Yes |
| Dependencies | VCRedist 2015-2022 (x86) — Auto Install: Yes |
Full client: SQL*Plus, OCI, JDBC, ODP.NET. Skip if ODBC-only is sufficient.
| Setting | Value |
|---|---|
| Name | Oracle 21c Client (x64) |
| Install command | powershell.exe -ExecutionPolicy Bypass -File Install-Oracle21c_x64.ps1 |
| Uninstall command | powershell.exe -ExecutionPolicy Bypass -File Uninstall-Oracle21c_x64.ps1 |
| Install behaviour | System |
| Max install time | 120 min |
| OS architecture | 64-bit |
| Min OS | Windows 10 1909 |
| Detection script | Detect-Oracle21c_x64.ps1 / Run as 32-bit: No |
| Dependencies | VCRedist 2015-2022 (x64) — Auto Install: Yes |
Full 32-bit client. Skip if ODBC-only is sufficient.
| Setting | Value |
|---|---|
| Name | Oracle 21c Client (x86) |
| Install command | powershell.exe -ExecutionPolicy Bypass -File Install-Oracle21c_x86.ps1 |
| Uninstall command | powershell.exe -ExecutionPolicy Bypass -File Uninstall-Oracle21c_x86.ps1 |
| Install behaviour | System |
| Max install time | 120 min |
| OS architecture | 32-bit or 64-bit |
| Min OS | Windows 10 1909 |
| Detection script | Detect-Oracle21c_x86.ps1 / Run as 32-bit: Yes |
| Dependencies | VCRedist 2015-2022 (x86) — Auto Install: Yes |
| Oracle 21c Client (x64) — Auto Install: Yes |
⚠️ 120 minutes for Oracle Client — Oracle extraction + OUI on slow hardware can exceed the default 60-minute timeout. Intune will report failure while the install is still running.
| Code | Type |
|---|---|
| 0 | Success |
| 1707 | Success |
| 3010 | Soft reboot required |
| 1641 | Hard reboot required |
| 1618 | Retry |
1. Verify installer exe is present in package
2. Run /install /quiet /norestart
3. Handle exit codes: 0=OK 3010=OK+reboot 1638=newer version already installed
4. Verify via registry (Installed=1) + runtime DLL present
1. Find Basic and ODBC ZIPs in package folder (by wildcard pattern)
2. Skip extraction if ODBC driver already registered (idempotent)
3. Extract Basic ZIP → C:\Oracle\instantclient_21_x64 (or x86)
4. Extract ODBC ZIP → same folder (merges in ODBC files + odbc_install.exe)
5. Run odbc_install.exe from the install directory to register the driver
6. Copy tnsnames.ora + sqlnet.ora into the install directory
7. Add install directory to system PATH (needed for DLL resolution)
8. Set TNS_ADMIN system environment variable
1. Verify setup.exe and .rsp file are present
2. Skip if sqlplus.exe already exists (idempotent)
3. OUI silent install: -silent -waitforcompletion -ignorePrereq
4. Post-install verify: sqlplus.exe exists
5. Create ORACLE_HOME\network\admin\ if missing
6. Copy tnsnames.ora + sqlnet.ora into network\admin\
7. Add ORACLE_HOME\bin to system PATH (x64 only)
| x64 | x86 | |
|---|---|---|
| Registry | HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64 |
HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86 |
| Key DLL | C:\Windows\System32\msvcp140.dll |
C:\Windows\SysWOW64\msvcp140.dll |
| x64 | x86 | |
|---|---|---|
| Install dir | C:\Oracle\instantclient_21_x64\ |
C:\Oracle\instantclient_21_x86\ |
| ODBC registry | HKLM\SOFTWARE\ODBC\ODBCINST.INI\Oracle in instantclient_21_x64 |
HKLM\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\Oracle in instantclient_21_x86 |
| tnsnames.ora | C:\Oracle\instantclient_21_x64\tnsnames.ora |
C:\Oracle\instantclient_21_x86\tnsnames.ora |
| TNS_ADMIN | set to install dir | set to install dir |
| In system PATH | install dir added ✔ | install dir added ✔ |
| x64 | x86 | |
|---|---|---|
| Oracle Home | C:\Oracle\product\21.0.0\client_x64 |
C:\Oracle\product\21.0.0\client_x86 |
| network\admin | …\client_x64\network\admin\ |
…\client_x86\network\admin\ |
| Registry | HKLM\SOFTWARE\Oracle\KEY_OraClient21Home1_x64 |
HKLM\SOFTWARE\WOW6432Node\Oracle\KEY_OraClient21Home1_x86 |
| In system PATH | client_x64\bin added ✔ |
not added (intentional) |
All transcript logs are written to:
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\
VCRedist_x64_Install.log VCRedist_x64_Uninstall.log
VCRedist_x86_Install.log VCRedist_x86_Uninstall.log
OracleODBC_x64_Install.log OracleODBC_x64_Uninstall.log
OracleODBC_x86_Install.log OracleODBC_x86_Uninstall.log
Oracle21c_x64_Install.log Oracle21c_x64_Uninstall.log
Oracle21c_x86_Install.log Oracle21c_x86_Uninstall.log
Oracle OUI logs (full client installer failures): C:\Oracle\cfgtoollogs\
Each ODBC package sets TNS_ADMIN to its own install directory. The last package
to install wins. To avoid ambiguity, point both to a shared folder:
- Edit
$TnsAdminin both ODBC install scripts toC:\Oracle\network\admin - Create that folder in both ODBC package source folders and place your
.orafiles there - Both scripts will then deploy to and read from the same location
ODBC drivers and Oracle tools pick up TNS files based on bitness. To guarantee both use the same file:
- Change
$NetworkAdminin both Oracle Client install scripts toC:\Oracle\network\admin - Uncomment the
TNS_ADMINblock in both scripts - Place identical
tnsnames.ora/sqlnet.orain bothx64\andx86\package folders — both will deploy toC:\Oracle\network\admin\(overwriting each other harmlessly)
Use a single shared TNS_ADMIN = C:\Oracle\network\admin across all four Oracle packages
so every Oracle component reads from the same place regardless of bitness or package type.
After the ODBC driver is installed, applications connect to Oracle databases through a DSN (Data Source Name) — a named connection profile stored in the Windows registry. DSNs appear by name in Excel's "Get Data" dialog, Access linked tables, and any ODBC-aware app.
Always use System DSNs for Intune/enterprise deployments:
| System DSN | User DSN | |
|---|---|---|
| Registry location | HKLM (all users) |
HKCU (current user only) |
| Created by | SYSTEM context script ✔ | Requires user session |
| Visible to all users | ✔ | ✗ |
| Survives user change | ✔ | ✗ |
There are two separate ODBC administrators on every 64-bit Windows machine. Opening the wrong one will show a completely different set of drivers and DSNs.
| Executable | Manages | Use for |
|---|---|---|
C:\Windows\System32\odbcad32.exe |
64-bit drivers & DSNs | Excel x64, Power BI |
C:\Windows\SysWOW64\odbcad32.exe |
32-bit drivers & DSNs | Excel x86, Access |
The Control Panel shortcut and the Windows Search result both open the 64-bit one. To reach the 32-bit administrator, run
C:\Windows\SysWOW64\odbcad32.exeexplicitly.
The registry locations mirror this split:
| Bitness | DSN registry path |
|---|---|
| 64-bit System DSN | HKLM\SOFTWARE\ODBC\ODBC.INI\<DSN_NAME> |
| 32-bit System DSN | HKLM\SOFTWARE\WOW6432Node\ODBC\ODBC.INI\<DSN_NAME> |
- Open the correct ODBC administrator (see table above)
- System DSN tab → Add
- Select
Oracle in instantclient_21_x64(orx86) → Finish - Fill in:
Field Value Data Source Name e.g. OracleDB_PRODDescription optional TNS Service Name the alias from tnsnames.ora, e.g.PRODUser ID leave blank to prompt at connect time - Click Test Connection to verify → OK
Use dsn/Create-OracleDSN.ps1 in this repository. It creates System DSNs for any number
of databases in a single run, for both 64-bit and 32-bit drivers simultaneously.
Configuration — edit the $DSNList block at the top of the script:
$DSNList = @(
@{
Name = 'OracleDB_PROD' # appears in Excel "Get Data" dialog
TNSAlias = 'PROD' # must match an alias in tnsnames.ora
Description = 'Oracle Production Database'
Create64 = $true # create 64-bit DSN (Excel x64, Power BI)
Create86 = $true # create 32-bit DSN (Excel x86, Access)
},
@{
Name = 'OracleDB_TEST'
TNSAlias = 'TEST'
Description = 'Oracle Test Database'
Create64 = $true
Create86 = $true
}
)Deploy as an Intune Platform Script:
Devices > Scripts > Add > Windows 10 and later
| Setting | Value |
|---|---|
| Script file | Create-OracleDSN.ps1 |
| Run this script using the logged on credentials | No (run as System) |
| Run script in 64-bit PowerShell host | Yes |
| Enforce script signature check | No |
Dependency: Assign this script to the same device group after the ODBC driver apps are installed. Use a filter or a delay group tag if needed, or deploy it as a Win32 app with the ODBC packages set as dependencies.
Log file: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\OracleDSN_Create.log
For applications that support it, skip the DSN entirely and use an inline connection string.
This is useful for Power Query / Excel Power Pivot, Python (cx_Oracle), and .NET apps.
EZConnect format (no tnsnames.ora needed):
Driver={Oracle in instantclient_21_x64};DBQ=hostname:1521/SERVICENAME;UID=myuser;PWD=mypassword;
TNS alias format (requires tnsnames.ora + TNS_ADMIN):
Driver={Oracle in instantclient_21_x64};DBQ=PROD;UID=myuser;PWD=mypassword;
Excel "Get Data" → ODBC → Advanced options connection string (no DSN required):
Driver={Oracle in instantclient_21_x64};DBQ=hostname:1521/SERVICENAME;
Use
Oracle in instantclient_21_x86for 32-bit Excel. The driver name must exactly match what is registered — verify it inodbcad32.exeunder Drivers tab.
Run this on a problem machine (as administrator) to get a full picture in one go:
# ── VCRedist ──────────────────────────────────────────────────────────────────
Write-Host "`n--- VCRedist ---"
@('HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64',
'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86') | ForEach-Object {
$p = Get-ItemProperty $_ -EA SilentlyContinue
"$_ → Installed=$($p.Installed) Version=$($p.Version)"
}
# ── ODBC drivers ──────────────────────────────────────────────────────────────
Write-Host "`n--- ODBC Drivers ---"
@('HKLM:\SOFTWARE\ODBC\ODBCINST.INI\Oracle in instantclient_21_x64',
'HKLM:\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\Oracle in instantclient_21_x86') | ForEach-Object {
$p = Get-ItemProperty $_ -EA SilentlyContinue
"$_ → Driver=$($p.Driver)"
}
# ── System DSNs ───────────────────────────────────────────────────────────────
Write-Host "`n--- System DSNs (64-bit) ---"
Get-ChildItem 'HKLM:\SOFTWARE\ODBC\ODBC.INI' -EA SilentlyContinue |
Where-Object { $_.PSChildName -ne 'ODBC Data Sources' } | ForEach-Object {
$p = Get-ItemProperty $_.PSPath -EA SilentlyContinue
"$($_.PSChildName) → DBQ=$($p.DBQ)"
}
Write-Host "`n--- System DSNs (32-bit) ---"
Get-ChildItem 'HKLM:\SOFTWARE\WOW6432Node\ODBC\ODBC.INI' -EA SilentlyContinue |
Where-Object { $_.PSChildName -ne 'ODBC Data Sources' } | ForEach-Object {
$p = Get-ItemProperty $_.PSPath -EA SilentlyContinue
"$($_.PSChildName) → DBQ=$($p.DBQ)"
}
# ── Environment ───────────────────────────────────────────────────────────────
Write-Host "`n--- Environment ---"
"TNS_ADMIN = $([System.Environment]::GetEnvironmentVariable('TNS_ADMIN','Machine'))"
$path = [System.Environment]::GetEnvironmentVariable('PATH','Machine')
$path.Split(';') | Where-Object { $_ -like '*oracle*' -or $_ -like '*instant*' } |
ForEach-Object { "PATH entry: $_" }
# ── Key files ─────────────────────────────────────────────────────────────────
Write-Host "`n--- Key files ---"
@('C:\Oracle\instantclient_21_x64\tnsnames.ora',
'C:\Oracle\instantclient_21_x86\tnsnames.ora',
'C:\Oracle\product\21.0.0\client_x64\network\admin\tnsnames.ora',
'C:\Oracle\product\21.0.0\client_x86\network\admin\tnsnames.ora',
'C:\Oracle\network\admin\tnsnames.ora') | ForEach-Object {
"$_ → $(if (Test-Path $_) { 'EXISTS' } else { 'missing' })"
}Cause: The default 60-minute install timeout is too short for Oracle Client. Fix: In the Intune app → Properties → Program → set Maximum allowed run time to 120 minutes.
- Check that the "Run as 32-bit process" setting on the detection script matches the package:
- x64 packages → No
- x86 packages → Yes
- Run the detection script manually on the client as SYSTEM (use PsExec:
psexec -s powershell.exe) and check its output. - Confirm the registry key or file the detection script checks actually exists on the machine.
Cause: PowerShell execution policy blocking the script.
Fix: Verify the install command includes -ExecutionPolicy Bypass:
powershell.exe -ExecutionPolicy Bypass -File Install-Oracle21c_x64.ps1
The .intunewin content was not extracted correctly, or the setup file name passed to
IntuneWinAppUtil.exe with -s does not match the actual script filename. Repackage
and ensure the -s value exactly matches the PS1 filename including case.
- Check
C:\Oracle\cfgtoollogs\for OUI log files — they contain the exact failure reason. - Check the Intune transcript log:
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Oracle21c_x64_Install.log - Common causes:
Exit code Meaning 1 General OUI error — check cfgtoollogs 4 Prerequisite check failed — -ignorePrereqshould suppress this; verify the flag is in the command6 Prerequisite warning only — treated as success in the script
The Oracle Home directory exists from a previous partial or full install.
The install script skips setup.exe if sqlplus.exe is already present, but if the
directory exists without sqlplus.exe OUI may refuse to install into it.
Fix:
- Run the uninstall script first, or manually delete the Oracle Home directory.
- Also remove the Oracle Inventory entry:
C:\Program Files\Oracle\Inventory\ContentsXML\inventory.xml— delete the<HOME>element for the affected home.
PATH is a system environment variable — running applications inherit the PATH from when they launched. Log off and back on (or restart) after the first Oracle install for PATH changes to take effect in existing user sessions.
- Check the transcript log:
OracleODBC_x64_Install.log - Verify VCRedist is installed first —
odbc_install.exesilently fails without it. - Run
odbc_install.exemanually from the install directory as administrator to see any console output.
- Make sure you are opening the correct ODBC administrator for the driver bitness:
- x64 driver →
C:\Windows\System32\odbcad32.exe - x86 driver →
C:\Windows\SysWOW64\odbcad32.exe
- x64 driver →
- Verify the registry key exists:
# x64 Get-ItemProperty 'HKLM:\SOFTWARE\ODBC\ODBCINST.INI\Oracle in instantclient_21_x64' # x86 Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\Oracle in instantclient_21_x86'
- If the key is missing, re-run
odbc_install.exemanually fromC:\Oracle\instantclient_21_x64\as administrator.
The Basic and ODBC ZIPs must both be present in the package folder. Verify both wildcard patterns match your downloaded filenames:
- x64:
instantclient-basic-windows.x64-21*.zipandinstantclient-odbc-windows.x64-21*.zip - x86:
instantclient-basic-nt-21*.zipandinstantclient-odbc-nt-21*.zip
If filenames differ, rename them to match or update the Get-ChildItem -Filter patterns
in the install script.
- Wrong bitness: Excel 32-bit can only see 32-bit DSNs; Excel 64-bit can only see 64-bit DSNs.
Run
Create-OracleDSN.ps1with bothCreate64 = $trueandCreate86 = $trueto cover both. - User DSN vs System DSN: The script creates System DSNs (HKLM). If a User DSN with
the same name exists in HKCU it may shadow the System DSN for that user.
Check:
Get-ChildItem 'HKCU:\SOFTWARE\ODBC\ODBC.INI'
ORA-12154: TNS: could not resolve the connect identifier specified
This means the TNS alias in the DSN (DBQ value) was not found in tnsnames.ora.
- Confirm
TNS_ADMINpoints to the folder containingtnsnames.ora:[System.Environment]::GetEnvironmentVariable('TNS_ADMIN', 'Machine')
- Confirm the alias in the DSN exactly matches an entry in
tnsnames.ora(case-insensitive, but watch for spaces). - If using EZConnect (
hostname:port/service) inDBQ,tnsnames.orais not needed — verify the hostname and port are reachable. - Test name resolution directly:
(
tnsping PROD
tnspingis available in the full Oracle Client; for Instant Client use a test connection via ODBC administrator.)
The Oracle database listener is not reachable from the client:
- Verify network connectivity:
Test-NetConnection -ComputerName <dbhost> -Port 1521 - Check firewall rules on the client and on the network path to the database server.
- Verify the host and port in
tnsnames.oraare correct.
Credentials are wrong or the account is locked. This is a database-side issue, not a driver or DSN problem. Verify credentials with the DBA.
The DSN name in the Excel connection does not match what is registered, or the DSN was created for the wrong bitness. Steps:
- Open the correct
odbcad32.exefor your Excel bitness and confirm the DSN name is listed exactly. - If missing, re-run
Create-OracleDSN.ps1and checkOracleDSN_Create.log.
Excel only shows drivers matching its own bitness. If no Oracle driver appears:
- Confirm the correct ODBC package (x64 or x86) was installed for this machine's Office bitness.
- Check the driver registration (see Driver not visible in ODBC Administrator above).
- Restart Excel after driver installation — it caches the driver list at launch.
This is expected ODBC behaviour. To avoid it:
- Use Windows Authentication if your Oracle DB supports it (requires additional Oracle config).
- Or save the workbook as a trusted document and tick "Save password" in the connection wizard (note: password is stored obfuscated, not encrypted — evaluate your security policy first).