Configuring tnsnames.ora / listener.ora with HOST = localhost

Dear Oracle experts,
presently I'm trying to configure an Oracle installation on a Win2k server
to work with HOST = localhost entries in my tnsnames.ora and listener.ora.
I have to do that because I want to use that Oracle installation as an image
for several computers which will get different IPs and computer names.
My problem is, taht I only can configure my entries with a real IP adres (127.0.0.1 does not work ) or with the present name of the system but not with localhost or 127.0.0.1.
My listener.ora looks like below :
# listener.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU = 4096)
(SID_NAME = EMS)
(ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
(PRESPAWN_MAX = 10)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost )(PORT = 1521))
The listener above lead to a
ERROR - ORA-12541: TNS:no listener
if I try to connect via iSQLPlus. If I exchange HOST = localhost with HOST = mydnsname the I can connect to the computer via isqlplus.
Is there any possibility to configure the listener and tnsnames without using real IP adresses ?
Best regards,
Daniel Wetzler

Hi maran,
thanks for your answer.
i started the listener from cmd and had the output below :
C:\Documents and Settings\ECS>lsnrctl start
LSNRCTL for 32-bit Windows: Version 10.1.0.2.0 - Production on 22-MAR-2007 16:04
:32
Copyright (c) 1991, 2004, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production
System parameter file is D:\oracle\product\10.1.0\Db_1\network\admin\listener.or
a
Log messages written to D:\oracle\product\10.1.0\Db_1\network\log\listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Produ
ction
Start Date 22-MAR-2007 16:04:33
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\oracle\product\10.1.0\Db_1\network\admin\listener.o
ra
Listener Log File D:\oracle\product\10.1.0\Db_1\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "EMS" has 1 instance(s).
Instance "EMS", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
C:\Documents and Settings\ECS>
In my listener.log I found the following information :
TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production on 22-MAR-2007 16:11:42
Copyright (c) 1991, 2004, Oracle. All rights reserved.
System parameter file is D:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
Log messages written to D:\oracle\product\10.1.0\Db_1\network\log\listener.log
Trace information written to D:\oracle\product\10.1.0\Db_1\network\trace\listener.trc
Trace level is currently 0
Started with pid=1672
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
22-MAR-2007 16:11:43 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=ECS))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=168821248)) * status * 0
So it seems that my lister is running fine, isn't it ?
But I cannot conect to my database....
I pasted my tnsnames.ora below.
Perhabs there's a bug I didn't fins yet. But if I replace in both files t(tnsnames.ora and listener.ora the "localhost" with my local IP it works just fine...
# tnsnames.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
SIG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost )(PORT = 1521))
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = SIG)
Hpe someone can help.....
Best regards,
Daniel

