Home » Developer & Programmer » Forms » Getting ORA-12154: TNS error when running a form (Oracle Forms 11g, Oracle client 11g, Windows server 2008 R2)
Getting ORA-12154: TNS error when running a form [message #605309] Wed, 08 January 2014 10:40 Go to next message
rock_oradev
Messages: 8
Registered: November 2013
Location: Boston
Junior Member
Hi,

I have installed Oracle Forms 11g on Windows Server 2008 R2. Also, Oracle client 11g was installed on the same server.
There is connectivity between the forms and database.

Forms are getting compiled, but when I run the form I am getting the following error:

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

tnsnames.ora is in Oracle forms home/config
TNS_ADMIN entry and path is there under system environment variables

Can anyone please help me fixing this?

Thanks,
Rakesh

Re: Getting ORA-12154: TNS error when running a form [message #605315 is a reply to message #605309] Wed, 08 January 2014 12:16 Go to previous messageGo to next message
mughals_king
Messages: 390
Registered: January 2012
Location: pakistan
Senior Member
add TNS_ADMIN in your registry and give it this value.

HKEY_LOCAL_MACHINE->Software->OracleHome->RightClick NEW->StringValue and name it TNS_ADMIN

C:\oracle\fmw11g\asinst_1\config )

make sure that it is reading from the right directory.

Regard
Mughal

[Updated on: Wed, 08 January 2014 12:18]

Report message to a moderator

Re: Getting ORA-12154: TNS error when running a form [message #605335 is a reply to message #605315] Wed, 08 January 2014 14:06 Go to previous messageGo to next message
Littlefoot
Messages: 19884
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So that I wouldn't have to repeat myself, have a look at this recent discussion. Pay attention to a link I posted, which explains how to properly use TNS_ADMIN.
Re: Getting ORA-12154: TNS error when running a form [message #605367 is a reply to message #605309] Wed, 08 January 2014 22:29 Go to previous messageGo to next message
rock_oradev
Messages: 8
Registered: November 2013
Location: Boston
Junior Member
Thanks mughals_king & Littlefoot for replying. But my case is different.

I have the connectivity to the database from forms. I am able to compile the forms. But, when I run the form I am getting this error: ORA-12154: TNS:could not resolve the connect identifier specified.

I have placed the tnsnames.ora file in both the locations:
1) C:\oracle\fmw11g\asinst_1\config
2) C:\oracle\fmw11g\asinst_1\network\admin
Added TNS_ADMIN entry in the environment system variables.


Do I need to modify any other config files to get this fixed?

Thanks in advance!

[Updated on: Thu, 09 January 2014 08:32] by Moderator

Report message to a moderator

Re: Getting ORA-12154: TNS error when running a form [message #605368 is a reply to message #605367] Wed, 08 January 2014 22:59 Go to previous messageGo to next message
rock_oradev
Messages: 8
Registered: November 2013
Location: Boston
Junior Member
FYI.. I am migrating 10g forms to 11g
Re: Getting ORA-12154: TNS error when running a form [message #605380 is a reply to message #605368] Thu, 09 January 2014 01:00 Go to previous messageGo to next message
ranamirfan
Messages: 529
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Quote:

I have placed the tnsnames.ora file in both the locations:
1) C:\oracle\fmw11g\asinst_1\config
2) C:\oracle\fmw11g\asinst_1\network\admin
Added TNS_ADMIN entry in the environment system variables.


These Location where you pasted tnsnames.ora its ok.

For me its working fine.Please see screenshot.

./fa/11589/0/

Please check tnsnames.ora file.Change HOST & SERVICE_NAME then tnsnames.ora should be as above.

Regards,
Irfan
  • Attachment: tns.png
    (Size: 42.26KB, Downloaded 828 times)
Re: Getting ORA-12154: TNS error when running a form [message #605414 is a reply to message #605367] Thu, 09 January 2014 03:45 Go to previous messageGo to next message
Littlefoot
Messages: 19884
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
rock_oradev

... when I run the form I am getting this error: ORA-12154: TNS:could not resolve the connect identifier specified.


When exactly do you get this error? Immediately when you run it, of after performing certain action (such as pushing a button, opening list of values, ...)?

Do you, in this form, use a database (DB) link reference? If so, did DB link become invalid?
Re: Getting ORA-12154: TNS error when running a form [message #605463 is a reply to message #605414] Thu, 09 January 2014 10:02 Go to previous messageGo to next message
rock_oradev
Messages: 8
Registered: November 2013
Location: Boston
Junior Member
No, there are no DB links used in the form.

I am getting this error when I click on 'Run Form' icon on the toolbar.

In Forms Builder, once the form is compiled successfully. I am clicking on 'Run Form', its taking me to the IE browser window...i can see the java application loading...after that i am seeing this error.

I am not performing any action in the form... am running the form immediately after compiling.
Re: Getting ORA-12154: TNS error when running a form [message #605485 is a reply to message #605463] Thu, 09 January 2014 15:49 Go to previous messageGo to next message
Littlefoot
Messages: 19884
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is there PRE-FORM and/or WHEN-NEW-FORM-INSTANCE trigger in your form? If so, what do they do? If they don't exist, create WHEN-NEW-FORM-INSTANCE trigger, put a dummy
null;
in it, set a breakpoint to that line, recompile the form (Ctrl + Shift + K) and run the form in debug mode. Maybe you'll get some additional information from the debugger.
Re: Getting ORA-12154: TNS error when running a form [message #605494 is a reply to message #605485] Thu, 09 January 2014 22:51 Go to previous message
rock_oradev
Messages: 8
Registered: November 2013
Location: Boston
Junior Member
I am able to run the form now. TNS_ADMIN entry in default.env was wrong. Corrected it.

Thanks all Smile

[Updated on: Thu, 09 January 2014 22:52]

Report message to a moderator

Previous Topic: ora_ffi.find_library/load_library cannot find/open USER32.DLL
Next Topic: Wrong Updation in When-Validate-Trigger
Goto Forum:
  


Current Time: Thu Dec 18 11:24:19 CST 2014

Total time taken to generate the page: 0.11824 seconds