Skip to Main Content
  • Questions
  • TNS Issues when connecting to database with Forms Builder


Question and Answer

Connor McDonald

Thanks for the question, Gary.

Asked: March 19, 2017 - 7:03 am UTC

Last updated: October 06, 2020 - 6:43 am UTC


Viewed 10K+ times! This question is

You Asked

I am getting the following issue when trying to connect to the database with Oracle Forms Builder (

ORA-12154: TNS: Could not resolve the connect identifier specified.

I am using:

username: hr
password: hrpassword
database: pdborcl

giving a connect identifier of hr/hrpassword@pdborcl.

I can connect with sqlplus and sqldeveloper without issue, and tnsping can also see the database. The TNSNAMES.ORA details are shown below.

Does anyone have any idea where I can view the log files or have any ideas what the issue might be?

Thanks for any help.


# tnsnames.ora Network Configuration File: C:\Oracle12c\DB\Oracle_Home\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

(SID = CLRExtProc)

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(SERVICE_NAME = pdborcl)

and Connor said...

I suspect your Forms installation is in a different ORACLE_HOME to your database ?

It is in the *Forms* ORACLE_HOME that you will need contain entries in the tnsnames.ora file.

So perhaps copy the DB $ORACLE_HOME/network/admin/tnsnames.ora to the Forms $ORACLE_HOME/network/admin/tnsnames.ora


  (11 ratings)

Is this answer out of date? If it is, please let us know via a Comment


Thanks for the swift reply....

Gary Fletcher, March 19, 2017 - 9:21 am UTC

You are right both have seperate ORACLE_HOME(s)...unfortunately both tnsnames.ora files are the identical.

Does anyone know where the log files will reside so I could look at the actual connect string being used.
Connor McDonald
March 22, 2017 - 1:46 am UTC

If you do:

tnsping TARGET

then you'll see what information (if any) is being used to reach the database, eg

C:\temp\log_sales>tnsping db122

TNS Ping Utility for 64-bit Windows: Version - Production on 22-MAR-2017 09:45:06

Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = db122)))

If you're not even seeing that, then you might be missing a tnsnames.ora file in the *Forms* ORACLE_HOME

Muhammad Riaz, March 19, 2017 - 11:14 am UTC

Please also check the contents of sqlnet.ora in both homes. Also run the SQL*Plus from Forms Home and try to connect using the TNS Name you have given above and check the results.

Running sqlplus...

Gary Fletcher, March 19, 2017 - 4:33 pm UTC


C:\Oracle12c\Middleware\Oracle_Home\bin\sqlplus.exe hr/hrpassword@pdborcl

gave the same TNS error message:

ORA-12154: TNS:could not resolve the connect identifier specified

and tnsping also fails:

C:\Users\fleck>C:\Oracle12c\Middleware\Oracle_Home\bin\tnsping.exe pdborcl

TNS Ping Utility for 64-bit Windows: Version - Production on 19-MAR-2017 16:27:47

Copyright (c) 1997, 2011, Oracle. All rights reserved.

Used parameter files:

TNS-03505: Failed to resolve name

BUT both the DB $ORACLE_HOME\network\admin\sqlnet.ora and the Forms $ORACLE_HOME\network\admin\sqlnet.ora are the same:



Anymore ideas?


Gary Fletcher, March 20, 2017 - 7:40 am UTC

The tnsnames.ora file is under the forms domain fmwconfig folder. I am on windows 10 and this is under:


Where C:\Oracle12c\Middleware\FRS\Forms\Domain is where I configured my Forms domain.

All installations (unix/Linux/Windows) will have similar setups but differing directory/folder names.

Thanks for your help in looking

Muhammad Riaz, March 20, 2017 - 7:42 am UTC

Is it possible for your do the following and then try?

- Remove the TNS Entry from TNSNAMES.ORA of Forms home
- Add the TNS Entry using Net Manager (being run from Forms Home)

