Check your connect string in forms with tnsnames.ora in $ORACLE_INSTANCE/config.
Use sqlplus or tnsping in your Forms/Reports installation to check db connections.
Ensure correct configuration settings are made in the file
then try again...
If problem persists let me have a look at you tns config file
I never changed settings in tnsnames.ora, it is always as per default settings. If required now then let me know.
Please note that when I connect my form builder with databases, it is connected. But when I run my form it again show same error and open a dialog box for
username,password & databases connection string.
I copied this file into "E:\Oracle\Middleware\asinst_1\config" of form.
Below is my tnsnames.ora file;
# tnsnames.ora Network Configuration File: E:\app\admin\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(SID = CLRExtProc)
(PRESENTATION = RO)
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
Check that 'orcl' is the connection string you are using
In the $home/oracle/.batch_profile
Check for the TNS_ADMIN Configuration...
Check your database connections using tnsping so that you have correct tns configuration and a listener at the specified ip address.
The Below threads will be helpful for you,