IBM Support

Setting the TNS_ADMIN environment variable for RequisitePro, when multiple Oracle client versions are installed

Question & Answer


Question

This technote identifies how to set the TNS_ADMIN environment variable for use with IBM® Rational® RequisitePro® (ReqPro) to point to a specific TNSNAMES.ORA file when multiple Oracle client versions are installed.

Answer

Some system configurations include multiple versions of the Oracle client software. In these types of configurations there is usually more than one TNSNAMES.ORA file on the system. Having multiple TNSNAMES.ORA files on a system could cause unexpected (ORA-12154: TNS: could not resolve service name or SQL*NET Unable to resolve service name ) errors even though a valid service name exists in one of the TNSNAMES.ORA files on the system. These errors are seen when trying to create new or open existing RequisitePro projects that use an Oracle back-end database.

If more than one TNSNAMES.ORA file exists on a system, the errors outlined above may occur because the TNSNAMES.ORA file that is being used by Oracle is not the one that includes the service name for the database you are attempting to connect to. Setting the TNS_ADMIN environment variable to point to the location of a particular TNSNAMES.ORA file will ensure that file is used when Oracle attempts to resolve service names.

Setting the TNS_ADMIN environment variable on a Microsoft® Windows® 2000 and 2003 system:

  1. On the desktop Right-click on My Computer and select Properties > Advanced tab
  2. Click the Environment Variables button.
  3. In the System variables section click the New button
  4. Enter a variable name of TNS_ADMIN then enter a variable value of the path to the TNSNAMES.ORA file that will be used as the default.
    For example:

    Variable Name     TNS_ADMIN
    Variable Value     C:\Oracle\Ora8i\Network\Admin


  5. Click OK
  6. Reboot the machine for the changes to take effect.

Setting the TNS_ADMIN environment variable on a Microsoft Windows NT® system:
  1. On the desktop Right-click on My Computer and select Properties > Environment tab
  2. Scroll to the end of the list of System environment variables and click the mouse right below the last entry
  3. Enter a variable name of TNS_ADMIN and a variable value of the path to the TNSNAMES.ORA file that will be used as the default.
  4. Click OK
  5. Reboot the machine for the changes to take effect.

[{"Product":{"code":"SSSHCT","label":"Rational RequisitePro"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database: Oracle","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;2003.06.10;2003.06.12;2003.06.13;2003.06.14;2003.06.16;7.0;7.0.0.1;7.0.1;7.1;7.1.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

150800706

Document Information

Modified date:
16 June 2018

UID

swg21131629