logo
search
Excel Error Codes

How to Troubleshoot ORA-12154 Error in Excel ODBC Connections

Bushra ParveenBushra Parveen Oct 21, 2026 868 views

Question details

The user needs to diagnose and fix the ORA-12154 error occurring during an Oracle database connection refresh in Excel 365 using a 64-bit ODBC driver.

How to Fix ORA-12154 Error in Excel 365 ODBC Connections
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
Refreshing or establishing data connections to an Oracle database through a 64-bit ODBC driver and TNS configuration in Excel.
Observed behavior
Excel throws an ORA-12154 error (TNS:could not resolve the connect identifier specified), preventing the database connection from completing successfully.
Before you start

Ensure you have administrator privileges on your computer to access system environment variables and the Oracle installation directories, specifically the folder containing your tnsnames.ora file.

Solution 1Recommended

Match Excel and Oracle Client Architecture

Ensure both Excel 365 and the installed Oracle Client are running on the same 64-bit architecture to prevent ODBC driver mismatches.

Database connections often fail if the bit-version of the host application (Excel) does not match the bit-version of the installed database driver. If you are using 64-bit Excel, you must use a 64-bit Oracle ODBC driver.

1
Check Excel Bitness

Open Excel, navigate to File > Account > About Excel, and verify that the application is listed as 64-bit.

2
Verify Oracle Client Architecture

Ensure you have installed the 64-bit version of the Oracle Data Access Components (ODAC) or the full Oracle Client on your machine.

3
Configure 64-bit ODBC

Press the Windows key, search for 'ODBC Data Sources (64-bit)', and open the tool. Ensure your Oracle DSN is correctly configured under the System DSN tab using the 64-bit Oracle driver.

Match Excel and Oracle Client Architecture
Data Source Architecture: If you mistakenly configure your connection in the 32-bit ODBC Data Source Administrator, a 64-bit instance of Excel will not be able to interact with it.
Free Microsoft Office alternative

Experience Seamless Data Processing with WPS Office

If complex database connection errors in Microsoft Excel are slowing down your workflow, consider trying WPS Office. It provides a lightweight, highly compatible, and user-friendly spreadsheet environment that seamlessly handles Microsoft Office data formats.

  1. 1. Download WPS Office: Visit the official WPS website and click the free download button to get the installer.
  2. 2. Install the Software: Run the downloaded executable file and follow the straightforward on-screen instructions to complete the installation.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing .xlsx or .csv files to immediately resume your data analysis.
Full compatibility with Microsoft Excel (.xlsx, .xls, .csv) formats without data loss.Lightweight installation and low system resource consumption for fast data handling.Familiar spreadsheet interface that requires zero learning curve for Excel users.Free alternative to expensive Office 365 subscriptions.
microsoft office alternative - wps office

Frequently Asked Questions

What does the ORA-12154 error mean?

The ORA-12154 error, which reads 'TNS:could not resolve the connect identifier specified', means the Oracle client cannot find the database connection alias you provided in your tnsnames.ora file or LDAP directory. The system does not know how to translate the alias into a host IP and port.

Can I use a 32-bit Oracle client with 64-bit Excel?

No, the bit version of your ODBC driver and Oracle client must exactly match the architecture of your Excel application. If you are using 64-bit Excel, you must install and configure the 64-bit Oracle client.

Where is the tnsnames.ora file usually located?

By default, the tnsnames.ora file is typically found in the Oracle installation directory under the `network\admin` folder (for example, `C:\app\client\product\12.2.0\client_1\network\admin`). This location can be explicitly overridden by setting a TNS_ADMIN environment variable in Windows.