Unable to run forms

Gary Fletcher, March 22, 2017 - 5:36 pm UTC

Hi All

Resolved my TNS issue but no I am unable to run forms from within my recently installed/configured Forms Builder application. I am simply choosing Program->Run Form from the toolbar. The form seems to starts to deploy, A message appears in the browser top right - ORACLE FORMS. This then disappears and is replaced by a blank browser screen. What am I missing? Please help.

Oracle Version :

DB Oracle Home : C:\Oracle12c\DB\Oracle_Home
FMW Oracle Home : C:\Oracle12c\Middleware\Oracle_Home
FRS Domain : C:\Oracle12c\Middleware\FRS\Forms\Domain
Forms Home : C:\Oracle12c\DB\Oracle_Home\forms
fmwconfig/TNS_ADMIN : C:\Oracle12c\Middleware\FRS\Forms\Domain\config\fmwconfig
WLS_SERVER config : C:\Oracle12c\Middleware\FRS\Forms\Domain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.2.1\config

I am starting the various node manager and weblogic servers in the following order:

C:\Oracle12c\Middleware\FRS\Forms\Domain\bin\startNodeManager.cmd - Node Manager
C:\Oracle12c\Middleware\FRS\Forms\Domain\bin\startWeblogic.cmd - AdminServer Server
C:\Oracle12c\Middleware\FRS\Forms\Domain\bin\startManagedWeblogic WLS_FORMS - WLS_FORMS Server

I have set the web browser to chrome and also tried firefox but with same results, and set the run time Application Server URL to http://LAPTOP-9R3NTMTP:9001/forms/frmservlet I have tried both test.fmx and mysimpleform.fmx in both the Application Server URL ( http://LAPTOP-9R3NTMTP:9001/forms/frmservlet?form=test.fmx/mysimpleform.fmx ) and by setting the form parameter in the formsweb.cfg config file (form=test.fmx/mysimpleform.fmx), and added my FMX directory to the FORMS_PATH environment variable in default.env.

What am I missing guys? Any help would be greatly appreciated. I've been trying to look for log files to see if I can see exactly what is being sent to OHS, but am not able to find any (must not be looking in the right places).
Connor McDonald
March 23, 2017 - 3:37 am UTC

You config might be fine - it might be your browser.

Take a read here - its about running Java in Forms in Browsers, and how things are changing


Gary Fletcher, March 23, 2017 - 9:13 am UTC

Yes it was a browser issue.

I have resolved it using IE11 with the Java Plugin, as later browsers don't support it. I'll have to get used to using Java Web Start to enable use with all browsers.

Thanks for looking into this and giving great advice.
Connor McDonald
March 25, 2017 - 3:49 am UTC

glad we could help

TNSNAMES issue in R12

A reader, July 11, 2018 - 10:54 am UTC

C:\temp\log_sales>tnsping db122 . This tnsping command helped me to resolve my issue.

You saved me

Mohamed Faramawy, September 05, 2018 - 3:37 pm UTC

Thanks too much You saved me , After working of days I could find your trick.
I copied tnsnames.ORA from DB to Forms home
Thanks too much.
Connor McDonald
September 06, 2018 - 1:07 am UTC

glad we could help

A reader, March 03, 2020 - 7:35 pm UTC

Oracle Form Connect to Oracle Database

Manish, October 02, 2020 - 2:47 am UTC

Hi, I am not able to connect from Oracle Form to oracle Database. Both forms and database are on my machine. I have copied all 3 ora files from db to oracle form.
Form version - Oracleform 12c
DB - Oracle Database 18c Express Edition Release

Getting error - ORA-12154: TNS: Could not resolve the connect identifier specified.

Would be great if someone can give advise?
Connor McDonald
October 06, 2020 - 6:43 am UTC

Unix or Windows ?

More to Explore


Need more information on Multitenant? Check out the Multitenant docs for the Oracle Database