What TNSNAMES?

Hi all

on the 11g R2, we have three files in D:\oracle\product\11.2.0.4_64b\client_1\network\admin:

tnsnames.ora

tnsnames_primary.ora

tnsnames_second.ora

How do I know which is used?

We can define a file under a different name than tnsnames.ora tnsnames serve? How?

Thank you.

user10274093 wrote:

Hi all

on the 11g R2, we have three files in D:\oracle\product\11.2.0.4_64b\client_1\network\admin:

tnsnames.ora

tnsnames_primary.ora

tnsnames_second.ora

How do I know which is used?

We can define a file under a different name than tnsnames.ora tnsnames serve? How?

Thank you.

I have been working with Oracle for v7.3 and have written extensively on the AMT configuration, and I don't know any way to tell oracle to use one file other than simply "tnsnames.ora.  You can control WHERE he's looking for the file, but not the name of the file.  If someone can prove me wrong, I'd be more than happy to learn otherwise.

If your question is 'why do we have other files' I must say that you have to ask the guy who put them there.  They are certainly not creating oracle.

Tags: Database

Similar Questions

  • Setup multiple server... what plsql... what tnsname.ora?

    I have several copies of the installed Oracle software (multiple ORACLE_BASE and each one has several software database installed).

    When I type SQLPLUS, one of them starts.

    In Windows, I know, it depends on the PATH variable. How do I know what SQLPLUS. EXE is launched?

    Also, what TNSNAMES file. ORA file is used for a connection to SQLPlus?

    Oracle 10g R2.

    Thank you
    Smith

    You can determine what tnsnames.ora is getting used by setting the OS TNS_ADMIN environment variable to the directory where your tnsnames.ora preferred listener.ora etc. is located.

    Kind regards
    Uwe

    http://uhesse.WordPress.com

  • customer will not use the correct tnsnames.ora file

    Hello all, I installed oracle 10g client on my machine... but here's the thing... I tnsnames.ora several file on my machine (which I can't delete or play with)... and because of this oracle is not able to connect to the database I want it to connect to... I can't do tnsping to the database... is there a way where I can point my client to use a specific tnsnames.ora file? as a pointer? or something where it will look in this file specific tnsnsame.ora?

    You can specify what tnsnames.ora for use the TNS_ADMIN environment variable
    Switch to the directory that contains your tnsnames.ora to use.

    Kind regards
    Uwe

    http://uhesse.WordPress.com

  • Very weird client connection problem: customer TAF can only access in standby mode

    I have created service and trigger on the principal database and the service started.

    However if I test it on my workstation, I can not open into the fermenter at all with the ora-12514 error.

    However, if I do a failover to the standby database, at this time there Eve becomes primary, I am able to connect to this service.

    Or I tried to start the service on the database pending while the watch is in sleep mode, I can't connect to the service_name even relaxation for the primary database connection.

    How to diagnose this problem?

    Help, please. Enjoy your time.

    Hello;

    I would check the client side first. I think you probably have a problem minor tnsnames.

    If the listener is not running, you can't get a TNS-12514 - means that you get a listener is running, but it's good?

    Troubleshooting - ORA-12514

    1. Enter the command-line command "lsnrctl status".

    2. check the host for which the listener is listening if it is not correct, the difficulty of the LISTENER. ORA

    3. check (on this host) port on which the listener is listening if it is not correct, the difficulty of the LISTENER. ORA

    4. check if the listener knows of this service

    Client side in the TNSNAMES file. ORA

    1 make sure that the points of entry to the correct host ADDRESS (verification of strike fault).

    2. check the ADDRESS of the entry points to the right port (PORT = 1521) (this would cause this error)

    3. check the ADDRESS of the entry points to a known service (once again a small typo will really hurt)

    If it still does not work, check the SQLNET. ORA make sure that domaine_par_defaut is not incorrect (it is a long shot)

    I guess your trigger start service, begins in the affirmative and lsnrctl shows, to Client-side. Sleep works if the triggers will fire OK it. Recheck the service name vs say what tnsnames. Try to manually start the service outside the trigger and if it still doesn't work its probably isn't the trigger.

    Any chance one of the entries is missing in the tnsnames file? Or has a hidden piece of white space around it for the primary is broken but the work of sleep?

    I would check "The tnsnames.ora used by the customers of the Application" here:

    http://uhesse.WordPress.com/2010/11/05/real-time-query-for-read-mostly-applications/

    Best regards

    mseberg

    Published by: mseberg on December 17, 2011 09:02

  • Creating a service; What must be included in tnsnames.ora and JDBC url?

    DB version: 11.2.0.2
    Operating system platform: Solaris 10

    We have a 2 RAC node.
    DB name   = mbsprd
    Instance1  = mbsprd1
    Instance2  = mbsprd2
    I want 1 Instance (mbsprd1) to use for our OLTP and Instance 2 (mbsprd2) application to use for another nature DSS request.

    According to the syntax
    srvctl add service -d <dbname> -s <ServiceName> -r <Preferred Instance> -a <Available Instance>
    I create 2 services

    -Creation of a service called OLTP
    srvctl add service -d mbsprd -s OLTP  -r mbsprd1 -a mbsprd2
    -Creation of a service called DSS
    srvctl add service -d mbsprd -s DSS  -r mbsprd2 -a mbsprd1
    -Start services
    srvctl start service -d mbsprd -s OLTP
    
    srvctl start service -d mbsprd -s DSS
    I guess the above steps are sufficient to set up a service on the side server.

    I would like to know what needs to be done on the client side.

    Currently the file tnsnames.ora and JDBC url used by our clients are listed below. What needs to be added to the file URL and jdbc tnsnames.ora to start to use the services configured above?
    -- SCAN based TNS entry 
    mbsprd =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (COMMUNITY = tcp.world)
            (PROTOCOL = TCP)(Host = p148149-scan.tpam.net) (Port = 36964))
        )
        (CONNECT_DATA =
          (SERVER       = DEDICATED)
          (SERVICE_NAME = mbsprd)
          (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))
        )
      )
    
    -- TNS entry based on local listener 
    -- Instance 1
    mbsprd1 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp148-vip)(PORT = 36973))
       )
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd1)
           )
     )
    
    -- Instance 2
    -- TNS entry based on local listener 
    mbsprd2 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp149-vip)(PORT = 36973))
       )
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd2)
           )
     )
    Entry for RAC JDBC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:mbsprd
    -Another version used by some clients, because the above had "some problems".
    jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=p148149-scan.tpam.net) (PORT=36964))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mbsprd)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 10))))
    OLTP =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = OLTP)
        )
      )
    DSS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DSS)
        )
      )
    

    Entry for RAC JDBC

    JDBC:Oracle:thin:@p148149-scan.tpam.NET:36964:SERVICE_NAME

    JDBC:Oracle:thin:@new_tns_entry_description (if you do not want to connect to the database with particular service)

    Try this and let us know about problems,

  • What host and Service using TNSNAMES


    Hello

    I created a cluster 2 nodes (LAB4 LAB5) in 11 GR 2 grid Infrastructure, which currently holds my ASM Instance cluster

    I'm trying to determine which setting host and Service name I should use on a client to allow connect to ASM as a local connection to the node and connection of cluster.

    I'm tresting 3 types of assemblies of TNS below

    + ASM1 - a simple connection to the ASM instance directly LAB4 as if she was not grouped

    + ASM1_VIP - I think that it is of the old method of 10g to connect to the cluster?

    + ASM1_SCAN - I think it's the new way to 11 GR 2 to connect to the cluster?

    Since my node LAB4

    Grid1 [+ ASM1] > lsnrctl stat

    LSNRCTL for Linux: Version 11.2.0.4.0 - Production April 1, 2014 16:15:35

    Copyright (c) 1991, 2013, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = LISTENER)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
    Start date April 1, 2014 09:53:53
    Uptime 0 days 6 h 21 min 43 sec
    Draw level off
    Security ON: OS Local Authentication
    SNMP OFF
    Parameter Listener of the /home/app/11.2.0/grid/network/admin/listener.ora file
    The listener log file /home/app/Oracle/diag/tnslsnr/Lab4/listener/alert/log.XML
    Summary of endpoints listening...
    (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER)))
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.0.5) (PORT = 1521)))                         THIS IS MY address PUBLIC IP for this node
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.0.97) (PORT = 1521)))                         THIS IS MY VIP for this node
    Summary of services...
    Service '+ ASM' a 1 instance (s).
    Instance '+ ASM1' READY State, has 1 operation for this service...
    The command completed successfully

    The other shows, node listener (LAB5)

    Service '+ ASM' a 1 instance (s).

    Instance '+ ASM1' READY State, has 1 operation for this service...

    My server hosts file contains

    192.168.0.5 lab4 lab4.nms
    192.168.0.97 lab4-vip lab4 - vip.nms
    192.168.2.97 private lab4 lab4 - private.nms

    192.168.0.6 lab5 lab5.nms
    192.168.0.98 lab5-vip lab5 - vip.nms
    192.168.2.98 private-lab5 lab5 - private.nms

    192.168.0.100 cluster1-scan
    192.168.0.101 cluster1-scan
    192.168.0.102 cluster1-scan

    * I don't use DNS / GNS - where the 3 inputs static analysis

    So I put my client TNSNAMES as follws-

    The reason for the 3 types of connection, I mentioned at the beginning of this forum

    #ASM instance on LAB4 via public IP

    + ASM1 =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = lab4)
    (PORT = 1521)
    )
    (CONNECT_DATA =
    (SERVICE_NAME = + ASM1)
    )
    )

    #ASM instance on LAB4 via VIP audience that is the old method of 10g to connect to a cluster

    + ASM1_VIP =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = lab4-vip)
    (PORT = 1521)
    )
    (CONNECT_DATA =
    (SERVICE_NAME = ASM)
    )
    )


    #ASM instance on Cluster via Public Cluster SCAN, i.e. the new 11g method to connect to a cluster

    + ASM_SCAN =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = cluster1-scan)
    (PORT = 1521)
    )
    (CONNECT_DATA =
    (SERVICE_NAME = ASM)
    )
    )

    The good thing is that a TNSPING to my client to all the 3 entries above, succeed

    Q1. Name of the Service don't know '+' i.e. that why for the + ASM1_VIP and _ASM_SCAN entry above, I could put neither ASM the SERVICE_NAME and not + ASM?

    Q2. I presume that for the method of 10g - the name of the Service be indeed ASM and not ASM1?

    Q3. If LAB4 should fail, my other node, LAB5, would inherit of the LAB4 VIP

    Thank you

    Jim

    Hi Jim,.

    SCAN is for the client computer access to the clusterdatabase without having to know which server in the cluster is to serve the db. SCAN is for your normal databases NOT the asm instance, your customers do not need to access.

    To connect to your instance asm on each node with sqlplus and get an output of:

    See listener parameter setting

    It will show, that asm has local defined listener and will register with the listener node running on your virtual IP address. It will not appear an entry for the remote listener.

    For your no - ASM databases, you will find set remote_listener parameter and pointing to SCAN listeners usually via an entry in the tnsnames like this file:

    MYDB =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = your-rac-scan-name)(PORT = XXXX))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = mydb)

    )

    )

    lsnrctl status

    -> you will get the output of the listener node

    lsnrctl status LISTENER_SCAN1

    -> you would give the output of the listener to scan if SCAN1 runs on the node of your ssh shell is sitting.

    Concerning

    Thomas

  • What configuration must define in tnsnames.ora

    Dear all,

    Need your help. I have zero knowledge in oracle. Now, I need to conenct to the Oracle database from my window via SQLPlus server, which configuration should I set in my tnsnames.ora? A or B?

    Set A
    PNTP =
    (DESCRIPTION =
    (LOAD_BALANCE = on)
    (FAILOVER = on)
    (ADDRESS_LIST =
    (SOURCE_ROUTE = yes)
    (ADDRESS = (PROTOCOL = TCP) (HOST = Hostname1)(PORT = 1521))
    ((ADDRESS = (PROTOCOL = TCP) (HOST = Hostname2)(PORT = 1521)))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = pntp)
    )
    )

    Series B
    PNTP =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = Hostname1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP) (HOST = Hostname2)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = pntp)
    )
    )
    How can i make sure the pointer are D:\oracle\ora92\network\ADMIN and not another folder? Can check from "environment variables "? WHich part?
    

    I suggest you go back to the documentation and reading.
    Please look at the following:

    http://download.oracle.com/docs/cd/B19306_01/install.102/b14312/post_install.htm#CHDBIHEE
    
    Then, on each client computer, configure either of the following settings:
    
        *
    
          Set the TNS_ADMIN environment variable to specify the location of the tnsnames.ora file and specify a service name from that file.
        *
    
          Place the tnsnames.ora file in the ORACLE_BASE\ORACLE_HOME\network\admin directory, and make sure that the ORACLE_HOME environment has been set to this Oracle home.
    

    Your tnsnames.ora file should contain the following, assuming that you have (n) number of nodes:

    PNTP =
    (DESCRIPTION =
    (LOAD_BALANCE = on)
    (ADDRESS_LIST=
    (ADDRESS = (PROTOCOL = TCP)(HOST = Hostname1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = Hostname2-vip)(PORT = 1521))
    .
    .
    .
    (ADDRESS = (PROTOCOL = TCP)(HOST = Hostname(n)-vip)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = pntp)
    )
    )
    

    Please mark as useful and correct issues and close the thread as answered.

    Kind regards.

    Published by: user11150436 on March 21, 2011 08:54

  • After changing the port (1521 to 1525 in listener.ora and tnsnames.ora) OEM: the database is down

    Hello

    I'm installing Oracle Database 11 g 2 (11.2.0.4) on Oracle Linux 7.1.

    In short, what I'm trying to do now is changing the default port of 1521 to 1525.

    So I stopped the listener (lsnrctl stop) and then changed my listener.ora and tnsnames.ora:

    Listener.ora

    listener.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

    # Generated by Oracle configuration tools.

    LISTENER =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))

    )

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP (PORT = 1525))(HOST = localhost))

    )

    )

    ADR_BASE_LISTENER = / u01/app/oracle

    tnsnames.ora

    tnsnames.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

    # Generated by Oracle configuration tools.

    BI =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP (PORT = 1525))(HOST = localhost))

    )

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = bi)

    )

    )

    And then changed the local_listener:

    SQL > ALTER SYSTEM SET LOCAL_LISTENER = "(ADDRESS = (PROTOCOL = TCP)(HOST=localhost) (PORT = 1525))";

    SQL > ALTER the REGISTRY SYSTEM;

    Finally, I started the listener (lsnrctl start) again.

    Then I tried to connect using Oracle SQL Developer to the customer. The port of 1525 works perfectly well.

    The problem is, when I open the OEM (Oracle Enterprise Manager), it says: "the database is down. Please specify the credentials of the host to access the restart and database diagnostic tools," which is like this: http://imgur.com/oKLPW65

    So I logged on the account of the host, and it shows that the database instance, listener and the agent is all down like this: http://imgur.com/Bzr84bz

    It seems that the port used by the OEM is always 1521.

    What should I do? Can someone help me solve the problem?

    Thanks in advance.

    UPDATE:

    After changing the emoms.properties & the targets.xml (thanks to Elisabeth), you will need to reconfigure dbconsole using emca.

    So what I'm doing is decreasing the config:

    $ emca - deconfig dbcontrol db-rest drop

    and then create again:

    $ emca - create config dbcontrol db-rest

    Voila.

    Best regards

    Jerry Antonius

    Hello

    Try to change the port numbers in the following files

    Don't port no 1521 to 1525

    $ORACLE_HOME /_SID/sysman/config/emoms.properties

    oracle.sysman.eml.mntr.emdRepPort = 1525 (before 1521)

    $ORACLE_HOME /_SID/sysman/emd/targets.xml

    (Before 1521)

    (Before 1521)

  • Many ENTRIES in my TNSNAMES.ora

    Hi all

    EBS 11i

    9i db

    I'm curious to know why ebs puts a lot of entries in the tnsnames.ora

    All of these inputs are necessary?

    What happened if I only keep the first entry and delete others?

    Thank you very much

    JC

    tnsnames.ora

    ==========

    DEV =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp)(HOST=oratrng5.abc.local) (PORT = 1521))

    (CONNECT_DATA =

    (SID = DEV)

    )

    )

    DEV_806_BALANCE =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp)(HOST=oratrng5.abc.local) (PORT = 1521))

    (CONNECT_DATA =

    (SID = DEV)

    )

    )

    DEV_FO =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp)(HOST=oratrng5.abc.local) (PORT = 1521))

    (CONNECT_DATA =

    (SID = DEV)

    )

    )

    DEV_LOCAL =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp)(HOST=oratrng5.abc.local) (PORT = 1521))

    )

    DEV_BALANCE =

    (DESCRIPTION =

    (LOAD_BALANCE = YES)

    (FAILOVER = YES)

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = tcp)(HOST=oratrng5.abc.local) (PORT = 1521))

    )

    (CONNECT_DATA =

    (SID = DEV)

    )

    )

    DEV_REMOTE =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = tcp)(HOST=oratrng5.abc.local) (PORT = 1521))

    )

    )

    extproc_connection_data =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROCDEV))

    )

    (CONNECT_DATA =

    (SID = PLSExtProc)

    (PRESENTATION = RO)

    ) )

    IFile=/U02/oradev/devdb/9.2.0/Network/admin/DEV_oratrng5/DEV_oratrng5_ifile.ora

    Yes

    concerning

    Pravin

  • confusions tnsnames.ora

    Hi all

    11.2.0.3

    We have the listener.ora on our prod server.

    Listener.ora

    ========

    PROD =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = prodsvr) (PORT = 1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = PROD)

    )

    )

    LISTENER_SVR =

    (ADDRESS = (PROTOCOL = TCP)(HOST = prodsvr) (PORT = 1521))

    =========

    My question is, what is the usefulness of the LISTENER_SVR line? If I delete it, my tnsnames still works. Is it useless at all?

    Thank you

    pK

    Question is, why would you type this value in the tnsnames.ora? And you must confirm that after stop and restart listener, it's still operational or not. If this is the case, you don't need this entry.

    HTH

    Aman...

  • location of the file tnsnames.ora and Listener.ora

    Hello

    env: Oracle 11 g 2 - Orable Linux 6.2 64bits

    I set up a database for the client server. I installed IM and the House according to the standards of the Oracle RDBMS. Then I configured the listener to run BOF IM home. If the location of the 'ora, tnsnames' and 'listener.ora' files is $GI_HOME/network/admin.

    Customer's DBA is asking me to conform to the standard for the location of these two files. Here's what he asked for:

    / opt/oracle/owner = oracle, group = s/n (755 permissions)

    / var/opt/oracle owner = oracle, group = s/n (755 permissions)

    • -touch /var/opt/oracle/listener.ora
    • -touch /var/opt/oracle/tnsnames.ora
    • -chown oracle: dba /var/opt/oracle/listener.ora
    • -chown oracle: dba /var/opt/oracle/tnsnames.ora
    • -s /var/opt/oracle/tnsnames.ora /etc/tnsnames.ora ln
    • -s /var/opt/oracle/listener.ora /etc/listener.ora ln

    I'm completely lost here. I don't know if I'm moving these two files in the folder "/ etc", how the LISTENER know about the presence of these files in ' / etc '.

    His reason for this is to support the possibility of having several houses of Oracle's RDBMS. I don't know what he's talking about.

    Please notify.

    Best regards

    user130038 wrote:

    Thanks to you two!

    So basically this DBA do not like to follow standards of Oracle but his own.

    BINGO!

    What is the problem with the help of $ORACLE_HOME/network/admin for these two files if there were several homes of oracle on a server? Sorry I never got to work on a server with multiple oracle homes, so I have no idea.

    The 'standard' with several houses installation is to run the listener from the version the most recent House.  If all of the houses are of the same version (putting aside the question of 'why'), then just pick one that is going to be home for the listener.  If the installation program uses the Grid Infrastructure (ASM and/or Oracle Restart), you must run the listener from the House of IM, not House the database.

    There are some key things to consider here.

    1. the auditor is to receive and process applications for connecting customers.  This is why the listener has no meaning on the Server.  Similarly, its configuration file, listener.ora, only makes sense on the server.

    1a. a single listener, using the default name of the LISTENER and the unique default port of 1521 is quite capable of--indeed, we wanted to - several multiple databases editions of multiple service homes.

    2. the tnsnames.ora file provides a name resolution and address customers.  So it has the sense that on the client computer.

    2. when a database uses a db link to access a different database, the first database acts as a client to the second - as with any other LDAP client.

    Best regards

  • Connect to the database with SQL * more: is TNSNAMES. ORA used?

    Hello

    We have a local database called DEV01 and a copy of this database in a data center. To be able to connect to both databases, the TNSNAMES file. ORA

    on the local database server (not the one in the data center) has the following entries:

    / * Entry for the 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 the database in the data center * /.

    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 * more as follows:

    Oracle # > sqlplus user/user

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

    ---------------- ----------------------------------------------------------------

    SERVER01 DEV01

    As the SID is on two databases of the same (DEV01) I really don't understand how Oracle decides which of the SQL databases * more connects to.

    Is it the entry in the TNSNAMES file. ORA?

    But when I start SQL * more as follows:

    Oracle # > sqlplus user/user@DEV01_local

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

    ---------------- ----------------------------------------------------------------

    SERVER01 DEV01

    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 anyone know who is the chosen database when just to connect with 'sqlplus user/user' (without the @DEV01 or @DEV01_local)?

    Any help will be appreciated!

    Rgds

    Jan

    When you connect to the local database that is connected to the server01, you need only specify the sid in the environment, in this case, Oracle tnsnames file to connect, actually uses, it uses any of the listener.  It uses what is called a connection needed.  It is purely a side connection server, and as long as the sid is located in the environment resolves to a database running on that server, you will be get connected.

    When you connect using the @connect_descriptor, like you second case, then Oracle will use the configured naming, including tnsnames, methods to solve the 'real' database  In this case, the auditor is required to create the connection to the database.

    John

  • What is trying to connect to sqlplus? I don't have a database on my machine.

    Strange because I don't know what I'm doing.  I have a Linux machine.  It has a new installation of 11 GR 2 for learning.  I am now on my Windows machine.  I thought that I could connect to the Linux box.  On the Windows machine when I start SQL Plus it requires a username and password.

    Why would he do that? I am not connected to all I know.  There is a production site and I tnsnames.ora for other things such as ODBC, JDBC, etc. but I've never used SQL more on this machine (Windows).  Thanks for help.

    It's the moment customer 11.2.

    For what you type in.

    It does not need to connect to a particular database.

  • Net Oracle does not read the tnsnames.ora file.

    I am running 11.2.0.3 on Solaris 10 SPARC x 64. I'm trying to configure oracle net for a new database on hold in order to be able to use rman duplicate to create. LDAP is what we mainly use for all of our connections and, possibly, what I could use very well for my goal of rman duplication. But, I fear that I do nothing seems to allow me to read the tnsnames.ora file.

    My SQLNET. ORA file is as follows:

    NAMES. DIRECTORY_PATH = (LDAP, TNSNAMES)

    NAMES. DEFAULT_DOMAIN = mydomain.com

    My TNSNAMES file. ORA file is as follows on both servers:

    WLDB_HERE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primary_server) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = wldb_here.mydomain.com))
    )

    WLDB_THERE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = standby_server) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = wldb_there.mydomain.com))
    )

    I have a static entry in the remote listener.ora file so I can connect to create the instance:

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wldb_there.mydomain.com)
    (ORACLE_HOME = / u01/app/oracle/product/OraHome112)
    (SID_NAME = WJZI)
    )
    )

    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = standby_server) (PORT = 1521))
    )

    Permissions on my .ora files in $ORACLE_HOME/network/admin are

    -rw - r - r - 1 oracle dba

    The user that I am connected to who is oracle.

    I have set up several times before, but for some reason that I can't get this to work. I get

    AMT-03505: failed to resolve host

    Of

    tnsping wldb_there

    or

    tnsping wldb_here

    I have not tried to take the LDAP Protocol on my sqlnet.ora because I need, but I really want to know if anyone has had an experience like this before.

    Thank you-

    gregb wrote:

    I am running 11.2.0.3 on Solaris 10 SPARC x 64. I'm trying to configure oracle net for a new database on hold in order to be able to use rman duplicate to create. LDAP is what we mainly use for all of our connections and, possibly, what I could use very well for my goal of rman duplication. But, I fear that I do nothing seems to allow me to read the tnsnames.ora file.

    My SQLNET. ORA file is as follows:

    NAMES. DIRECTORY_PATH = (LDAP, TNSNAMES)

    NAMES. DEFAULT_DOMAIN = mydomain.com

    My TNSNAMES file. ORA file is as follows on both servers:

    WLDB_HERE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primary_server) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = wldb_here.mydomain.com))


    )

    Because you have NAMES. DEFAULT_DOMAIN = mydomain.com in your sqlnet.ora, when you try to connect to "WLDB_HERE", before tnsnames.ora is read, sqlnet will transform your application in "WLDB_HERE.mydomain.com".  And that's what he's going to get.

    You do not have an entry in your tnsnames.ora to 'WLDB_HERE.mydomain.com '.

    WLDB_THERE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = standby_server) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = wldb_there.mydomain.com))
    )

    I have a static entry in the remote listener.ora file so I can connect to create the instance:

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wldb_there.mydomain.com)
    (ORACLE_HOME = / u01/app/oracle/product/OraHome112)
    (SID_NAME = WJZI)
    )
    )

    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = standby_server) (PORT = 1521))
    )

    Permissions on my .ora files in $ORACLE_HOME/network/admin are

    -rw - r - r - 1 oracle dba

    The user that I am connected to who is oracle.

    I have set up several times before, but for some reason that I can't get this to work. I get

    AMT-03505: failed to resolve host

    Of

    tnsping wldb_there

    or

    tnsping wldb_here

    I have not tried to take the LDAP Protocol on my sqlnet.ora because I need, but I really want to know if anyone has had an experience like this before.

    Thank you-

  • TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES

    Hello Guru´s

    I have a master performer oracle 11.2.0.1 on HP - UX uniix database. tnsnames clients to run the application using this data base.

    TNS is like this:

    Prod.appmill.World =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.20)(PORT = 1522))
    )
    (CONNECT_DATA =
    (SID = prod)
    )
    )


    the standby database is running in another server ip = 192.168.30.25 and the database pending have different ORACLE_SID = prodmill.

    When we activate the day before I update tns to all clients to run the application. i´d would like to have this automatic with multiple entries in the AMT for servers and the two SID then when whent main site down, we open the day before and the application will return to just work just close and reopen.

    Thanks for your help.

    BR

    799458 wrote:
    Thank you to answer.
    that s the doc I was reading since before I made the post here.

    on the address, I think that I understand, but what about SIDS? as I said my standby database has a different SID in the master database and this is what I m faced with.

    Thanks a lot for your help.

    BR

    Published by: 799458 on February 11, 2013 12:34

    As Robert said, don't use SID, use SERVICE_NAME.

    Maybe something like:

    FUBAR =
     (DESCRIPTION_LIST=
      (DESCRIPTION=
       (ADDRESS=(PROTOCOL = TCP)(HOST = myprimary)(PORT = 1521))
       (CONNECT_DATA=
         (SERVICE_NAME=FUBAR_PRI)))
      (DESCRIPTION=
      (DESCRIPTION=
       (ADDRESS=(PROTOCOL = TCP)(HOST = mysecondary)(PORT = 1521))
       (CONNECT_DATA=
         (SERVICE_NAME=FUBAR_SEC)))
    

    Published by: EdStevens on February 11, 2013 14:58

Maybe you are looking for