Tnsnames.ora General Question
We are experiencing a problem that many different users seem to have many different versions of tnsnames.ora. We want to create our "gold" version and ensure that everyone uses the same one. Two questions:
1. Is the "alias" that you give each connection case sensitive? For instance if I name one connection Prod is that the same as PROD?
2. At another place I worked I was under the impression that most applications (PL/SQL Developer for sure) uses the Windows PATH environment variable to locate tnsnames.ora by going through all directories listed in the variable and using the first occurrence of tnsnames.ora that it found. Through a little testing and renaming and such I have found that this doesn't appear to be the case. We are using ADI, Discoverer, different development tools, etc and would like to avoid having more than one location where the file is stored. What is the best way around that or is there a way? I assume that it depends somewhat on each application.
Thanks in advance for the help!
PL/SQL Developer Help->Support Info TNS Names tab shows that C:\oracle\ora92\network\admin\tnsnames.ora is used as my tnsnames.ora for the application. I don't have an ORA_HOME environment variable. So where is it coming from? The path above is in my PATH variable.
So it is different for every application?
I don't have TNS_ADMIN environment variable either.
Sorry for the dumb questions. I just want to be 100% clear.
Message was edited by:
mateoc15
Similar Messages
-
Basic questions about tnsnames.ora
I think I am quite confused about tnsnames.ora file (this is about release 9.2).
- I was told that a tnsnames.ora file is only necessary in the server side when you need to connect to a different remote database, but if I do not have any entry in my server tnsnames.ora then, how can the listener know which services it has to listen to?
- I do not understand what "Dynamic service registration" is and how it can be used.
Sorry if the level of these questions is too low for this forum, but I have not found clear answers for them.- The listener knows which services it has to listen
for by
static registration --> the database definition is in
listener.ora
dynamic registration --> the PMON process of the
database registers itself with the listener,
submitting the service_name parameter from the spfile
| init.ora
Tnsnames.ora is a client thingy, when connecting to
a remote database, the local database is a client
for the remote database.
Hth
Sybrand Bakker
Senior Oracle DBAThank you for the answer.
I made a wrong conclusion, my situation is this (there are 2 database instances in one server and the listener.ora has no list of services, so I must assume both instances are registered dynamically, am I wrong?):
I wrongly thought that the tnsnames.ora played some role in the server side because after restarting the listener I commented the entries in the server tnsnames.ora and the listener had no service registered, then I uncommented those entries and I saw that then the listener had those services registered. I guess that what it actually happened is that it takes a little time for the listener to register dynamically after it is restarted, can it be the case?
I have read both init.ora files but I cannot see what parameter is set to register dynamically, maybe it is only defined at spfile level. Can someone tell me what parameters must I look for?
One more question. I have been asked if a database must be restarted to work ok when the server ip is changed (I suppose it is done without shutting the server down). Does someone know? Should the listener also be rebooted?
Thanks again. -
A question about tnsnames.ora
I have a question about tnsnames.ora file. I have two address entries in the tnsnames.ora, one is with protocol:ipc, the other is with protocol:tcp. The log file always tells me the hostname is UNKNOWN. I changed the hostname alias into ip address, but the error stills exists. But there isn't any other error of the running of database. Because I don't need to access database from remote client, thus I think if I delete the address entry of the hostname won't interrupt the running of database. So I delete it from the tnsnames.ora file. But the error stills exists. I am not familiar with Oracle. So could anyone help me to solve the problem or give me some ideas about it? Thanks.
Hi,
That tnsnames.ora file is the descriptor that resolves the service name to the correct host address. That line ADDRESS is the locator for the listener on the server which then determines if a session is granted or not. You cannot forget the sqlnet.ora file either. This sets the type of connection that the client is going to be involved in: either a HOST,TNSNAMES OR
ONAMES. You also must check to see if the listener is turned on. This is a common error. But I dont think it is in this case. Judging by the hostname error message Id say you dont have the correct host name. That can be found in the init.ora file under db_name parameter. I suggest that you do some reading on this subject in the networking documentation. It is all very well explained there. There is more to this relationship than I touched upon here.
Hope this helps. -
Report Builder Question - OA AR Aging - and a general question
I'm sure this is the wrong forum for this question, but I thought there might be someone here who might be using Oracle Applications and Report Builder who'd be kind enough to help me out.
We've recently implemented Oracle Applications 11.5.10 and I have to use report builder to change the Accounts Receiveable Aging (7 bucket) to a 5 bucket report. I've already made some changes to the seeded "ARXAGMW.rdf" report, but I'm not a big Oracle Reports guy. I've stumbled through making some changes in various other reports. But this one is just plain nasty! :)
I was thinking that I could simply add buckets 6 & 7 to bucket 5, then just hide or delete the 6 & 7 buckets. But I'm not sure where to even start. Any help with this would GUARANTEE a Christmas or other holiday card this year! :)
I really want to keep this simple as possible, so any help would be very....helpful. :)
Oh, my general question is: Are there any resouces/books for Oracle Reports (Report Builder)? I feel so lost trying to modify existing reports, let alone creating new ones.
Thanks again!
SteveHi Steve,
I am working on the 7-bucket aging report and i want to add a new field in data model.
As the query is build dynamically, i have modified the function BUILD_CUSTOMER_SELECT to meet my requirements.
But the problem is that in the data model, the field is not present in my Grouping. and if I try to add the field in the Data Model query (Q_ Customer) section,
i get the following error: ORA-01789: query block has incorrect number of result columns.
The query is as shown below:
select rpad('a',50,'-') short_cust_name,
0 cust_id,
rpad('a',30,'-') cust_no,
rpad('a',500,'-') sort_field1,
rpad('a',40,'-') sort_field2,
0 payment_sched_id,
rpad('a',32,'-') class,
sysdate due_date,
0 amt_due_remaining,
0 days_past_due ,
0 amount_adjusted,
0 amount_applied,
0 amount_credited,
sysdate gl_date,
'x' data_converted,
0 ps_exchange_rate,
0 b0,
0 b1,
0 b2,
0 b3,
0 b4,
0 b5,
0 b6,
rpad('a',25,'-') bal_segment_value,
rpad('a',500,'-') inv_tid,
rpad('a',32,'-') invoice_type
, 'y' parent_cust --I WANT A NEW FIELD HERE TO BE VIEWED ON THE REPORT LAYOUT LATER
from dual
where 1=2
UNION ALL
&common_query_cus
Did i missed somthing 4 me to be able to add the field here? -
Tnsnames.ora file does not seem to load in SQL Developer
I've really tried my best to figure this out on my own ... through the Help, this forum, and Internet in general. I apoligize in advance for having to ask this, since I'm sure this is a common issue. This particular form entry was really close:
Database Connections will not load tnsnames.ora
But, I just can seem to figure out why, or where entries from my tnsnames.ora file are loading into SQL Developer.
- I have the TNS_ADMIN system environment variable defined to the directory where tnsnames.ora is stored - C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN.
- I do not see a TNS tab as the forum entry above indicates anywhere in SQL Developer - This may be my problem.
It seems that this issue could be cleared up with better directions on how to import tnsnames.ora entries into SQL Developer. Is there any specific direction on how to get your tnsnames.ora file setup correctly with SQL Developer running on Windows XP - Besides the Help which mentions the setup of TNS_ADMIN, but doesn't really tell you what the expected result is, or where the entries will be, or how to verify this is working?
Any help would be most appreciated.
Thanks,
Dave
Below is the export from the About box in SQL Developer:
About
Oracle SQL Developer 1.5.1
Version 1.5.1
Build MAIN-5440
Copyright © 2005,2008 Oracle. All Rights Reserved.
IDE Version: 11.1.1.0.22.49.42
Product ID: oracle.sqldeveloper
Product Version: 11.1.1.54.40
Version
Component Version
========= =======
CVS Version Internal to Oracle SQL Developer (client-only)
Java(TM) Platform 1.6.0_07
Oracle IDE 1.5.1.54.40
Versioning Support 1.5.1.54.40
Properties
Name Value
==== =====
apple.laf.useScreenMenuBar true
awt.toolkit sun.awt.windows.WToolkit
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
com.apple.macos.smallTabs true
com.apple.mrj.application.apple.menu.about.name "SQL_Developer"
com.apple.mrj.application.growbox.intrudes false
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
http.agent Mozilla/5.0 (Java 1.6.0_07; Windows XP 5.1 x86; en_US) ICEbrowser/v6_1_3
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.AssertTracingDisabled true
ide.bootstrap.start 1628689279134099
ide.build MAIN-5440
ide.conf C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.config_pathname C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.debugbuild false
ide.devbuild false
ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
ide.firstrun true
ide.java.minversion 1.5.0
ide.launcherProcessId 5580
ide.main.class oracle.ide.boot.IdeLauncher
ide.patches.dir ide/lib/patches
ide.pref.dir C:\Documents and Settings\X626730\Application Data\SQL Developer
ide.pref.dir.base C:\Documents and Settings\X626730\Application Data
ide.product oracle.sqldeveloper
ide.shell.enableFileTypeAssociation C:\sqldeveloper\sqldeveloper.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\sqldeveloper\sqldeveloper.exe
ide.startingcwd C:\sqldeveloper\sqldeveloper\bin
ide.user.dir C:\Documents and Settings\X626730\Application Data\SQL Developer
ide.user.dir.var IDE_USER_DIR
ide.work.dir C:\Documents and Settings\X626730\My Documents\SQL Developer
ide.work.dir.base C:\Documents and Settings\X626730\My Documents
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 50.0
java.endorsed.dirs C:\Program Files\Java\jdk1.6.0_07\jre\lib\endorsed
java.ext.dirs C:\Program Files\Java\jdk1.6.0_07\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.home C:\Program Files\Java\jdk1.6.0_07\jre
java.io.tmpdir C:\DOCUME~1\X626730\LOCALS~1\Temp\
java.library.path C:\sqldeveloper;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\PROGRA~1\IBM\WEBSPH~2\BIN\DB2;C:\PROGRA~1\IBM\WEBSPH~2\BIN\MQClient;C:\PROGRA~1\IBM\WEBSPH~2\BIN;C:\IBM\WebSphere MQ Client\Java\lib;C:\Program Files\CA\SharedComponents\PEC\bin;C:\oracle\product\10.2.0\client_1\bin;C:\oracle\ora92\bin;C:\oracle\product\10.2.0\client_2\bin;C:\Perl\bin\;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Program Files\CA\PEC\bin;C:\Reuters\Plus;C:\Reuters\Plus\COMLOGIN;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Compuware\Common;C:\Program Files\Common Files\Compuware;C:\Program Files\CA\AllFusion Harvest Change Manager;C:\Program Files\SecureCRT\;C:\PROGRA~1\F-Secure\Ssh;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\Program files\1E\SMSNomad\;C:\j2sdk1.4.2_06\jre\bin;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\IBM\Installation Manager\eclipse\lib;C:\Program Files\CA\Cryptography\;C:\Program Files\CA\R71\AllFusion Harvest Change Manager;C:\IBM\WebSphere MQ Client\bin;C:\IBM\WebSphere MQ Client\tools\c\samples\bin;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_07-b06
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.util.logging.config.file logging.conf
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.6.0_07
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 10.0-b23
jdbc.driver.home /C:/oracle/product/10.2.0/client_1/
jdbc.library /C:/oracle/product/10.2.0/client_1/jdbc/lib/ojdbc14.jar
line.separator \r\n
oracle.home C:\sqldeveloper
oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
orai18n.library /C:/oracle/product/10.2.0/client_1/jlib/orai18n.jar
os.arch x86
os.name Windows XP
os.version 5.1
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sun.arch.data.model 32
sun.boot.class.path C:\Program Files\Java\jdk1.6.0_07\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_07\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_07\jre\classes
sun.boot.library.path C:\Program Files\Java\jdk1.6.0_07\jre\bin
sun.cpu.endian little
sun.cpu.isalist
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.ddoffscreen false
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level Service Pack 2
user.country US
user.dir C:\sqldeveloper\sqldeveloper\bin
user.home C:\Documents and Settings\X626730
user.language en
user.name a641421
user.timezone America/New_York
user.variant
windows.shell.font.languages
Extensions
Name Identifier Version Status
==== ========== ======= ======
Check For Updates oracle.ide.webupdate 11.1.1.0.22.49.42 Loaded
Code Editor oracle.ide.ceditor 11.1.1.0.22.49.42 Loaded
Database Connection Support oracle.jdeveloper.db.connection 11.1.1.0.22.49.42 Loaded
Database Object Explorers oracle.ide.db.explorer 11.1.1.0.22.49.42 Loaded
Database UI oracle.ide.db 11.1.1.0.22.49.42 Loaded
Diff/Merge oracle.ide.diffmerge 11.1.1.0.22.49.42 Loaded
Extended IDE Platform oracle.javacore 11.1.1.0.22.49.42 Loaded
External Tools oracle.ide.externaltools 11.1.1.0.22.49.42 Loaded
Feedback oracle.ide.feedback 11.1.1.0.22.49.42 Loaded
File Support oracle.ide.files 11.1.1.0.22.49.42 Loaded
File System Navigator oracle.sqldeveloper.filenavigator 11.1.1.54.40 Loaded
Help System oracle.ide.help 11.1.1.0.22.49.42 Loaded
History Support oracle.jdeveloper.history 11.1.1.0.22.49.42 Loaded
Import/Export Support oracle.ide.importexport 11.1.1.0.22.49.42 Loaded
Log Window oracle.ide.log 11.1.1.0.22.49.42 Loaded
Mac OS X Adapter oracle.ideimpl.apple 11.1.1.0.22.49.42 Loaded
Navigator oracle.ide.navigator 11.1.1.0.22.49.42 Loaded
Object Gallery oracle.ide.gallery 11.1.1.0.22.49.42 Loaded
Object Viewer oracle.sqldeveloper.oviewer 11.1.1.54.40 Loaded
Oracle IDE oracle.ide 11.1.1.0.22.49.42 Loaded
Oracle Microsoft Access Browser oracle.sqldeveloper.thirdparty.access 11.1.1.54.40 Loaded
Oracle Migration Workbench oracle.sqldeveloper.migration 11.1.1.54.40 Loaded
Oracle Migration Workbench - MS Access oracle.sqldeveloper.migration.msaccess 11.1.1.54.40 Loaded
Oracle Migration Workbench - MySQL oracle.sqldeveloper.migration.mysql5 11.1.1.54.40 Loaded
Oracle Migration Workbench - SQLServer oracle.sqldeveloper.migration.sqlserver2005 11.1.1.54.40 Loaded
Oracle Migration Workbench - Translation Core oracle.sqldeveloper.migration.translation.core 11.1.1.54.40 Loaded
Oracle Migration Workbench - Translation MS Access oracle.sqldeveloper.migration.translation.msaccess 11.1.1.54.40 Loaded
Oracle Migration Workbench - Translation MS SQL Server oracle.sqldeveloper.migration.translation.sqlserver 11.1.1.54.40 Loaded
Oracle Migration Workbench - Translation MySQL oracle.sqldeveloper.migration.translation.mysql 11.1.1.54.40 Loaded
Oracle Migration Workbench - Translation Sybase oracle.sqldeveloper.migration.translation.sybase 11.1.1.54.40 Loaded
Oracle Migration Workbench - Translation UI oracle.sqldeveloper.migration.translation.gui 11.1.1.54.40 Loaded
Oracle MySQL Browser oracle.sqldeveloper.thirdparty.mysql 11.1.1.54.40 Loaded
Oracle SQL Developer oracle.sqldeveloper 11.1.1.54.40 Loaded
Oracle SQL Developer Extras oracle.sqldeveloper.extras 11.1.1.54.40 Loaded
Oracle SQL Developer Reports oracle.sqldeveloper.report 11.1.1.54.40 Loaded
Oracle SQL Developer SearchBar oracle.sqldeveloper.searchbar 11.1.1.54.40 Loaded
Oracle SQL Developer TimesTen oracle.sqldeveloper.timesten 1.5.1.1.2 Loaded
Oracle SQL Server Browser oracle.sqldeveloper.thirdparty.sqlserver 11.1.1.54.40 Loaded
Oracle Sybase Browser oracle.sqldeveloper.thirdparty.sybase 1.2.1.54.40 Loaded
Oracle XML Schema Support oracle.sqldeveloper.xmlschema 11.1.1.54.40 Loaded
PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.0.22.49.42 Loaded
Peek oracle.ide.peek 1.0 Loaded
Replace With oracle.ide.replace 11.1.1.0.22.49.42 Loaded
Runner oracle.ide.runner 11.1.1.0.22.49.42 Loaded
SQL Worksheet Window oracle.sqldeveloper.sqlworksheet 11.1.1.54.40 Loaded
Search Bar oracle.ide.searchbar 11.1.1.0.0 Loaded
Snippet Window oracle.sqldeveloper.snippet 11.1.1.54.40 Loaded
Sybase 12 oracle.sqldeveloper.migration.sybase12 11.1.1.54.40 Loaded
Sybase 15 oracle.sqldeveloper.migration.sybase15 11.1.1.54.40 Loaded
Tuning oracle.sqldeveloper.tuning 11.1.1.54.40 Loaded
VHV oracle.ide.vhv 11.1.1.0.22.49.42 Loaded
Versioning Support oracle.jdeveloper.vcs 11.1.1.0.22.49.42 Loaded
Versioning Support for CVS oracle.jdeveloper.cvs 11.1.1.0.22.49.42 Loaded
Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.0.22.49.42 Loaded
Web Browser and Proxy oracle.ide.webbrowser 11.1.1.0.22.49.42 Loaded
oracle.ide.dependency oracle.ide.dependency 11.1.1.0.22.49.42 Loaded
oracle.ide.indexing oracle.ide.indexing 11.1.1.0.22.49.42 LoadedUsing Windows XP/Vista...
After testing in our environment, it appears that SQL Developer 1.5.1 (5440) does in fact ignore the TNS_ADMIN environment variable and ONLY looks in the Oracle Home directory (network/admin). We define a central network location for our tnsnames file and have the tns_admin setup to point there instead of locally for our users.
When selecting to add a new connection (in 1.5.1, it works in previously releases... meaning 1.2.something) and selecting TNS, the drop-down remains empty. However, if I exit SQL Developer and then copy the tnsnames file to the local network/admin directory I can then re-launch SQL Developer and the drop-down is populated. Exiting SQL Developer again, deleting the local copy of tnsnames, and then launching SQL Developer yet again results in the drop-down being empty.
All other Oracle-related applications function as expected (as they have for years) using the TNS_ADMIN environment variable.
Any suggestions/ideas? -
Best Practice to configure tnsnames.ora on client of MAA environment in 10g
Hi,
I have a MAA environment, 1 RAC Primary of 2 nodes and 1 RAC standby of 2 nodes too. I want to configure the tnsnames.ora on clients (we have many clients on each PC) and I need to configure the tnsnames.
I have read some papers but the information is not clear regarding to configure the tnsnames on clients. I just want to have only one entrie on tnsnames that I can use on clients to connect to RAC Primary and/or Standby depending on what site is primary in that moment, I was thinking in something like this:
SALES.WORLD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = site1a)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = site1b)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = site2a)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = site2b)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sales.world)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
Where site1 is RAC Primary now, and site2 is standby. But in case of switchover, I want that clients recognize automatically to which site connect.
I was thinking to stop listeners on site that is not primary on that moment.
The question is if this is the best practice on this scenario?.
Thanks for your advice.
LuisHi Louis,
you need to setup a service with clusterware. On both sides: primary and standby.
On primary you start them. On standby the services are also configured but stopped.
In case of switchover or failover, data guard will notice clusterware to bring them up.
You need to use this service name in your clients tnsnames.
Another issue are TCP timeouts, to protect against them you use
outbount_connect_timeout in your sqlnet.ora
Also have a look at
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_SwitchoverFailoverBestPractices.pdf
HTH Mathias -
Location of tnsnames.ora for Tora and Oracle XE Client
I Googled far and wide and did not see a CLEAR answer to my question, hopefully this will help others.
I have installed the debian oracle-xe-client and tora packages (tora rebuilt for oracle) on Ubuntu 8.04.
However, I did not know where I was supposed to place the tnsnames.ora file for my databases. I have tried running Tora with the environment variable of TNS_ADMIN set to the file where I placed my tnsnames.ora, however that did not work as Tora did not 'see' the file or its entries apparently. I know this works because I copied it from a Debian Etch box with the client and server installed.
I had even added a 'network/admin' directory structure to the //usr/lib/oracle/xe/app/oracle/product/10.2.0/client (ORACLE_HOME) with the tnsnames.ora but also with no success.
Now for the solution:
Simply remember that TNS_ADMIN points to the directory where the tnsnames.ora is and it will work. :)
I do have a suggestion that both Tora and sqlplus use a config file to set these directory(s) in addition to the overriding ability of the environment variable, TNS_ADMIN as is usually the case with UNIX apps (and thus expected).
Thank you,
JasonThe ODBC Instant Client Readme that is included in the install also indicates that %ORACLE_HOME%/network/admin/tnsnames.ora is the correct default location. What about OCI?
-
How to deactivate an entry in tnsnames.ora file
Hi all,
I am working with Oracle 10g enterprise edition. I have a data source named with DEVDATA which should not be affected while I am working on my project. Usually, I will add DEVDATA entry in tnsname.ora file if I want to use it and I will remove that entry from tnsnames.ora file in order to protect that data source. It is very laborious process each time when I want to add or remove that entry. Do we have any mean such a way that I can switch between the two options. Currently, I have a desktop shortcut to tnsnames.ora file so that I can add or remove that entry when ever I want. Can we comment out that entry. Please suggest me.
I hope this is the right place to fire this question. If not, direct me. Thanks in advance.
Regards,
Kumar.[email protected] wrote:
Hi all,
Thanks for your replays. As you said we can comment out lines with '#'. But, I am looking for commenting whole entry at a time. Can any one tell me how to comment out whole entry/paragraph. Is there any oracle utility by which we can deactivate the data source. Please suggest. Thank you.
Regards,
Kumar.As others have said, either comment out each line of the entry, or have two tnsnames files that you rename as needed. But really, how often do you make the swap that commenting/uncommenting about five lines of code is such a burden? -
Getting host, port from the tnsnames.ora with the service name
Hi.
I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
I'd appreciated if somebody knows it.caesarkim wrote:
Hi.
I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
I'd appreciated if somebody knows it.Oracle RDBMS does not require SQL*Net to operate.
Oracle RDBMS does NOT now or care about content of any tnsnames.ora file.
Realize that each (remote) user can have their own personalized copy of tnsnames.ora
The content of tnsnames not NOT have to reflect any reality.
I could post the content of my tnsnames.ora & it would be useless to everyone reading. -
SQL Developer cannot import connections from a tnsnames.ora
Just try sql develorper today, I saw it can import connections from a XML file or a .properties file? But has no an option to import from a tnsnames.ora ?
I think this should be a basic function. Did I miss it?You didn't answer the questions:
Would the connection name simply mirror the tns entry? I'm not sure that'd be correct since I frequently have multiple connections defined to 1 DB ( tns entry ) If you program this "connection collection" to be performed at first startup (asking the user if he wants to), before having added any connection, you have a 1:1 relation; problem solved.
If you want it enabled even after adding connections, you can add arbitrary suffixes (_1, _2 and so on).
What username would be defaulted?This is even easier: none.
That's the least the end-user can add. He can even leave it blank if he really wants to be prompted on connecting.
K. -
Can i use the default value in TNSNAMES.ora file
Hai , i connect the Vb to oralcle using Oracle data access component , and i have read the documentation for ora file.
Most documentation show to connect oracle with vb.net , the ora file must be modified.
My questions is , can i directly connect to Oracle without modify the ora file ?
Thank YouThank you for the reply. I will read the documentation first.
I install the oracle 10g express edition . Hence , i have two user , the sys an the other is hd.
How the TNSNAMES.ora known i want connect to which username ?
Thank you -
How to list the datasources without use a tnsnames.ora file?
Hi,
I want to use the OracleDataSourceEnumerator class of ODP.Net to list the datasources on which the user can connect.
It's work with a tnsnames.ora on the local station, so good.
But I want use the easy connect naming methode so i have edited the sqlnet.ora file with this:
NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
then i have deleted the content of the tnsnames.ora
so my code don't work : none datasource is returned by the OracleDataSourceEnumerator
So my question : is it a way to list the datasources without use a tnsnames.ora file?
Edited by: user13499556 on 17 déc. 2010 08:21You can check
DataConnectionFile.EnumerateDependants method
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom. -
Tnsnames.ora / listener.ora files on Oracle Standby Database
Hi I am configuring an Oracle Standby Database to my production system 4.7 and Oracle 9.2.0.4
My production server is: PR01
Database SID: PRD
Standby database server is: PRDR
Database SID: PRD
I have already configured the server to a standby database offline backup. Was generated the control files of the standby database and the database is in standby mode.
Now I will create a script to start the synchronization of offline redolog from the production server to standby server.
I have a question: in the document SAP Oracle Standby Database, tells me I should change the tnsnames.ora production server pointing to an additional entry disaster recovery server. The tnsnames.ora file must have two entries??? corresponding to a production server and another to the disaster recovery server??
In several links of oracle tells me I should configure listener.ora disaster recovery server that is true??
Guys my question is: where should I change my listener.ora and tnsnames.ora files?
Please clear my doubt.
Best regards,
DesireeHi Desiree,
The entry in your TNSNAMES.ORA is a nothing but a tns service, when you define archive log destination it will point to a service. This service's host name will be resolved in your tnsnsmaes.ora file.
Below is the eg of an entry in pfile:
*.log_archive_dest_2='SERVICE=<service_name> ARCH OPTIONAL'
Below is the entry in your tnsnames.ora file
<service_name>.WORLD=
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = <DR_HOST>)
(PORT = 1527)
(CONNECT_DATA =
(SID = <DB_SID>)
(GLOBAL_NAME = <DB_SID>.WORLD)
So, your tnsnames.ora will have one entry for your host and the other for the DR host, i.e two entries.
Listener entry for the convenience when there is a switch over.
Regards,
Bala -
ASM instance not shown in tnsnames.ora
Hi,
Currently I have an Oracle 11g database on linux with ASM installed, or at least that's what I can tell from querying v$logfile and v$datafile views. But in my tnsnames.ora and listner.ora I only see the db instance with no ASM instance. If I goto $ORACLE_BASE/admin, I see ASM and orcl. But under $ORACLE_BASE/admin/+ASM/pfile, I see no files.
This is a vm image by the way. The database is running fine as far as i can tell. My question is why there is no ASM entries in the above files?
Thanks for the help.ASM instance is not used by applications users. It is used by Oracle which can see it, so you do not need any entry in tnsnames.ora for ASM instance. Also ASM instance usage init.ora file from $ORACLE_HOME/dbs directory, so you do not see any file in admin/pfile directory.
Regards -
Hi,
I have both Oracle Client 9.2 and Instant Client 10.2.0.1.0 on my laptop. How to make Toad 8.5.1 locate tnsnames.ora file for instant client.
When I open Toad, and selects "Instant Client 10.2.0.1.0" as installed client, it shows the error message "tnsnames.ora not found!"
Below is the setting:
Instant Client - 10.2.0.1.0
ORACLE_HOME_NAME: C:\Program Files\PHP\
ORACLE_HOME: C:\Program Files\PHP\
ORACLE_SID:
NLS_LANG:
SQLPATH:
LOCAL:
C:\Program Files\PHP\ exists.
C:\Program Files\PHP\ is in PATH.
Client DLL: C:\Program Files\PHP\oci.dll
Client Version: 10.2.0.1.0
Home is valid.
Thanks
AshutoshSal, your comment is pretty irrelevant to the question :^)
user570251, since you are restricted to using Windows, it will not be easy for you to use two different Oracle clients on the same machine.
Basically, you'll have to change TNS_ADMIN whenever you want to change between clients.
Why do you need two client versions on your computer?
Yours,
Laurenz Albe
Maybe you are looking for
-
I seem to kill HD's every two years...the last two i've installed were WD Caviar Black 1TB 7200rpm 3.5" drives. The speed gains over stock drives have been remarkable. I don't blame the drives for the failures, my machines are up and running 16 hour
-
Is it possible to transfer music from one iTunes account to another?
I have a daughter who is still 14 months away from being 13 and so cannot have her own iTunes account. If I buy music for her under my account, can I later transfer it to her account when she is 13?? Any other idea on how to manage it?
-
Hello forum! I REALLY need some help formatting a DATE field correctly. I am working with the newest Data Services release, which I believe is 4.0. The server is Windows 2008 R2 and my client is running Windows 7 Pro. My source database is Oracle,
-
Automatic correction of converging lines and volume anamorphosis in lens tab
What would be very useful for architectural photography is to have a feature that detects vertical (and possibly even horizontal) lines like ShiftN does and an automatic correction for them. If that is going to be implemented it would be good to take
-
Keynote won't accept pasted items (graphics, eqs, etc)
I have a serious issue. The new Keynote 6,0 will not let me paste in graphics from say, Safari. It just pastes a genetic "text" label. I often import equations from Grapher.app and it wont let me paste that either, Anyone else see this issue?