Similar Messages

  • TNSNAMES.ora et HOSTS file on windows

    Hi,
    in TNSNAMES.ora for host field I put correct IP adresse.
    In hosts file of Windows I have defined an alias for the same host with wrong IP adresse. Then I can not connect to DB and I have TNS-12541 error.
    Then I put the correct adresse for host alias in hosts file. Everything is OK and I can connect to DB
    Is -it normal ? Why does not ORACLE use TNSNAMES.ora and it looks in hosts file ?
    Do you have any explanation ?
    Many thanks.

    check address in listener.ora and tnsnames.ora
    Try to connect with ip address.
    host file is used for address resolving.
    Regards

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

  • 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.
    Luis

    Hi 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

  • Troubles with TNSNAMES.ORA - with solution

    Hi There
    I've had the problems described and solved in other entries of the forum.
    But then I ran in to a new one, the product would only read part of the file..!
    I've found that the problem apparently is that if there is an entry with a host that is not available then the product stops reading the file.
    I removed the entry and then it continued until the next unavailable server, which i then deleted. Finally I had a full TNS list in the product. But when the other servers becomes available again I have to add them to TNSNAMES.ORA, so I hope Oracle will fix it.
    A part from that a fine product.
    /regards Ole Jørgensen

    Thats strange, as we do not ping every host to make sure it is available. is this a 10.2 Oracle Home?

  • How to configure ldap.ora with multiple ldap contexts

    Hello.
    My company has recently taken on another environment with it's own LDAP configuration. It's a bit tedious to have to keep switching my ldap.ora for both ldap configurations. Are there any good suggestions for either allowing me to search both LDAP configurations (2 separate LDAP setups, with 2 default context)? Or is there a smooth way to populate 1 LDAP with the others data? Or perhaps some form of redirect on one LDAP to the other LDAP server for queries?
    Some basic info: LDAP is Oracle OID version 10gR2
    Please let me know if you have any useful ideas...

    Hi,
    Here is the of OVD benefits :
    1-Easy to setup and manage via our Management client; 2-Unifies multiple directories into a single access point; 3-Normalize and Unify multiple directories; 4-Directly accesses remote repositories;
    5-Allows a unified view of an entry using data from multiple repositories;6-Can act as an LDAP proxy and firewall;
    Why you can not use OVD to improve these? Read, LDAP to the other LDAP server for queries, allowing you to search both LDAP?
    I hope this helps.
    Thiago L Guimaraes

  • Configuring Clients to Share Net80 Configuration (TNSNAMES.ORA)

    I'd like to setup all client net80 connections to share a
    TNSNAMES.ORA file. I have tried adding the regestry key
    TNS_ADMIN to HKEY_CURRENT_USER|ENVIORNMENT key but
    have had no success. Not sure if it should be entered as
    a environment variable, I added TNS_ADMIN to
    HKEY_LOCAL_MACHINE|SOFTWARE|Oracle|HOME0 and still had no
    success.
    The client machines are Windows 2000. Has anyone configured
    this?
    Any help would be appreciated.
    Tammy

    I found the problem... actually it was working, just not from
    Oracle's Administrator Toolbar (which was what I was using to
    test the configuration). Strange.
    Thanks.

  • Configure tnsnames.ora

    I have a 10.2g database. I noticed that some of my service names are set as servicename , some of them are servicename.world.
    Can anybody tell me why? I checked my sqlnet.ora file, there is no defination of
    NAMES.DEFAULT_DOMAIN = WORLD.
    Thanks

    Most probably, when configuring services using netca or net manager this extension was left by default.
    You can get rid of it only if you are sure service name from the database is not using it.
    Check the instance parameter service_names, and check if the listener declares the service names (listener.ora) as *.world.
    The problem you will face when declaring a domain on the tns entry and not declaring it at the sqlnet.ora file is that you will have to name tnsentry.world every time you are willing to use this entry.
    ~ Madrid

  • Editing tnsnames.ora

    Hey,
    I am new to this can anyone help me configure tnsnames.ora file for connecting it with Toad.
    I have Oracle 10g. I have never done this before.

    Hm doesn't look to me as if you realy want to learn anything:
    Re: Connect Oracle with TOAD
    Installing Oracle Client for Connecting TOAD
    But ok...
    the tnsnames.ora is in $ORACLE_HOME/network/admin
    The syntax is like that:
    ALIAS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = IPADRESS)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = SID)
      )You have to change the italic values.
    Dim

  • Can't srvctl command write tnsnames.ora file?

    Hi,
    I use srvctl to create a new service correctly, but I find the information of this service isn't written into tnsnames.ora file, it means, user can't connect database by directly using this service name, it's very stranger, who can tell me how to use srvctl to create a service and ensuer the information about this service can be correctly written into tnsnames.ora file?
    #srvctl add service -d mm -s mx -r node1 -a node2.

    Did you check tnsnames.ora for any new entries?
    Yes,There are not any new entries for the new service I just created.
    Check the command reference again, there is a flag to display "sample tns entries"
    http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/srvctladmin.htm#i1008779
    I check that documentation, and I can use that command to run in my RAC environment, the returned result is
    Example client-side TNS entry for service mx:
    mx = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db_vip)(PORT=dedicated_port
    ))(CONNECT_DATA=(SERVICE_NAME=mx)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC
    How to use this service in client or our application, must we manullay configure tnsnames.ora file?
    BRs./Vinson

  • DBD::Oracle & Instant client - don't find tnsnames.ora

    Hello,
    I'm trying to use tns names in Perl scripts to connect with Instant client. I always get the ORA-12154 error when connecting with Perl :
    ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach).
    The perl command that raise the error is :
    +$dbh = DBI->connect("dbi:Oracle:MYDB","user","password") or die $DBI::errstr."\n";+
    I checked my Oracle installation and everything seems fine. Connection with sqlplus work without problem using the same connection string (sqlplus user/passowrd@MYDB).
    I stat'ed my tnsnames.ora file to check if it's accessed : it is with sqlplus, but not with my perl script.
    Instant Client has been installed with the zip files made available by Oracle (not RPM). ORACLE_HOME points to the installation directory and tnsnames.ora is located in $ORACLE_HOME//network/admin/. Server is a Red Hat Entreprise 5.
    In my knowledge DBD::Oracle use OCI so there should not have difference between sqlplus and DBD::Oracle. Am I wrong ? Anyone have had this problem before ?
    Thanks for your help
    Florent

    Hi,
    Environment variables was correctly defined, but your comment put me on the right track.
    I printed the %ENV content to check ORACLE_HOME which was OK.
    I check the directory and remind I put a sqlnet.ora file in the same directory than tnsnames.ora with the followin content :
    AUTOMATIC_IPC = OFF
    TRACE_LEVEL_CLIENT = OFF
    names.directory_path = (TNSNAMES)
    names.default_domain = world
    name.default_zone = world
    I removed this file and everything is ok now. I don't really know what this file is used for, but if I keep it online and change MYDB in the connection name to MYDB.world, it worked. I think I have to learn more about names...
    Thanks for your help anyway !
    Regards,
    Florent

  • Parameters of tnsnames.ora

    hello. i am new in oracle 10g and i want to take advice. i see the setting parameters of tnsnames.ora on Oracle Net Manager and i set the tnsnames.ora with it.
    i developed a client application working with remote oracle 10g database on windows platforms. i developet it on VisualStudio, this application can work with both ms sql and oracle 10g. the user chooses it. when the user chooses Oracle i must create connection string and connect to the remote db.
    i can implement it with two way
    1. i want only connection name which is defined in tnsnames.ora and connect over it.
    2. i make an interface user set the simple and advanced settings of connection parameters and i can insert them into connection string.
    which way should i use. i think that it is better to set all of parameters in my application because it will be easier for user. but i think about the future versions of oracle . there may be problems on them.
    what do you advice me?
    thanks.

    Hello user "user518019":
    I'm also new in the Oracle world but I have programming since a lot of years. I would recommend to you following a simple rule:
    if your applicattion is very simple you must follow the simple way to connect to DB.
    By using a "tnsnames.ora" you only need to know a DB name to connect to it. In the other hand, if your are using non-default ports o also like this (per example, a more complicated enviroment) you would need a more detailed box to especify address, port number, service name, etc, etc...
    I suppose Oracle will continue using "tnsnames.ora" a lot of years, but this is only a impression. I hope send you some help with this.

  • TNSNames.ora missing ?

    hi
    i installed Oracle 10g recently. and since i had a patch to install, i disbled installing the startup DB. after installation was successful, i then installed the patch and everything was successful.
    finally, since everything was successful, i invoked dbca and then started to created the first SID. here, when the creation started, immediately it gave an error saying that "ORA-12638:Credential retrieval failed". after googling, i found that its due to the parameter change in sqlnet.ora and hence i changed the SQLNET.AUTHENTICATION_SERVICES into (none). after this modification the database creation went smoothly and successfully i installed the db.
    the problem is this.
    i can access the database through sql*plus but when i tried to connect through sql navigator, it gave an error saying that the TNS name could not be resolved (something like this)
    then i tried to locate the TNSnames.ora file but i the only file in the Network/admin folder was the sqlnet.ora file and the samples folder. it seems that the tnsnames,ora and the other files are missing.
    can u please tell me what has happened and what can i do to get the TNS names.ora file back ??
    i am new to oracle so descriptions are highly accepted :)

    804253 wrote:
    Hi Rajesh,
    Good day to you.
    I have installed the Oracle Client 10g Release 2 in the VM environment.However I could not track the file TNSNames.ora
    I have tried the link provided by you, there is no Net Manager available to select. Do u have any other solutions to track the missing TNSNames.ora or alternative methods to configure TNSNames.ora?
    I'm new to Oracle and need your help.
    Thanks in advance.
    Warmest Regards,
    Sze KhinDid you try netca instead of netmgr?

  • Virtual address configure listener.ora and tnsnames.ora files on Solaris10

    Hi,
    I have installed Oracle 10g R2 on Solaris 10 U4 SPARC.
    I need to configure Oracle 10g to work with Storage Foundation for Oracle v5.0.
    After Oracle installation listener.ora listens on host IP address.
    So I have changed to listens on the Virtual IP address. This is a requirement:
    All listeners to be configured must listen to the same virtual IP address
    Could you please tell what to correct to have my Oracle working correctly?
    listener.ora:
    -bash-3.00$ cat listener.ora
    # listener.ora Network Configuration File: /export/home/u01/app/oracle/product/10.2.0/Db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /export/home/u01/app/oracle/product/10.2.0/Db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.160.19.64)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    tnsnames.ora:
    -bash-3.00$ cat tnsnames.ora
    # tnsnames.ora Network Configuration File: /export/home/u01/app/oracle/product/10.2.0/Db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.160.19.64)(PORT = 1158))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Also connecting by web browser http://10.160.19.64:1158/em I am not able to start listener:
    Details TNS-12541: TNS:no listener
    Using the command listener start it starts successfully.
    Kind regards,
    Daniel

    The port in listener.ora nad tnsnames.ora are now the same - 1521
    After this trying logining by Web page there is an error:
    Error
    Io exception: The Network Adapter could not establish the connection
    When I run netca tool and I reconfigure listener netca change the IP address to sun3 which has 10.160.19.49. After this listener works fine and I am able to connect by Web page.
    bge0 10.160.19.49 - is the base IP address
    bge0:2 10.160.19.64 - is the virtual IP address
    I want listener to listen on 10.160.19.64.

  • How to configure listener and tnsnames.ora on 10g version

    how to configure listener and tnsnames.ora on 10g version

    If you are on linux platform, on command prompt execute netmgr and configure listener fromt there. Or go to $oracle_home/network/admin/listner.ora write the following
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    For tnsnames.ora write the following
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )

