TNS problem & TNS admin method (merged) [message #341856] |
Wed, 20 August 2008 10:40 |
Apps11i
Messages: 14 Registered: August 2008
|
Junior Member |
|
|
Hi, I am new to forms and creating a new form for the first time.
when i try connecting to the data base it is giving me the below error message.
ORA-12154: TNS Could not resolve service name.
for the same database i am able to connect using sqlplus, toad and other sql tools.
can anyone please guide me to resolve this. litl urgent it is.
thank you in advance,
Kiran
|
|
|
|
Re: TNS problem [message #341944 is a reply to message #341869] |
Wed, 20 August 2008 16:13 |
Apps11i
Messages: 14 Registered: August 2008
|
Junior Member |
|
|
TNS Names there in both the oracle_home and still having the same issue. let me know is there any other way to resolve this issue.
thanx,
Kiran
|
|
|
|
Re: TNS problem [message #342514 is a reply to message #342007] |
Fri, 22 August 2008 10:34 |
Apps11i
Messages: 14 Registered: August 2008
|
Junior Member |
|
|
Hello David,
Even i tried with the same possibility, but no luck.
can you guide me to resolve this issue please.
|
|
|
|
|
|
Re: TNS problem [message #376444 is a reply to message #344707] |
Wed, 17 December 2008 06:28 |
jaccyboy
Messages: 19 Registered: December 2008
|
Junior Member |
|
|
I'm having the same problems and I can't find the tns admin method on this forum.
Does anyone have a link or could explain it to me?
I'd be really grateful.
Thank you
Jack Silvestro
|
|
|
TNS admin method [message #376454 is a reply to message #341856] |
Wed, 17 December 2008 07:02 |
jaccyboy
Messages: 19 Registered: December 2008
|
Junior Member |
|
|
I've seen this mentioned in a few posts here.
Anyone have a link to this?
Or could anyone please explain it to me?
Thank you
Jack
|
|
|
|
|
Re: TNS admin method [message #376523 is a reply to message #376486] |
Wed, 17 December 2008 12:45 |
|
Littlefoot
Messages: 21808 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It is the (operating system) environment variable. Therefore, you don't set it in SQL*Plus but at the operating system command line prompt.
Why do we use it?
There may be different Oracle products installed on the same computer. For example, Oracle database 9i, Oracle database 10g, Oracle Express Edition 10g, Oracle Developer Suite 6i, Oracle Developer Suite 10g. Each of these products contains its own "Oracle_Home\network\admin" directory which is the location of the TNSNAMES.ORA file. In this example, there would be 5 (five!) different TNSNAMES.ORA files, which contain aliases to databases you use.
So, every time you have a need to connect to a new database, you have to edit the TNSNAMES.ORA file. Not one, but all five of them! Otherwise, the product whose TNSNAMES.ORA file remained unmodified will not be able to connect to this database.
Therefore, a logical question is: why would you want to do that? It's pure suffering! Why wouldn't you, instead, maintain only one TNSNAMES.ORA file copy?!?
TNS_ADMIN environment variable enables you to do that - take any of the TNSNAMES.ORA files and put it into a directory which is easily accessible. I, for example, chose "c:\0_library" and let the TNS_ADMIN environment variable point to this directory.
The rest is easy ... you don't have to worry and browse through the directory tree, but simply maintain a single TNSNAMES.ORA file.
Finally, an example: on MS Windows, you'd do that as following:c:\temp>set tns_admin=c:\0_library
c:\temp> In order to check its value, issuec:\temp>set tns_admin
tns_admin=c:\0_library
c:\temp> Finally, if you want to delete it, here's the how to:c:\temp>set tns_admin=
c:\temp>set tns_admin
Environment variable tns_admin not defined
c:\temp>
Other operating systems most probably use different commands (but that's the question which doesn't have much to do with Oracle itself).
Lengthy answer, but I hope you got the picture. If not, Google is (still) your friend.
|
|
|
|
|
|
Re: TNS problem & TNS admin method (merged) [message #381015 is a reply to message #341856] |
Wed, 14 January 2009 18:15 |
jaccyboy
Messages: 19 Registered: December 2008
|
Junior Member |
|
|
sorry to ask again.
i changed what i had to at the command prompt and it worked ok.
what should i do then with both the tnsora files in both the database and the dev suite?
i renamed the one in dev suite and it wouldnt work at all for me.
thanks
|
|
|
|
Re: TNS problem & TNS admin method (merged) [message #381068 is a reply to message #341856] |
Thu, 15 January 2009 02:40 |
jaccyboy
Messages: 19 Registered: December 2008
|
Junior Member |
|
|
hello,
I just put this into the command prompt:
c:\temp>set tns_admin=c:\0_library
c:\temp>
and checked it.
I dont really know how to point it to a tnsnames file.
my database one it here:
C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
and the dev suite one is here:
C:\DevSuiteHome_1\NETWORK\ADMIN
what should I do?
thanks once again
|
|
|
Re: TNS problem & TNS admin method (merged) [message #381076 is a reply to message #381068] |
Thu, 15 January 2009 03:06 |
|
Littlefoot
Messages: 21808 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
To make it simpler, I'll keep to the previous notation.
- First, you have to create a directory whose name is "0_library", which is on a "C" disk.
- Then you'll have to copy one of TNSNAMES.ORA files into that directory
- Now it makes sense to point the TNS_ADMIN environment variable to the "c:\0_library" directory because, if it doesn't exist or if it is empty, the whole TNS_ADMIN story doesn't make any sense
- When necessary, maintain this TNSNAMES.ORA file; the rest of them (which are in their \network\admin directories) should be renamed into, for example, TNSNAMES_OLD.ORA.
|
|
|
|
Re: TNS problem & TNS admin method (merged) [message #381100 is a reply to message #341856] |
Thu, 15 January 2009 04:23 |
jaccyboy
Messages: 19 Registered: December 2008
|
Junior Member |
|
|
finally got a page to open but still doesnt work for me.
thanks for your help everyone but im just gonna give up on oracle.
why dont they make the whole database and developer come as one package so there wouldnt be any problem with 2 tnsnames files in seperate places?
|
|
|
Re: TNS problem & TNS admin method (merged) [message #381219 is a reply to message #381100] |
Thu, 15 January 2009 20:46 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Because when you add three or four other Oracle products or versions you would have even more copies of the 'tnsnames.ora' and they (Oracle) can't cater to all combinations of products. You just have to learn to handle them.
I suggest deleting ALL the Oracle products on your PC by deleting the Oracle directory. Go into the registry and delete the Oracle branch there as well. (Search this forum for the location.) Then install the database, prove that is works by using SQL*Plus, create the 'tns_admin' environment variable, then install oracle Developer IN A NEW HOME.
David
|
|
|