---
title: Reports on Windows Ignores TNS_ADMIN Value if set other than ORACLE_INSTANCE\config
description: How to fix the error occurring when reports on Windows Ignores TNS_ADMIN Value if set other than ORACLE_INSTANCE\config.
url: https://renaps.com/en/blog/forms-and-java/reports-on-windows-ignores-tnsadmin-value-if-set-other-than-oracleinstanceconfig
language: en
translations:
  fr: https://renaps.com/fr/blog/forms-and-java/reports-on-windows-ignores-tnsadmin-value-if-set-other-than-oracleinstanceconfig
date: 2017-09-19
updated: 2026-01-17
author: Patrick Hamou
tags:
- Oracle Reports
- Oracle Net
- Microsoft Windows
- Error Messages
---

# Reports on Windows Ignores TNS_ADMIN Value if set other than ORACLE_INSTANCE\config

## 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"
