Home » RDBMS Server » Server Administration » unable to connect to database (Oracle 11.2.0.1, Oracle 11.2.0.2, windows xp, windows 7)
unable to connect to database [message #576773] Thu, 07 February 2013 18:55 Go to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
Hi,

In one machine I have windows xp with Oracle 11.2.0.2 database installed and I am able to connect to the database using both sql developer and sql plus.

In another machine I have windows 7. I installed Oracle client 11.2.0.1, then using Net configuration tool, I installed both listener.ora and tnsnames.ora files.

Now, I want to connect to the database which is installed on windows xp from windows 7 using the oracle client. When I tried to connect, I got the following error :

ERROR:
ORA-12560: TNS:protocol adapter error

In order to rectify the above error, I was making sure that ORACLE_HOME AND ORACLE_SID were properly set in the regedit file (under HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE). The ORACLE_HOME was set properly. But I found ORACLE_SID missing. So I added ORACLE_SID environment variable in the registry and re-tried connecting to the database. But I am not able to connect. What else should I do in order to connect?
Re: unable to connect to database [message #576774 is a reply to message #576773] Thu, 07 February 2013 19:07 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
I was able to do tnsping successfully, but it couldn't recognize the listener.ora file. I will try to figure out.
Re: unable to connect to database [message #576776 is a reply to message #576774] Thu, 07 February 2013 20:42 Go to previous messageGo to next message
BlackSwan
Messages: 22809
Registered: January 2009
Senior Member
listener.ora is only meaningful on DB Server where a listener actually runs.
Re: unable to connect to database [message #576779 is a reply to message #576776] Thu, 07 February 2013 22:10 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
Thanks. I deleted the listener.ora file as you said since I am trying to connect to the database via oracle client. I included the database name while connecting, like this :

C:>sqlplus sys/password@db as sysdba

and I was able to connect.
Re: unable to connect to database [message #578633 is a reply to message #576779] Sat, 02 March 2013 10:40 Go to previous messageGo to next message
yunqhero
Messages: 1
Registered: March 2013
Junior Member

This may save me from posting redundant questions so I'll ask here. " How do you properly set the ORACLE_HOME & ORACLE_SID? So far I tried the following:

set ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server\bin\ORACLE.EXE XE

&

set ORACLE_SID=orcl

I am trying to run 'sqlplus' on Windows 7 with sqldeveloper. It's strange because it was running just fine. (locally). As soon as I connected to my VLAN it became trouble. Can anyone help with this problem. "Message file sp1<lang>.msb not found & ORACLE_HOME needs to be set to Oracle software directory?

Re: unable to connect to database [message #578634 is a reply to message #578633] Sat, 02 March 2013 10:57 Go to previous messageGo to next message
BlackSwan
Messages: 22809
Registered: January 2009
Senior Member
Since we don't know in which directory you installed Oracle software, we can not provide specific solution.

what is the complete pathname to the folder where sqlplus.exe resides?
Re: unable to connect to database [message #578637 is a reply to message #578633] Sat, 02 March 2013 11:50 Go to previous message
Michel Cadot
Messages: 59203
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
set ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server\bin\ORACLE.EXE XE


ORACLE_HOME is a directory, it is the one you gave when you installed Oracle software.

Regards
Michel
Previous Topic: Where can i see all executed statements?
Next Topic: how to know which block contains free space?
Goto Forum:
  


Current Time: Tue Sep 23 18:01:43 CDT 2014

Total time taken to generate the page: 0.09525 seconds