Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2003
    Location
    mumbai
    Posts
    5

    Unanswered: d2k 6i connection error ora 12154 TNS could not resolved service name

    Hi !
    I've developer 6i installed on my computer
    I am connecting to oracle 9i .I am unable to connect to database.
    it give message ora 12154 TNS could not resolved service name
    I have two oracle home.
    I am able to connect through same connect string in ODBC test

    Can some help me to sort this problem

    Thanks

  2. #2
    Join Date
    Dec 2003
    Location
    Kekaha, Kauai, Hawaii
    Posts
    22
    ORA-12154 is the generic SQL*Net error that means it couldn't resolve the database name (there is something wrong with the service entry). You are probably using a local names file which should be TNSNAMES.ORA in the $ORACLE_HOME/NETWORK/ADMIN directory. See if there is an entry for your database there. You may need to get a copy of TNSNAMES.ORA and copy it there - when you installed Developer 6i did you remove the old Oracle version from the machine - or did you just reset $ORACLE_HOME?

    This is a generic error and there could be a number of things wrong. One thing to always try is TNSPING.

  3. #3
    Join Date
    Dec 2003
    Location
    Karachi, Pakistan
    Posts
    45
    ORA-12154 error ocurred when your database alias not properly configured, so u try this, edit tnsnames.ora file (before editing it , must take a backup of tnsnames.ora file) and make a entry of your Oracle 9i
    like that
    (you found tnsnames.ora file at $ORACLE_HOME/NETWORK/ADMIN
    directory if not here then copy from $ORACLE_HOME/NETWORK/ADMIN/SAMPLE
    )

    oracle9i =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = tcp.world)
    (PROTOCOL = TCP)
    (Host = host_name) # Change with your Host Name
    (Port = 1521) # Change with your Data Base Port Number
    )
    )
    (CONNECT_DATA = (SID = DataBase_ID) # DataBase Name
    )
    )

    And now try to connect scott/tiger@oracle9i

    hopefully it works, if all other things are in prpoer order.


    Noor Ali

  4. #4
    Join Date
    Nov 2003
    Location
    Bangalore, INDIA
    Posts
    333

    Thumbs up

    Hi,

    The service name specified is not defined correctly in the TNSNAMES.ORA file it seems.
    SATHISH .

  5. #5
    Join Date
    Dec 2003
    Location
    Karachi, Pakistan
    Posts
    45
    Hi

    You send yr TNSNAMES.ORA file with your Data Base Id and Host Name,and your Oracle Services listings. and one thing u check that yr listener ( Your Systems' ) is running.

    It's better to understand what kind of problem u faced.

    Noor Ali

  6. #6
    Join Date
    Dec 2003
    Location
    Macedonia (nobody's former republic)
    Posts
    8
    Originally posted by nooralig
    Hi

    You send yr TNSNAMES.ORA file with your Data Base Id and Host Name,and your Oracle Services listings. and one thing u check that yr listener ( Your Systems' ) is running.

    It's better to understand what kind of problem u faced.

    Noor Ali
    The problem may be that you have TWO oracle homes on you machine (you should, since Dev 6i uses SQL*Net 2 and Oracle 9i uses Net8). Therefore, check BOTH homes for TNSNAMES.ORA files. One catchup is that Net8 uses SERVICE_NAME parameter as opposed to HOST_NAME parameter in SQL*Net 2.

    If you don't have two HOMEs, then you better reinstall things.... you may get in a big mixup!

  7. #7
    Join Date
    Dec 2003
    Location
    Macedonia (nobody's former republic)
    Posts
    8
    Originally posted by nvanevski
    The problem may be that you have TWO oracle homes on you machine (you should, since Dev 6i uses SQL*Net 2 and Oracle 9i uses Net8). Therefore, check BOTH homes for TNSNAMES.ORA files. One catchup is that Net8 uses SERVICE_NAME parameter as opposed to HOST_NAME parameter in SQL*Net 2.

    If you don't have two HOMEs, then you better reinstall things.... you may get in a big mixup!
    I should explain this better : there are actually two network setups on your machine. ODBC (assuming you have the latest one) uses the 9i setup, while Developer uses its own network setup. You should check the Developer network setup (most probably under \ORANT\Net8\Admin folder or something alike) for an alias pointing to your database. You can check that alias with TNSPING80 utility (not tnsping, since it will invoke your 9i network setup).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •