Solved

tnsnames.org set up

Posted on 2010-09-20
5
1,477 Views
Last Modified: 2012-06-27
this is actually from another thread, but, got off topic...below question is one response from sumit2906:
----------
ok, working on figuring out how to fill in tnsnames.ora. Doesn't seem like devleoper connection info maps to the tns:
developer connection info is:
Connection Name: Tst Srvr1 (that's just an alias, right?)
user: xxx
password: xxx
role: default, connection type: LDAP, OS Authentication Kerberow Auth. and Proxy Conn. not checked
LDAP Server: oid.xxx.com:123:456   (not sure what this is)
DB Service: POST.xxx.com  (not sure what this is)

So, need to fill in tnsnames.ora
(ADDRESS = (PROTOCOL = TCP)     ---leave that as is?
(HOST = <hostname or IP>)   ---will oid.xxx.com:123:456 work?
(PORT = <port>)   ---no clue here
not sure on the following, except service might be POST.xxx.com
(CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = <database service name>)

then, does it matter wher this file is saved?
------------------
In your case, it will be like this:
tstsrvr1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname or IP>)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = POST.xxx.com)
    )
  )

you should be able to ping the hostname or IP, the default port is 1521, it could be different.
Also, the file location is fixed, it is under oracle_home\network\admin directory. You can also use command tnsping test to see where is it expecting the file.

The best way is to take the tns entry from your server machine, and use it.

Also, this is not a related question, so better to open a new question, that way you will get more responses.
0
Comment
Question by:avoorheis
  • 3
5 Comments
 

Author Comment

by:avoorheis
ID: 33717839
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 200 total points
ID: 33718150
>>The best way is to take the tns entry from your server machine, and use it.

Just copy it over.
0
 
LVL 10

Accepted Solution

by:
ravindran_eee earned 300 total points
ID: 33718171
Your initial requirement was to identify methods to get data from a remote Oracle database server. One of the options is to use SQL Plus. Now you can connect to the DB using SQL Developer, but not SQL plus. SQL Developer uses LDAP authentication. Is that correct?

Please find instructions for setting up LDAP authentication.

http://www.orafaq.com/wiki/Ldap.ora

You can get values for the parameters from SQL developer. Let me know if there are any questions!
0
 

Author Comment

by:avoorheis
ID: 33720691
yes, I can connect from SQL Developer, but, not SQL plus and the Developer is using LDAP.

I got a copy of the tnsnames.ora and saved to
D:\Oracle\app\voorheis\product\11.2.0\client_1\Network\Admin
followed directions on http://www.orafaq.com/wiki/Ldap.ora and used the info from the working connection in sql developer, but, am not able to connect from sql plus (or to create a odbc connection, seems like the problem in both is related to the tnsname file...one thing that is strange is when configuring the odbc connection, the tns service name drop down contains garbage characters).
0
 

Author Comment

by:avoorheis
ID: 33734544
thanks for the help guys...there were a couple of things, I had only installed the instant client and needed the admin version, there was a problem with the tnsnames file and a few typos on my part. However, both suggestions were helpful.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to take different types of Oracle backups using RMAN.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question