Oracle6i Forms/Reports Builder Cannot Connect To Any Database (ORA-12222) TNS No Such Protocol adaptor …..

Applies to:

Oracle Net Services – Version: 8.0.6.0.0 to 8.0.6.3.0 Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows Server 2003

Symptoms

– Problem Statement: Oracle Forms6i Builder: 6.0.8.11.3 on Microsoft Windows XP.

Server: Oracle10g R2 (10.2.0.3.0)

When trying to connect to any database instance using Oracle6i Forms displays the following error:

ORA-12222: TNS:No such protocol adapter

There are no problems connecting to the database from SqlPlus, TOAD, etc that use the same tnsnames.ora file entries.

Problem reported with any/all Net Service Name/aliases.

Cause

The ORA-12222 error is due to the ORACLE_HOME System environment variable being explicitly set to one of the installed Oracle Home locations causing the Oracle Forms/Reports products to look for supporting DLLs in the wrong path location.

When using multiple Oracle Homes on Windows platforms, the ORACLE_HOME variable should not be explicitly set in either the User or System Environment Variables.

To verify if the ORACLE_HOME variable is set in either the User or System Environment Variables:

– Right click My Computer from the Windows Desktop. – Select ‘Properties’. – Then click the ‘Advanced’ tab. – Next select the ‘Environment Variables’ button. – Search for the ORACLE_HOME variable in either the User or System Environment Variables sections.

Solution

– To implement the solution, please execute the following steps:

– Right click My Computer from the Windows Desktop. – Select ‘Properties’. – Then click the ‘Advanced’ tab. – Next select the ‘Environment Variables’ button. – Search for the ORACLE_HOME variable in either the User or System Environment Variables sections. – If found, highlight/select the ORACLE_HOME variable and delete it using the ‘Delete’ button below the corresponding windowpane.

Important: On Windows 2003 Servers it is also important to cleanly reboot the Windows Server to clear the ORACLE_HOME variable.