This discussion is archived
11 Replies Latest reply: Feb 2, 2010 3:19 PM by hans forbrich RSS

XE and 10.2 databases in one folder

336268 Newbie
Currently Being Moderated
Hi,
I've installed an oracle XE installation to an existing 10 G installation.
My problem is that i can only connect via cmd->sqlplus on the server and not via sqlplus.
And i can't connect via client, then i get a ORA-12154 error.

In the tnsnames.ora i've added this entry:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sv4.Grintec.local)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

Please can anyone tell me what's wrong?
Thanks in advance.
Best regards
Nicole
  • 1. Re: XE and 10.2 databases in one folder
    Helios-GunesEROL Oracle ACE
    Currently Being Moderated
    Hi nicole;

    Please check below and see its helpful for your issue:

    TROUBLESHOOTING GUIDE: ORA-12154 & TNS-12154 TNS:could not resolve service name [ID 114085.1]
    OERR: ORA 12154 "TNS:could not resolve service name" [ID 21321.1]
    'ORA-12154: TNS:could not resolve the connect identifier specified' Error When Connecting To An Oracle Loader Connection In ODQ [ID 871334.1]
    ORA-12154 or ORA-6413 Running 32-bit Oracle Software on 64-bit Windows OS [ID 334528.1]

    Regard
    Helios
  • 2. Re: XE and 10.2 databases in one folder
    336268 Newbie
    Currently Being Moderated
    Hi,
    i think i need two different oracle homes?
    How can i manage this?
    Thanks in advance
    Nicole
  • 3. Re: XE and 10.2 databases in one folder
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    YEes, you need 2 different ORACLE_HOMEs.

    If these are both databases (as is true in your case) you will have 2 different listeners. Simply do not start the listener for the older version - if you have 10gR2 EE and XE, and you are using Windows set the XE listener service to 'Manual' and make sure the other listener is started before either database.

    And each ORACLE_HOME has it's own TNSNAMES.ORA so you want to make sure the files have the same entries. (O ruse TNS_ADMIN to point to the correct one.)
  • 4. Re: XE and 10.2 databases in one folder
    336268 Newbie
    Currently Being Moderated
    Hi,
    thanks.
    Now i've edit all tnsnames.ora..they've the same entries.
    And the 10G Oracle DB runs each time, so this is always the first listener.
    Now i can connect via sqlplus at the server. But on the client side i always get the TNS-03505 error.
    What should i do?
    Thanks in advance.
    Nicole
  • 5. Re: XE and 10.2 databases in one folder
    336268 Newbie
    Currently Being Moderated
    Hi,
    thanks.
    Now i've edit all tnsnames.ora..they've the same entries.
    And the 10G Oracle DB runs each time, so this is always the first listener.
    Now i can connect via sqlplus at the server. But on the client side i always get the TNS-03505 error.
    What should i do?
    Thanks in advance.
    Nicole
  • 6. Re: XE and 10.2 databases in one folder
    aaaaa Newbie
    Currently Being Moderated
    Nicole;

    Compare your sqlnet.ora file wiht mine

    my sqlnet.ora entery is:

    NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)

    Take backup of your file and then create new sqlnet.ora and put this entery there and test issue again please

    Hope it helps
  • 7. Re: XE and 10.2 databases in one folder
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    What you need to do is post the tnsnames.ora and the exact command that failed.
  • 8. Re: XE and 10.2 databases in one folder
    336268 Newbie
    Currently Being Moderated
    Hi,
    this are the entries of the sqlnet.ora:
    NAMES.DEFAULT_DOMAIN =

    #SQLNET.AUTHENTICATION_SERVICES= (NTS)
    SQLNET.AUTHENTICATION_SERVICES= (NONE)

    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

    this are the entries of the tnsnames.ora:
    EXTPROC_CONNECTION_DATA.GRINTEC.LOCAL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )

    SV6 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SV6)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = SV6)
    (SERVER = DEDICATED)
    )
    )





    INST1_HTTP.GRINTEC.LOCAL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bortras)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = MODOSE)
    (PRESENTATION = http://HRService)
    )
    )

    SV4.GRINTEC.LOCAL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sv4)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SV4.grintec)
    )
    )

    SV4.GRINTEC =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sv4)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SV4.grintec)
    )
    )

    SV4 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sv4.Grintec.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = sv4)
    )
    )




    UNS =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = NB_ACER2)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = UNS)
    )
    )

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.223)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCL)
    )
    )

    ORCLSPATIAL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-svr.grintec.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCLSPATIAL)
    )
    )

    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.204)(PORT = 1522))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )

    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    )
    )

    This error appear:
    ORA-12154: tns could not resolve service name

    Thanks in advance!
    Regards
    Nicole
  • 9. Re: XE and 10.2 databases in one folder
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    ORA-12154: tns could not resolve service name

    - the system is looking for an entry in the tnsnames.ora but could not find it.

    Possible reasons: the entry is not there; the wrong tnsnames.ora is used; the alias is being modified before it gets used to look up the entry. (And others - these are the most common.)

    You STILL did not provide the exact command that failed.

    I will assume this came from sqlplus. I will assume that your command was 'sqlplus hr/hr@xe'. I will assume the tnsnames.ora that you updated is the one in the XE install. I will assume that the last install was not XE (and therefore that is the sqlplus that is being used) and that when the sqlplus looks up in it's tnsnames.ora, it can not find that entry.

    In this case, it will be worth while for you to copy/paste the PATH from the environment variables, as well as TNS_ADMIN (if set)

    You might find it useful to look at http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/toc.htm and in particular 'Part 3' which deals with troubleshooting this kind of issue.
  • 10. Re: XE and 10.2 databases in one folder
    336268 Newbie
    Currently Being Moderated
    Hi,
    thanks a lot.
    Please can you tell me how i should set the environment variables?

    Regards
    Nicole
  • 11. Re: XE and 10.2 databases in one folder
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    I am sorry, but I can not do that without a lot more information. I do not know your configuration so I do not know what you need or have.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points