Oracle 9i and Oracle 11g

Hi,
I have 2 Oracle Installation: Oracle 9i client and Oracle 11.2 server
Oracle 9i in: C:\oraclient9\
Oracle 11g in: C:\app\a.l\product\11.2.0\

I've an application that have to connect to Oracle via ODBC But every time I try to connect the odbc search Oracle 9i and I get this error:
ORA-12541: TNS no listener

If I try to start with sqlplus from: Start --> Run --> sqlplusw I get Oracle 9i version

If I run sqlplus from start --> Program --> Oracle 11 --> I can connect correctly.

If I try to create a new ODBC It connect always the Oracle 9i version.

In attach I send you tnsnames.ora and listener.ora from both versions.

Have you any idea How can I create a new ODBC to connect at Oracle 11g?

Thanks in advance!


listener11g.txt
tnsnames11g.txt
tnsnames-9i.txt
ralph_reaAsked:
Who is Participating?
 
Devinder Singh VirdiConnect With a Mentor Lead Oracle DBA TeamCommented:
Whenever you install Apps, DB will be automatically installed.
Now If you want to connect from 9i client, you need to set ORACLE_BASE, ORACLE_HOME and ORACLE_SID pointing to 9i directory.
if you want to set apps 11i, then find ORACLE_HOME from context file.
or login as aplmgr user and use sql plus.
I believe directory will be 11.0.3
0
 
mhenry20IT Operations DirectorCommented:
I would try copying the tnsnames.ora and sqlnet.ora from the working 11G network/admin directory to the 9i network/admin directory.  That way the alias will be consistent.

Good luck.
0
 
ralph_reaAuthor Commented:
I tried to copy tnsnames.ora and sqlnet.ora from the working 11G network/admin directory to the 9i network/admin directory but when I try create a new ODBC with "test connection" I get this error:

Unable to Connect
SQLState=S1000
[Oracle][ODBC][Ora]:ORA-12541: TNS no listener

Have someone any idea??
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Devinder Singh VirdiLead Oracle DBA TeamCommented:
You need to set Oracle_home and Oracle_sid before using them.
please use cmd --> set ORACLE_HOME='full path of other oracle home' ---> set ORACLE_SID=<new> ---> sqlplus / as sysdba

Also make sure listener is running.
use lsnrctl command. Location of listener $ORACLE_HOME/network/admin
0
 
ralph_reaAuthor Commented:
virdi_ds,
in my case I have to set Oracle_home and Oracle_sid like this?
set ORACLE_HOME=C:\app\a.l\product\11.2.0\db_1
set ORACLE_SID=ORCL

sqlplus / as sysdba
shutdown
startup

is it right?
0
 
Aaron ShiloChief Database ArchitectCommented:
hi

i must agree with @ralph_rea

and Author Yes.
0
 
Devinder Singh VirdiLead Oracle DBA TeamCommented:
If by setting this parameter, you are able to connect, then next step is to change environment variables in your window machine.
To do that use the following.
Right click on My Computer, click on Advanced tab, select Environment Variables, and change ORACLE_HOME and PATH variables.
You can also change Registory, which I am not recommending right now.
0
 
ralph_reaAuthor Commented:
I tried:
set ORACLE_HOME=C:\app\a.l\product\11.2.0\dbhome_1
set ORACLE_SID=ORCL

but when I try: sqlplus / as sysdba I get this error:
Error 14 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

If I try to start with sqlplus from: Start --> Run --> sqlplusw I get Oracle 9i version with error:
ORA-12541: TNS no listener

In Environment Variables The PATH variables is:
C:\oraclient9\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\app\a.l\product\11.2.0\dbhome_1\BIN;C:\app\a.l\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Sybase\SQL Anywhere 9\win32;C:\Program Files\Sybase\Shared\win32;C:\Program Files\Sybase\SQL Anywhere 9\drivers;C:\Program Files\Sybase\Shared\Sybase Central 4.2;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\PROGRA~1\XRay

What I wrong?
0
 
ralph_reaAuthor Commented:
C:\app\a.l\product\11.2.0\dbhome_1\BIN>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\a.l\AppData\Roaming
ASANY9=C:\Program Files\Sybase\SQL Anywhere 9
ASANYSH9=C:\Program Files\Sybase\Shared
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SEVER103
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\a.l
LOCALAPPDATA=C:\Users\a.l\AppData\Local
LOGONSERVER=\\DOMINIOOP
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\oraclient9\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program F
acle\jre\1.1.8\bin;C:\app\a.l\product\11.2.0\dbhome_1\BIN;C:\app\a.le
duct\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System
;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Sybase\SQL
e 9\win32;C:\Program Files\Sybase\Shared\win32;C:\Program Files\Sybase\SQ
ere 9\drivers;C:\Program Files\Sybase\Shared\Sybase Central 4.2;c:\Progra
\Microsoft SQL Server\90\Tools\binn\;C:\PROGRA~1\XRay
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0602
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\A3FA9~1.LEN\AppData\Local\Temp
TMP=C:\Users\A3FA9~1.LEN\AppData\Local\Temp
TNS_ADMIN1=C:\app\a.l\product\11.2.0\dbhome_1\NETWORK\ADMIN
USERDNSDOMAIN=DOMOPENPLAN.LOCAL
USERDOMAIN=DOMOPENPLAN
USERNAME=a.l
USERPROFILE=C:\Users\a.l
WF_RESOURCES=C:\oraclient9\WF\RES\WFus.RES
windir=C:\Windows
0
 
Devinder Singh VirdiLead Oracle DBA TeamCommented:
Confusion:
You installed Oracle Apps 11i, right?
Which database are you using with it? 9i or 8i.

Apart from above, did you install Oracle Database Server 11g as well?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.