Maybe you are looking for

  • Embedding iPhoto keywords into files as IPTC keywords?

    The subject pretty much says it all. Does anyone know of an application or script that will run through an iPhoto Library and for each image that has keywords assigned in iPhoto, will embed those keywords in the IPTC keywords field? Thanks, -s-

  • Using results of other reports of a Dashboard

    Hi there, i've created a Dashboard with some requests on it. Now i want to use the result of a report to do calculation on a further report. Is it possible to save the result of a report in a variable or is there any other way to use the result of a

  • HTTP Post (redirect) from BSP

    Hello, I have the following requirement. I have a BSP which is used for adjusting data on SAP side. If the certain status is hit, a new external web page shall be called in an IFrame below. The external wegpage can be filled by POST-Parameters. How w

  • 'DataSet1' is not declared. It may be inaccessible due to its protection level.

    Hello, I am sorry if this has been asked elsewhere but i can't seem to find an answer that will help me. I am using visual studio 2013 and a data connection database from Microsoft access called RFID.mdb (which i made by editing the sample Northwind.

  • Just set up ipad and now texts only come through pad

    I just set up a new ipad and thought I had all the setting set up properly but for some reason now I am only able to send & receive texts on my ipad and not phone. I've tried shutting off the imessage on the pad, still doesn't work. Any help would be