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.

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.

  • About Tnsnames.ora

    Hi where can i get more info about 'Tnsnames.ora'.
    Thanks
    Venkat

    If you want in-depth info, do a search for the Net8 ADministrator's Guide from the OTN main page.
    Justin

  • Question about TNSNAMES and EZCONNECT

    I have 10.2.0.4 EE, RAC + Data Guard. From an app server, I issue the following:
    +$tnsping database1+
    TNS Ping Utility for Solaris: Version 10.2.0.4.0 - Production on 14-JAN-2013 12:37:36
    Copyright (c) 1997,  2007, Oracle.  All rights reserved.
    Used parameter files:
    oracle/product/10.2.0.4/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.19.246.142)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 172.19.246.143)(PORT = 1521)) (LOAD_BALANCE = no) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DATABASE1)))
    OK (0 msec)
    It said it had used the tnsnames, so I went to take a look at it:
    +$cd /oracle/product/10.2.0.4/network/admin/+
    +$ls+
    samples     shrept.lst  sqlnet.log  sqlnet.ora
    There's no tnsnames.ora. Did Oracle lie to me? :) This is the sqlnet.ora:
    +$cat sqlnet.ora+
    +# sqlnet.ora Network Configuration File: /oracle/product/10.2.0.4/network/admin/sqlnet.ora+
    +# Generated by Oracle configuration tools.+
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    Thanks for your help.

    It said it had used the tnsnames, so I went to take a look at it:
    +$cd /oracle/product/10.2.0.4/network/admin/+
    +$ls+
    samples     shrept.lst  sqlnet.log  sqlnet.ora
    There's no tnsnames.ora. Did Oracle lie to me? :) check TNS_ADMIN OS environment variable

  • Again about tnsnames.ora

    thx kmensah. but I want to use tnsnames.ora. in that document introuduce the way that I used before. but I want way of using tnsnames.ora .

    Wrong Post !!!

  • Oracle cleint and tnsnames.ora

    We have a duty to do some data analysis on one of our oracle databases. We have a copy of the tnsnames.ora file with the DB server and SID etc.
    If you use something like toad or golden to query the DB, do you also need to install the oracle client on the machine (windows XP?) Or just the TOAD software?
    Is there a default locaiton on XP where tnsnames.ora needs to be saved?
    And if we do need the client what is the correct version?

    user599292 wrote:
    We have a duty to do some data analysis on one of our oracle databases. We have a copy of the tnsnames.ora file with the DB server and SID etc.
    If you use something like toad or golden to query the DB, do you also need to install the oracle client on the machine (windows XP?) Or just the TOAD software?
    Is there a default locaiton on XP where tnsnames.ora needs to be saved?
    And if we do need the client what is the correct version?Toad, yes you need the Oracle client. Can't say about "golden", I don't even know what that is. In general, any product like this is going to sit on top of the Oracle client, not replace it.
    there is nothing magic about tnsnames.ora. It is just a names resolution file that is used by the oracle client software. If you have some magic application that replaces the oracle client instead of using it, then your tnsnames.ora will be of no intrinsic value beyond giving you the information you need to configure said magic application.
    Edited by: EdStevens on Oct 14, 2011 6:32 AM

  • A question about CREATE PUBLIC DATABASE LINK and ORA-12154 error

    Dear all,
    I have a problem about public database link creation and I would appreciate if you could kindly give me a hand. I have the following connection parameters in my
    tnsnames.ora file:
    DGPAPROD.WORLD =
         (DESCRIPTION =
           (ADDRESS_LIST =
            (ADDRESS = (COMMUNITY=tcp.world)
              (PROTOCOL=TCP)(HOST=ORASR001)(PORT=1521)
           (CONNECT_DATA = (SID = DGPAPROD))
    ...Having the above mentioned parameters I can connect to this remote database directly in a SQL*Plus shell:
    $ sqlplus username/[email protected] works pretty well and the connection is established without any problem.
    Now, what I would like to do is to create a public database link to this remote database in order to avoid the user/connection switching for viewing the
    content of this database. I proceeded according to the syntax indicated in the Oracle online documentation:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5005.htm#SQLRF01205
    Therefore I run the following in order to create a public database link
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING 'DGPAPROD.WORLD';Apparently there is no error and the link is created successfully. However it cannot resolve the remote host and whenever I run the following query
    (myenterprise is the name of a table in that remote database)
    SELECT *
    FROM myenterprise@SR001_dblink
    ERROR at line 1:
    ORA-12154: TNS:could not resolve the connect identifier specifiedWhat causes this problem?
    Thanks in advance,
    Kind Regards,
    Dariyoosh

    spajdy wrote:
    You must have defined DGPAPROD.WORLD in tnsnames.oar on server where you DB is runnig.Hello there,
    Thanks a lot for this nice solution. In fact I had to add the connection parameters into the tnsnames.ora file of the server on which the link was created (not the tnsnames.ora of my oracle client stored on the localhost)
    After a bit googling I found another solution that allows to create the database link:
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING '(DESCRIPTION =  (ADDRESS_LIST =  (ADDRESS = (COMMUNITY=tcp.world)
    (PROTOCOL=TCP)(HOST=ip_adresse)(PORT=1521)))(CONNECT_DATA = (SID = GPAPROD)))';Thanks a lot for your help!
    Kind Regards,
    Dariyoosh
    Edited by: dariyoosh on 18 nov. 2009 07:15

  • 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

  • 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,
    Jason

    The 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.

  • What should have in equal tnsnames,ora and listener.ora?

    Hi forum members again I'm very new in oracle, and I'm trying to create a sucessfull net service name, using oracle net configuration assitant, but when I try to test it I got this error, .***"""ORA-12514: TNS:listener does not currently know of service requested in connect descriptor."""*** And I have read that tnsnames.ora and listener.ora should have some parameters in common, but exactly I don't know, Do you know what parameters should be? or The ORA-12514 problem , doesn't have relation with the tnsnames.ora and listener files?, If doesn't wich is the reason of this message?
    By the way I put what contain these files:
    ---------------------------------------------------------------------------listener.ora
    # listener.ora Network Configuration File: /opt/oracle/product/10.1.0.3/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = oracle.gentoo)
    (ORACLE_HOME = /opt/oracle/product/10.1.0.3)
    (SID_NAME = oracle)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    SAVE_CONFIG_ON_STOP_LISTENER = TRUE
    TRACE_LEVEL_LISTENER = USER
    /////////////////////////////////////////////////////////////////////////////tnsnames.ora
    # tnsnames.ora Network Configuration File: /opt/oracle/product/10.1.0.3/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    NORACLE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = tux)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = noracle)
    By the way what must be the username and the pasword that ask the ORACLE CONFIGURATION ASSINTANT to test the net service name? Must be the user name and password of the system user?
    Thanks in advance

    OK, here we go ... extra long as I intend to bookmark this and make reference, as this is a very common question ... skip to the bottom if you want my guess to the solution.
    Oracle Net Services (formerly SQL*Net, Net8, Oracle Networking) has two parts - the client and the server side. I'll discuss the server first, then the client.
    1) Server, and specifically Listener:
    The Oracle Listener is a monitor that listens for Oracle service requests on one or more ports. Usually this is on TCP/IP port 1521. When it gets an Oracle request from any network client, it checks whether it's in the list of Oracle Services for which it is monitoring. If found, it will contact that service, request a connection for the client, tell the service and client where and how to connect, and get itself out of the loop.
    Notes:
    a) It can listen on behalf of any number of services;
    b) A service can be a database instance, an EPG service (the DBMS_EPG is the replacement for Apache in the database in 10gR2), an external job, etc;
    c) One listener can listen on behalf of multiple database instances;
    d) The services can be listed in the LISTENER.ORA or they can self-register;
    e) If databases self-register, they use the initialization parameter LOCAL_LISTENER
    f) If self-registering, the listener should be up before the database
    g) Shutting down the listener will stop future connections, but has no impact on existing ones.
    One frequent point of confusion - a connection request on the local machine may loop out to the network and contact the listener, or it may bypass the listener entirely and use a bequeath adapter. The 'beq' connection is the 'normal' connection by "sqlplus / as sysdba" or "sqlplus system/manager" on the local machine (note that no @instance was used ... in *nix, that is derived from the $ORACLE_SID environment variable)
    In your listener.ora, you specify global_dbname=oracle.gentoo and sid_name=oracle. I assume therefore you can find an initoracle.ora or spfileoracle.ora somewhere on your system.
    2) Client:
    A client that wants to connect to an Oracle service uses the client side of the Oracle Net Services. The definition of client includes: any Oracle client utiltiy (SQLPlus, SQLLoad, Forms, Reports, etc.); an Oracle database instance that wants to make a external procedure call or a dblink; third party tools such as ODBC and JDBC.
    In SQL*Net version 1 the connection was made by specifying the target in the connect string ("user/password@host:listener_port:sid") and that is also used these days by many JDBC drivers, especially the Oracle Thin JDBC driver. Oracle's Easy connection mechanism uses a similar variant.
    Since SQL*Net Version 2, Oracle has supported the concept of alias translation. Basically it's very similar in concept to DNS - give it the name of the service and tell it where to find the translation table. The translation tables include TNSNAMES.ORA, ONAMES servers (deprecated in 10g), LDAP usng Oracle's OiD. The choice of translation table, and alternate order if the lookup fails in one, is stored in the SQLNET.ORA (if one exists).
    Assuming TNSNAMES.ORA, the chain of events is:
    - get the alias to look up (in your case NORACLE);
    - if the SQLNET.ORA has a DEFAULT_DOMAIN setting, (often =WORLD) append a dot and that value to the alias;
    - go to the TNANSMES.ORA file pointed by the TNS_ADMIN variable (environment or registry), or (if not set) the one in the $ORACLE_HOME/network/admin directory;
    - look up the first occurance of the alias;
    - if found, use the protocol specified to request a connection to the host, usin DNS to unravel the host to an IP address if necessary (in your case TCP/IP, to TUX) ;
    - if host connection if made, connect to the listener that is configured for that port (in your case 1521);
    - if listener is there, ask it for connection to the service (in your case, you are asking for instance 'noracle');
    i if the listener knowwss about the service, it will hand off the request.
    Your problem appears to be asking for instance 'noracle' in the tnsnames but listeneing for 'oracle' at the listener. Of course, I can not see any auto-registered instances which you would get from "lsnrctl status" on the server.

  • Question about an Oracle SID

    I'm a bit confused about what a SID is. I understand that it represents a Database instance. However, as I create my database for the first time, I'm asking myself if I really understand what a SID is?
    My impression of a SID is a database instance that can contain/manage serveral databases. Is that correct?
    However, I wonder if I'm being miss lead by my thinking. During the database creation process it appears that there is a one-to-one relationship between a database and a SID. Meaning that a SID and database are a unique pair and that a one-to-one relationship exist only.
    That being the case when it comes the environment variable for "Oracle_SID" does it support having multiple SID's. What is the maximum number of SID that it can support? When connecting to a database in Oracle do I have to supply both the SID and global database name to make a connection? I plan to connect to my databases using both Java and C++.
    Thanks

    Thanks for you help. However, My question is about
    the "Oracle_SID" environment variable. I fully
    understand that a SID helps identify resources to
    manage a database. However, a server/machine can
    have any number of database residing on the
    server/machine.
    The installation instructions talk about the
    environment variables for a machine with the
    "Oracle_SID being one of those variables. Based on
    what you are telling me a server/machine can have
    only 1/one database residing on it based on the fact
    that the "Oracle_SID" environment variable can only
    accomodate one/1 SID. NO. That is NOT what I said. I said - One SID will equate to One database instance.
    You can have any number of SIDs.
    BUT you set the SID as an environment variable to tell the software which instance to you wish to connect. ORACLE_SID can only be set to one value. That represents the database instance to which you are about to connect. A tool such as SQLPlus supports only one connection to one instance at a time.
    >
    Is the "Oracle_SID" environment variable important
    when it comes to connecting to a database remotely?Not really. The key is the SERVICE_NAME which is used to tell the LISTENER which SERVICE you want to use.
    By default, there is one service that has the same name as the instance's SID.
    There is a connection description file, called TNSNAMES.ORA. That file is used the same as /etc/hosts in *nix - pass in an alias and get a connection description - IP in the case of HOSTS; machine, listener port and 'instance information' in the case of TNSNAMES.ORA
    The typical connection to an instance is something like
    sqlplus hans/test@ORCL
    The ORCL is the alias to look up in the TNSNAMES.ORA (or other lookup technique - equivalent to DNS). The client looks up the 3 pieces of information, sends a request to the listener which is (hopefully) listening on the specified port on the indicated machine. It then uses the 'instance information' to ask the database instance for a thread or process.
    Oracle8 and older used ORACLE_SID as the 'instance information'
    Oracle8i and newer uses SERVICE_NAME as the 'instance information'.
    Some Newbie DBAs equate SERVICE_NAME to ORACLE_SID, because one of the services has the same name as the SID. However, one can have up to 64 SERVICES managed by a single instance.
    Some Experienced DBAs equate SERVICE_NAME to ORACLE_SID, because they have not spent time in the documentation to understand the difference between SERVICE_NAME and SID. As a result, they generally do not 'get it' when it comes to resource management or instance consolidation.
    >
    If I'm managing a database at the server and the
    server has multiple database residing on it, how do I
    define a SID for each database using the "Oracle_SID"
    environment variable?If on LINUX, using bash, you simply
    export ORACLE_SID=abc
    or use the oraenv script to set the SID and all the other environment variables based on the SID.I give a description and example below.
    >
    I'm just not clear about the relationship between the
    "Oracle_SID" environment variable and access a
    database when logged onto the database
    server/machine.Say I have 2 databases, called 'ORCL' and 'TEST', each with a user (and schema) called 'hans'. Both are down. I want them both up. Therefore I want to start 2 instances.The pattern, on Linux (it's subtly different on Windows) is
    # set the environment to start ORCL
    . oraenv
    ORCL
    # or
    export ORACLE_SID=ORCL
    export ORACLE_HOME=some-directory-path-to-the-ORCL-database's-software
    export PATH=$PATH:$ORACLE_HOME/bin
    # use the tools to start the database
    sqlplus / as sysdba   # note that I did not specify SID ... that was given above
    startup
    exit
    # at this point ORCL database, and all the schemas in the ORCL database, are available
    # from anywhere in the network, or on the local machine, I can:
    sqlplus hans/password@ORCL
    select * from dual;
    exit
    # but TEST is not up and
    sqlplus hans/password@TEST
    #  will fail with a 'database not available' type of message
    # now set up to start test.  Use oraenv OR do it manually
    export ORACLE_SID=TEST
    export ORACLE_HOME=the-path-to-the-TEST-database's-software-which-could-be-the-same
    export PATH=$PATH:$ORACLE_HOME/bin
    # and use the tools to start the database
    sqlplus / as sysdba 
    startup
    exit
    # note that I did not specify SID ... that was given above and tells SQLPLUS to establish a connect to the
    # instance called TEST.  SQLPlus has special powers in the "as sysdba" mode - it can execute the
    # startup process.
    # NOW the TEST and the ORCL databases are available through the TEST and ORCL instances
    sqlplus hans/password@TEST
    select * from dual;
    connect hans/password@ORCL
    select * from dual;
    exit>
    I understand that when using the Enterprise Manager I
    have to specify the SID and database name but, does
    the environment variable "Oracle_SID" have to reflect
    a SID for each database that is present on the
    server/machine.
    The SID tells the system
    1) which shared memory segment to use - if we are on the server
    2) which instance to connect to over the network, because the SID is the same as the default SERVICE
    In Enterprise Manager Database Control, the entry point for the configuration files is a special directory under the ORACLE_HOME that consists of the machine name and the SID. The purpose of setting the ORACLE_SID in this case is to tell the database control which directory to use to find the EM configuration files for that database and instance.
    No matter which way you slice it:
    1) an Oracle SID is used to point to the configuration information for one database and it's related instance;
    2) an Oracle SID is really only meaningful on the machine where the instance is to run;
    3) an Oracle SID environment variable can only contain the value for one SID if it is to be intepreted by Oracle programs;
    4) an Oracle SID plays no significant part in establishing the connection for an appication;
    5) an Oracle SID MAY be used as input to environment-setting programs that make it easier to get the right environment for an application;
    6) an Oracle SID is NO LONGER the correct way to set up the TNSNAMES.ORA file to establish a connection.

  • Must PMON use tnsnames.ora to locate none-defualt listener?

    Hi,
    I just want to confirm this because it is said tnsnames.ora only used for client. So I am a little confused by this usage.
    Please give some explanation about this.
    Thanks in advance.
    Br
    Martin

    tqma wrote:
    Hi,
    I notice this, "Clients and database servers (that are clients of other database servers) use the net service name when making a connection with an application."
    The statement also tells me that tnsnames.ora only is used for client role.
    Ok, my question comes from these operations;
    1. I modify the listener.ora, adding a new none-default listener, such as on port 1899.
    2. When I want to register an instance to this new listener by statements of "alter system set local_listener=...; alter system register;", it fails.
    More details, for example, I add these codes in listener.ora
    TXT_LIS=
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = fztxt)(PORT = 1525))
    Then I issue command "alter system set local_listener=txt_lis;". This command will fail.
    I need to add this in tnsnames.ora; "Txt_lis=(ADDRESS = (PROTOCOL = TCP)(HOST = fztxt)(PORT = 1525))";
    After adding the entry in tnsnames.ora, the problem is solved. When I google this, it's said PMON needs tnsnames.ora to do name resolution.
    I think PMON is a server process. So I ask if tnsnames.ora is necessary for server side in this circumstance.Since it is contacting the listener, it is acting in client role at that point.
    OK, maybe that's splitting a hair a bit to fine ...
    I'd say OK, there is one single, not often used, time when a server process uses tnsnames. But 99.999999% of the time, when people are trying to debug connection problems and can't keep straight in their mind the difference - in location and function - between client and server processes . . . it's true enough to tell them the tnsnames is used only by client processes.
    >
    Br Martin
    Edited by: tqma on May 25, 2011 10:10 AM
    Edited by: tqma on May 25, 2011 10:13 AM

  • A question about creating READ ONLY users.

    Dear all,
    I have a question about read only user accounts and I would appreciate if you could kindly give me a hand. I have a schema named SCHEMA1. Whenever I want to connect by using sqlplus I run the following:
    sqlplus user1/[email protected] SCHEMA1.WORLD is the entry in the tnsnames.ora referring to the schema SCHEMA1.
    I need to create a read only user who is able to SELECT all tables and views created by user1 on SCHEMA1 (this user will not modifiy anything at all. The user is used only for a person using SQL queries to read data). for several tables I write the grants explicitly, for example:
    CREATE USER user2 IDENTIFIED BY user2;
    GRANT CREATE SESSION to user2;
    GRANT SELECT ON S001_COR_ECLASS TO user2;
    GRANT SELECT ON REF_ECLASS511 TO user2;Is there anyway to do the same thing but for all the tables (because there are a lot of tables and views)? Besides, even with these granted permissions when the user connects with SQL Developer to the database, he is not able to view the list of tables/views in SQL Developer GUI. What causes this problem?
    Thanks in advance,
    Dariyoosh

    Hello Dariyoosh,
    he is not able to view the list of tables/views in SQL Developer GUIyou can either go to "Other Users" - user1 - tables. There you see every table you have permission to select.
    Or you can create a synonym in schema2 for each table in schema1 and set a filter on the tables node of user2 "Include synonyms".
    Regards
    Marcus

Maybe you are looking for