EA3 - show path to tnsnames.ora on connection panel?
If you select the TNS connection type, you are presented with the network alias and
connection identifier entries.
Just below this, could you add the path to the tnsnames file that is currently being used?
That would be an excellent troubleshooting tool for somebody that might be picking up
a nonstandard tns file.
Oh, and a button that pops up "didn't we tell you you'd be causing trouble for yourself by insisting on maintaining your own tns file?" would be nice.
Until we add it you can do this for now:
1) open any worksheet
2) enter this:
setloglevel oracle.dbtools.raptor.utils ALL
3) Run Script
This just sets the java.util.logging level for this class so you don't get all the noise of turning on debug for everything.
4) open the connection dialog.
This will give you in the Log window exactly what and where it's checking for tnsnames.xxx
the set
-kris
Similar Messages
-
TNS_ADMIN (path to tnsnames.ora) using Instant Client IGNORED
Hi,
I developed a simple utility which uses OCCI LIB from 10g release. I'm deploying it with Oracle Instant Client lite libraries.
Everything works fine when tnsnames.ora is present in the same dir. When I move it somewhere else and set TNS_ADMIN to that directory, it doesn't work anymore:
C:\uplob>set TNS_ADMIN=c:\tns;
C:\uplob>echo %tns_admin%
c:\tns;
C:\uplob>uplob u/p@xe 15 input.dat
Exception:12154 ORA-12154: TNS:could not resolve the connect identifier specif
ied
This seems very simple, but I still cannot determine why TNS_ADMIN is not being taken into account.
Thank you for any help with this issue,
davidI think for Windows ,
You may have to set this in MY-COMPUTER-->Advanced-Env-Variables
and reboot to take effect.
rgds -
Minimum Client Install and Path to TNSNames.ora
1) What files are required for a minimum client install.
2) What is the route/path a program should take to find the tnsnames.ora (Environment variable, registry?) - i.e. how does one locate it?
Thanks1) Go to http://otn.oracle.com, look for the Downloads link, select and download Instant Client, unzip the file anywhere and follow the 'install' instructions.
2) The TNSNAMES.ORA will be in each ORACLE_HOME/network/admin directory
In addition, you could manually create a central one and use either the environment variable or registry entry TNS_ADMIN to locate that.
I generally use the Windows Explorer search capability to look for files.
You may want to review the Installation manual and/or the Administration manual for Windows. They do give this information and a lot more information relevant to your OS. These could be found at http://tahiti.oracle.com -
Cleint tnsnames.ora for connecting to RAC instance
Dear all,
DB:10.2.0.1
o/s:redhat 5.6
2node rac cluster
I am getting ERROR: ORA-12170: TNS:Connect timeout occurred when trying to connect to rac instance.the timeout frequency is very less once in 10 times.
cleint tnsname.ora
RACTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.25)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.27)(PORT = 1521))
(FAILOVER= TRUE)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RACTEST)
RegardsTry to connect straight to the nodes. One node at the time. You can add new tnsnames entries for all RAC nodes so you can connect only one node not the whole RAC.
example:
RACTEST1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.25)(PORT = 1521))
(CONNECT_DATA =
(SERVER = dedicated)
(SERVICE_NAME = RACTEST)
(INSTANCE_NAME = RACTEST1)
RACTEST2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.27)(PORT = 1521))
(CONNECT_DATA =
(SERVER = dedicated)
(SERVICE_NAME = RACTEST)
(INSTANCE_NAME = RACTEST2)
If both nodes are working then problem is probably in network / firewall.
Usually this kind of problems comes because one node's database instance is somehow broken. And if that is the problem correction is restart failing instance.
Edited by: Simo Kemppinen on Jul 15, 2012 12:58 PM
Edited by: Simo Kemppinen on Jul 15, 2012 12:59 PM -
"tnsnames.ora" file & ODBC driver
It seems ODBC drivers do not need TNS listeners!
I need to find out how ODBC drivers determine the path of "tnsnames.ora" file!
(I have many Oracle installations on my machine.)
nullI believe that the ODBC driver will use the tnsnames file in the primary Oracle home. You can use the Oracle home selector to select your primary home.
Note that, at the moment, the Oracle ODBC driver is supported only when installed in a single Oracle home on a machine.
Justin Cave -
Parameters of tnsnames.ora
hello. i am new in oracle 10g and i want to take advice. i see the setting parameters of tnsnames.ora on Oracle Net Manager and i set the tnsnames.ora with it.
i developed a client application working with remote oracle 10g database on windows platforms. i developet it on VisualStudio, this application can work with both ms sql and oracle 10g. the user chooses it. when the user chooses Oracle i must create connection string and connect to the remote db.
i can implement it with two way
1. i want only connection name which is defined in tnsnames.ora and connect over it.
2. i make an interface user set the simple and advanced settings of connection parameters and i can insert them into connection string.
which way should i use. i think that it is better to set all of parameters in my application because it will be easier for user. but i think about the future versions of oracle . there may be problems on them.
what do you advice me?
thanks.Hello user "user518019":
I'm also new in the Oracle world but I have programming since a lot of years. I would recommend to you following a simple rule:
if your applicattion is very simple you must follow the simple way to connect to DB.
By using a "tnsnames.ora" you only need to know a DB name to connect to it. In the other hand, if your are using non-default ports o also like this (per example, a more complicated enviroment) you would need a more detailed box to especify address, port number, service name, etc, etc...
I suppose Oracle will continue using "tnsnames.ora" a lot of years, but this is only a impression. I hope send you some help with this. -
Can't find tnsnames.ora
Hi,
I install Instant Client on Linux using rpm. I need to edit the tnsnames.ora, but I can't find it.
Can I copy one instance of tnsnames.ora and set TNS_ADMIN=<the path of tnsname.ora directory> as and enviornment variable on your client machine?
Thank youNo tnsnames.ora is included with Instant Client, you have to create (or copy, as you do) your own.
You did the right thing, TNS_ADMIN must point to the directory containing tnsnames.ora.
If you have an sqlnet.ora file, it must be in the same directory.
Yours,
Laurenz Albe -
System check & tnsnames.ora view??
Hello All,
I am having distributed environment on HP-Unix & Oracle 10.2.My ECC 6.0 is running on server A & oracle running on server B.I am not able to open my sapgui..How to check that my ECC 6.0 is running fine??Please let me know how can I check that my system is running fine or not from HP-unix??
Secondly please let me know also the path of tnsnames.ora in my server B??If I login to the database how to view the tnsnames.ora??Hi Ashley,
Use dpmon as follows:
Login as <sid>adm
cdpro
dpmon pf=<Last modified Instance profile>
Choose m for menue and then any options you want from the menue to monitor
Fort seeing the last file of Instance Profile
cdpro
ls -ltr
Pick the last lInstance Profile file
Hope this helps,
regards...yogi -
Command to determine path used to find tnsnames.ora
How can know (with command or similar) the path that uses Oracle client to find tnsnames.ora file?
We need a command because not always we have administrator permissions on a workstation to make a regedit or to see environment variables, but we have to determine causes of problem connections.
If I’m working with client on UNIX, ‘tnsping name’ command shows a path of sqlnet.ora, usually the same that tnsnames.ora is allocated. Under windows doesn’t display information about this.
For example:
On UNIX:
tnsping ####
TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.4.0 - Production on 03-MAY-2007 13:55:58
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/software/oracle/product/9.2.0/network/admin/sqlnet.ora
On WINDOWS:
C:\>tnsping ####
TNS Ping Utility for 32-bit Windows: Version 8.1.7.0.0 - Production on 03-MAY-20
07 13:58:51
(c) Copyright 1997 Oracle Corporation. All rights reserved.
TNS-03505: Message 3505 not found; No message file for product=NETWORK, facility
=TNS
Exists any command to do it or any command that shows this information?
Thank you very much!!!
Marc.Hi!
In windows you also get the message what sqlnet.ora was used.
The error message you get
TNS-03505: Message 3505 not found; No message file for product=NETWORK, facility=TNSlooks like there is something wrong with your client installation, it can't find it's message file so you don't get your sqlnet.ora path. I suppose in your case knowing the location of tnsnames.ora wouldn't help since your client isn't installed correctly.
Regards,
PP -
Connect to database with SQL*Plus: is TNSNAMES.ORA used?
Hi ,
we have a local database called DEV01 and a duplicate of this database in a datacenter. To be able to connect to both databases the TNSNAMES.ORA
on the local database server (not the one in the datacenter) has the following entries:
/* Entry for local database */
DEV01_local, DEV01_local.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID= DEV01)
/* Entry for database in datacenter */
DEV01,DEV01.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server02)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = DEV01)
When I connect to the local database server I set the Oracle-environment as follows:
export ORACLE_SID=DEV01
export PATH=/opt/oracle/app/oracle/product/9.2.0/bin:$PATH
export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2.0
Now I start SQL*Plus as follows:
oracle#> sqlplus user/user
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server01
Since the SID is on both databases the same (DEV01) I really do not understand how Oracle decides to which database SQL*Plus connects to.
Is it a matter of the entries in the TNSNAMES.ORA?
But when I start SQL*Plus as follows:
oracle#> sqlplus user/user@DEV01_local
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server01
or
oracle#> sqlplus user/user@DEV01
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server02
everything is as expected.
Does anybody know which database gets chosen when just connect with "sqlplus user/user" (without @DEV01 or @DEV01_local)?
Any help will be appriciated!
Rgds
JanBoth databases have the SID=DEV01.
The ORACLE_SID is set to DEV01 - but when connecting I end up at
oracle#> sqlplus user/user
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server01
which is the database with the TNSNAMES.ORA entry "DEV01_local, DEV01_local.WORLD = ..."
In your case the one defined by ORACLE_SID environment variable => but which from both is it? -
Cannot Connect to Two 11g DBs - Same tnsnames.ora different Oracle_Home
We have two 11g databases on seperate Oracle Homes on the same server. The tnsnames.ora and listener.ora entries for db_2 were combined with those of db_1 in ...../db_1/network/admin. They are:
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST=10.200.18.28)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB1)
#DB2 =
# (DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST=10.200.18.28)(PORT = 1521))
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SERVICE_NAME = DB2)
# listener.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.200.18.28)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = DB1)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/DB1)
#SID_LIST_LISTENER =
# (SID_LIST =
# (SID_DESC =
# (SID_NAME =DB2)
# (ORACLE_HOME = /u01/app/oracle/product/11.1.0/DB2)
DB2 is commented out because we coulod not reach either database when it was not. Now we can each one or the other. We were getting
"ora_12514 TNS:listener could not resolve seervice name given in connect description."
The problem is that we need to reach each database when connected to the server from eithere the client or server.
I would appreciate any information, direct experience or pointers to documents.
ThanksYou shouldn't need either DB1 or DB2 listed in your listener.ora file. They should automatically register with the listener if it is running on the default port (which yours is).
If you do want to statically register the instances, the syntax you have in your original post is a little wrong. It should be:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
(SID_NAME = DB1)
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_2)
(SID_NAME = DB2)
All in one variable, not two. Also, the home paths you had in your post were missing the _.
All that said, it seems to be much preferred to let the instance register itself. If you try the following, does the instance register?
* remove the SID_LIST_LISTENER configuration for DB1
* restart the listener
* connect to DB1 as someone with the DBA role and execute 'alter system register;'
* check the listener with 'lsnrctl status listener' and see whether the instance registered.
You should see something like: (notice 'READY' instead of 'UNKNOWN')
Instance "DB1", status READY, has 1 handler(s) for this service... -
We have a new datasource that I need to write a report against. In order to access the db, I have to install an Oracle wallet on my pc that contains a certificate. I then have an entry in the sqlnet.ora file that references this wallet, and I have an entry in my tnsnames file. I wrote a report successfully on my pc. We then have our Business Objects installation on a Sun Solaris machine with Unix. We installed the wallet, added the sqlnet.ora entry, and the tnsnames.ora entry. I am able to connect to the db from the unix command prompt by typing sqlplus username@dbname successfully. However, when I place my Crystal Report in Bus. Obj. I cannot get it to work. I go to the CMC, select the report, choose Process, Database. I am entering Use custom database logon info and choosing Oracle as my database driver. I then enter the tnsnames entry into the server and enter my username and password and check the use use same database logon as when report is run. I get the error The database logon information for this report is either incomplete or incorrect. I'm guessing the report is not using the certificate in the wallet when it is trying to log on, but I'm not sure. Does anyone have any suggestions or experience with this? Thanks in advance for any help.
Hi Angie,
you should install the 32bit Oracle driver on your Solaris machine and adjust the LD_LIBRARY_PATH environment variable (in the profile of the BOBJ installation user) to point to the path of the 32bit libraries of your Oracle driver.
BOBJ is not a native 64bit software and can therefore work only with the 32bit versions of the database drivers.
Regards,
Stratos
Edited by: Efstratios Karaivazoglou on Jul 15, 2009 4:49 PM -
Error connecting to database thru tnsnames.ora in linux
Hi,
I can connect to database using service and port. Now i want to connect using the tnsnames. The following code returns error.
import java.sql.;*
import oracle.jdbc.OracleDriver;
import oracle.jdbc.pool.OracleDataSource;
public class Test
public Test()
System.setProperty("oracle.net.tns_admin","\oracle\product\TNS");
public static Connection getConnection() throws SQLException
OracleDataSource ds = new OracleDataSource();
ds.setTNSEntryName("CMAD");
ds.setDriverType("thin");
ds.setUser("scott");
ds.setPassword("tiger");
Connection conn = ds.getConnection();
return conn;
public void run () throws SQLException
Connection conn = getConnection();
System.out.println("Check Auto Commit = " + conn.isClosed());
conn.close();
public static void main(String[] args)
Test test = new Test();
try
test.run();
System.out.println("all done..");
catch (SQLException e)
e.printStackTrace();
\oracle\product\TNS is the place where my tnsnames.ora is stored and is set as TNS_ADMIN path in linux
I encounter the follwing error while running the class file of above code
java.sql.SQLException: Io exception: SO Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:327)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:365)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:150)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:31)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:195)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:145)
at Test.getConnection(Test.java:41)
at Test.run(Test.java:47)
at Test.main(Test.java:57)
Could someone help me? What is a SO exception?
Thanks in advance.
AllenHi,
Socket exception?
What does your CMAD TNS entry look like?
Regards
Peter -
Connection to db works with ezconnect but fails with tnsnames.ora
Hi,
When I try to connect to remote datbase using 10g ezconnect, it works fine. But when I tried to connect to same database using tnsnames.ora, it fails:
sqlnet.ora on client side:
================
###SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH=(tnsnames, onames, hostname, ezconnect)
tnsnames.ora on client side
=================
MRAP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = moody)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = MRAP.ALBILAD.COM)
Listener On DB Server:
===============
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 04-APR-2010 16:29:16
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=moody)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 04-APR-2010 16:28:59
Uptime 0 days 0 hr. 0 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/app/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=moody)(PORT=1521)))
Services Summary...
Service "mrap.albilad.com" has 1 instance(s).
Instance "mrap", status READY, has 1 handler(s) for this service...
Service "mrapXDB.albilad.com" has 1 instance(s).
Instance "mrap", status READY, has 1 handler(s) for this service...
Service "mrap_XPT.albilad.com" has 1 instance(s).
Instance "mrap", status READY, has 1 handler(s) for this service...
The command completed successfully
Now, on client, when I connect with each of methods written above, following is output:
C:\Documents and Settings\c900796>sqlplus ingrian/[email protected]:1521/mrap.albilad.com
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 4 16:57:18 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user;
USER is "INGRIAN"
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64
bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\Documents and Settings\c900796>sqlplus ingrian/ingrian@mrap
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 4 16:57:25 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
C:\Documents and Settings\c900796>
What do you suspect could be the issue?
Br,
AnjumC:\Documents and Settings\c900796>sqlplus ingrian/ingrian@mrap
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 4 16:57:25 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specifiedstates, in no uncertain terms, that the system can not find the @mrap in the TNS translation methods. Usually that indicates a problem in finding the correct entry in the correct tnsnames.ora file. Some related thoughts:
1) The LIST of methods allowed is found in SQLNET.ORA on the client. If multiple methods are in the list, the client will step through the methods.
It is possible that you do not have method calling the TNSNAMES.ORA file in the list. (You appear to have that.)
2) The mrap must be one of the entries on the left hand side of te equals sign of a stanza.
MRAP = (DESCRIPTION (appears to provide that)
3) The SQLNET.ORA could provide a 'default domain' to append on the end of the lookup value in TNSNAMES.ORA
Not sure whether your post of the sqlnet.ora selectred only a few lines or the entire file.
4) Variable issues can exist.
- The TNS_ADMIN variable may be used to force the use of a specific directory instead of %ORACLE_HOME%\network\admin .
- ORACLE_HOME can be adjusted by a variety of methods, and may be in both teh registry and the system environment -
Not all the connect strings are shown from tnsnames.ora
Hi Guys,
I am having a very strange problem. While trying to create a new connection in SQL Developer (I am using Version 1.1.2.25), and choosing " TNS " as connection type, I am just able to see 15-20 database entries, where my tnsnsames.ora contains more than 100 entries. And these 15-20 connect strings seem to have been picked randomly. So its like I am seeing the 1st entry, 4-8th entry, 20-24th entry from the tnsnames.ora.
Any idea what needs to be done?
ThanksmHi there,
I found what was wrong and would like to update it for the benefit of others. The tnsnames.ora was read upto all the entries which was in correct format. All the entries after the first incorrect entry was being ignored.
E.g. if you tnsnames.ora is having 100 entries and entry number 50 is in wrong format, then SQLDEVELOPER will only show entries upto 49. Entry 50th onwards will not be shown.
Hope this helps.
Ashish
Maybe you are looking for
-
Checkbox activate/deactivate in alv grid report
Hi All, I am using REUSE_ALV_GRID_DISPLAY fm to display output.In my output i having checkbox column based on values on internal table it will be checked and the checkbox column is editable. Now my requirement is if particular checkbox having values
-
How to create Dynamic Webi 3.1 filename in Publication
I have a webi 3.1 report that is being called from a publication used for bursting using the eFashion universe. I want the file name to be dynamic, based on the profile. Within the webi report I created a free standing cell that I set to "Western S
-
XML second page output overlap with predefind Header
Hii XML Report second page output in overlap with Predefined Header (Paper Header) . so in second page how can i put down the row from Predefined Header. Thanks
-
Help with Textures, Element 3D and Photoshop CS6
Hello, I thought this was the best place to ask my question due to the Photoshop details... I am using Element 3D with CS6. I downloaded a model that was in 3DS Max format, so imported it into Photoshop and exported it as a .OBJ file so element coul
-
Adobe Muse Internet Launch Issue
Every time i try to launch my Adobe Muse, it says that i dont have an internet connection.... this is incorect. My internet is fine