Configure TNS_ADMIN variable for Oracle Reports 12c

Posted by Dirk Nachbar on Wednesday, October 05, 2016 with No comments
In many case you struggle with the location of the tnsnames.ora file under Oracle Reports 12c. The default location for the tnsnames.ora is placed within your WebLogic Domain Home directory $DOMAIN_HOME/config/fmwconfig/tnsnames.ora

But in many case you have already a defined TNS_ADMIN variable which is pointing to a central location, e.g. $ORACLE_BASE/network/admin and maintaining various copies of a tnsnames.ora is not really useful and will cause various problems.

In order to instruct your Oracle Reports Server to use your central location for the tnsnames.ora simply add the necessary variable TNS_ADMIN in the provided script under your $DOMAIN_HOME/reports/bin directory:

# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
# Add Variable TNS_ADMIN and align to your location
export TNS_ADMIN


. ${DOMAIN_HOME}/reports/bin/

exec nohup $ORACLE_HOME/bin/rwserver "$@" | tee -a reports.log

After you have done the above changes, restart your Oracle Reports Server with follwoing commands:

./ <your_Reports_Server_Name>
./ <your_Reports_Server_Name> 

Finally validate with the rwservlet command showenv, if the TNS_ADMIN variable is correctly assigned to your Reports Server, http://<servername>:<port>/reports/rwservlet/showenv?server=<Your_Reports_Server_Name>

Under the section "Oracle Reports Services - Server and Engine Environment Variables" you can see the definition of your TNS_ADMIN variable: