Reports on Windows Ignores TNS_ADMIN Value if set other than ORACLE_INSTANCE\config
Reports on Windows Ignores TNS_ADMIN Value if set other than ORACLE_INSTANCE\config
Titleimage
Posted by Patrick Hamou on 2017:09:20 01:08:04
APPLIES TO: Oracle Reports Developer
Oracle Reports Developer - Version 11.1 to 11.1 [Release 11g]
Generic Windows
SYMPTOMS: REP-501, ORA-12154
On : 11.1.1.1.0 version, reports
OS: Windows
When attempting to Configure TNS_ADMIN other than ORACLE_INSTANCE\config directory the following error occurs.
Error:
REP-501 UNABLE TO CONNECT TO SPECIFIED DATABASE
ORA-12154 TNS:COULD NOT RESOLVE THE CONNECT IDENTIFIER SPECIFIED
- On the same instance sqlplus or Forms works fine. Problem only with reports.
CAUSE
The issue is caused by the following setup:
- When Clicking on 'start reports builder' on the start menu or starting report server, rwbuilder.bat / rwserver.bat is invoked and in turn it calls reports.bat
- reports.bat has the following line in it.
set TNS_ADMIN=ORACLE_INSTANCE\config
Hence it will override the global setting for TNS_ADMIN
SOLUTION
1. Edit the ORACLE_INSTANCE\config\reports\bin\reports.bat
2. Locate following line and modify it to reflect the correct directory for TNS_ADMIN variable
set TNS_ADMIN=%ORACLE_INSTANCE%\config
Note: If the TNS_ADMIN variable is set at the system environment, just commenting out this line will be sufficient.
3. Save the file and restart the report builder/server.
4. You will be able to connect using TNS_ADMIN configured outside "%ORACLE_INSTANCE%\config"
Posted by Patrick Hamou on 2017:09:20 01:08:04