0

I am newbie in oracle dba so need help that could meet my mind. I have installed my oracle 11gr2 database on virtual machine with OS OEL 5.7 and want to connect my this remote database with toad32bit. So i do follow some useful links and downloaded and installed win32_11gR2_client on OS windows 7 64bit. Besides try my best to follow the instructions my client is not able to connect with my remote oracle database.On client side working with cmd for tnsping sidname always get no tns listener with error as i mentioned above

brief descriptions LINUX MACHINE:

listener.ora

LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  (ADDRESS = (PROTOCOL = TCP)(HOST = testhost.testdomain.com)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle

tnsnames.ora

ORCL =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = testhost.testdomain.com)(PORT = 1521))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = orcl.testdomain.com)
  )
 )

sqlnet.ora

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = /u01/app/oracle

lsnrctl status listener

Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                03-FEB-2014 15:08:43
Uptime                    0 days 1 hr. 32 min. 59 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/testhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=testhost.testdomain.com)(PORT=1521)))
Services Summary...
Service "orcl.testdomain.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.testdomain.com" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

lsnrctl service listener

 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 Services Summary...
 Service "orcl.testdomain.com" has 1 instance(s).
 Instance "orcl", status READY, has 1 handler(s) for this service...
 Handler(s):
 "DEDICATED" established:0 refused:0 state:ready
 LOCAL SERVER
 Service "orclXDB.testdomain.com" has 1 instance(s).
 Instance "orcl", status READY, has 1 handler(s) for this service...
 Handler(s):
 "D000" established:0 refused:0 current:0 max:1022 state:ready
 DISPATCHER <machine: testhost.testdomain.com, pid: 5349>
 (ADDRESS=(PROTOCOL=tcp)(HOST=testhost.testdomain.com)(PORT=13094))
 The command completed successfully

WINDOWS 7 CLIENT DESCRIPTION C:\oracle\product\11.2.0\client_1\network\admin ENV TNS_ADMIN=C:\oracle\product\11.2.0\client_1\network\admin

NOTE: THERE IS NO ANY ORACLE RELATED SERVICES PRESENT (MEANS NOT PRESENT) ON WINDOWS SERVICES

my client tnsnames.ora

ORCL =
  (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = testhost.testdomain.com)(PORT = 1521))
  (CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = orcl.testdomain.com)
   )
  )

C:\Users\farhan>tnsping orcl (and the result is)

Used parameter files:
C:\oracle\product\11.2.0\client_1\network\admin\sqlnet.ora

Used TNSNAMES adapter to resolve the alias 
Attempting to contact (DESCRIPTION = (ADDTESS_LIST = (ADDRESS - (PROTOCOL = TCP (HOST = 
testhost.testdomain.com)(PORT = 1521))) (CONNECT_DATA= (SERVER = DEDICATIED) (SERVICE_NAME
= orcl) (INSCTANCE_NAME = orcl) (GLOBAL_NAME = orcl.testdomain.com)(RDB_DATABSE =   orcl)) (TYPE_OF_SERVICE = dedicaated))
TNS-12541 : TNS:no listener

cat /etc/hosts (the result is)

      # Do not remove the following line, or various programs
      # that require network functionality will fail.
      #127.0.0.1              testhost.testdomain.com testhost localhost.localdomain localhost
      127.0.0.1               localhost.localdomain localhost
      #10.10.1.114             testhost.testdomain.com testhost
      192.168.0.103   testhost.testdomain.com testhost
      ::1             localhost6.localdomain6 localhost6

for further insturctions that i have asked to post

# netstat -an | grep 1521 | grep tcp | grep LISTEN
tcp        0      0 0.0.0.0:1521                0.0.0.0:*                   LISTEN      
[root@testhost ~]# grep testhost /etc/hosts
#127.0.0.1              testhost.testdomain.com testhost localhost.localdomain localhost
#10.10.1.114             testhost.testdomain.com testhost
192.168.0.103   testhost.testdomain.com testhost
[root@testhost ~]# dig +short testhost.testdomain.com
174.137.125.92
user3135152
  • 43
  • 2
  • 2
  • 5
  • sorry i edit my post as per your instructions. besides that in netstat the expected IP address with 1521 port num is not listening. and sorry for my dull knowledge about you have asked about the " And does testhost.testdomain.com resolve to the same IP address from both machines? " also my both machines are perfectly reachable by making ping both of the machines. – user3135152 Feb 03 '14 at 16:28
  • thanks for your reply Alex. there is no such to hide here as i am just a student and on learning status. The prescribed host/domain names are the real one. And yes by pinging testhost.testdomain.com both are reachable. As far what i meant by netstat, from there i couldn't see any ip of linux (192.168.xx.xxxx) machine which i think supposed to be stated there along with the port num 1521 to be in open state on netstat cmd interface but (this what i guess by seeing the results from there so i might be wrong). – user3135152 Feb 03 '14 at 18:10
  • the above command that you have asked return with the same IP as for ifconfig. Yes VM is running on my laptop. I am very greatful Alex that you consider my problem here. Thanks once again – user3135152 Feb 03 '14 at 18:44
  • the windows supposed to be listen the linux ip 192.168.0.103 (as it is mentioned). The windows ip is 192.168.0.102 – user3135152 Feb 03 '14 at 21:18
  • This seems to be nothing to do with Oracle or development really, it appears to be an issue with your Windows box talking to the VM. I suggest you ask about this on Server Fault, and start with the VM/Windows setup, including the software you're using, and the addressses etc. I don't think all the Oracle-specific detail will be needed; maybe try to get telnet or ssh or something more standard working first. – Alex Poole Feb 03 '14 at 22:53
  • Alex do u find any clue :(. I have updated my vmware9 to vmware10 and still my client is not able to connect with my server – user3135152 Feb 07 '14 at 12:23
  • I don't know enough about VMWare and how the host and VMs communicate or how the network settings need to be configured. This is the wrong site for that; you need to ask on [Server Fault](http://serverfault.com) as I said before. But get a simpler service working first, assuming you can't connect at all at the moment. If you make it about Oracle they might miss the point and not be interested. See if telnet/ssh works now, and if it doesn't ask for help there getting those working. Once they are, then try to get Oracle working. – Alex Poole Feb 07 '14 at 12:39
  • Actually I guess this would be off-topic on SF too; [Super User](http://superuser.com/help/on-topic) might be more appropriate. It is not on-topic for [Stack Overflow](http://stackoverflow.com/help/on-topic) though. Sorry... – Alex Poole Feb 07 '14 at 16:58
  • hi Alex thanks for your guidance. I have my linux server on VMworksatation 10 with all basic configurations on linux and get through the client (windows 7) connectivity with my oracle database 11gR2 installed on VM. The thing that i came to know is to register my LISTENER on oracle net manager. Though it was a minor but very important work of registering the listener. – user3135152 Feb 11 '14 at 11:47
  • OK, if other connectivity was already working and that resolved a problem specific to Oracle then maybe you should add exactly what you had to do as an answer. Otherwise, this question isn't likely to help anyone else and might as well be removed. (It's still off-topic, but...) – Alex Poole Feb 11 '14 at 11:51

3 Answers3

4

After searching alot got a simple way to solve it. Just follow the steps:-

  1. Check status of your listener

  2. open command prompt and type lsnrctl status

  3. You will get no listener.

  4. So, now open listener.ora file which is present in following directory C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN

  5. Open that file and change the host parameter with you computer name ii} You can get computer name by right click on My Computer and check you computer name, and replace host parameter with your computer name as follows.

LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = Electron-PC)(PORT = 1521)) ) )

So here you can observe HOST = Electron-P, which is my computer name

  1. Save the listener.ora file and again return to cammand propt
  2. Type following in command prompt lsnrctl start

This will start the OracleTNSListner you can check it in the service by opening services tab of taskmanager. if not started automatically u can start it.

Just this much and you are ready to work again on oracle. Best of Luck.

Mrinmoy
  • 1,370
  • 2
  • 18
  • 28
0

I had the same problem once. I was able to connect after adding my computer name to: /etc/hosts "ip_address computer_name".

hi all

i have also same problem, can any body suggest me the "computer_name" should my windows computer name where client install or remote server name where database install.

0

I had the same problem. The following worked for me.

  • Uninstall all the oracle files from your computer if you had previously installed it. Stop all its services by going to services.msc in cmd.

    1. List item
    2. Restart your computer.
    3. Install oracle if you have not already.

    4. Then go to cmd

    5. Type services.msc in cmd 6.Select any service and type 'O'. This will get to you all the services starting with O. 7.Select OracleJobScheduerXE from the list. Right click go to properties.
    6. In general tab go to Startup type. Slect automatic from it.
    7. Click apply then click start and then OK. 10.Also Enable OracleXeClrAgent and start your service.So totally 4 services would be working out of 5 except OracleMTSRecoveryService.
    8. Now go to cmd type lsnrctl->enter-> type status u should be able tosee your instance.

Tell me if it helps.

Ash15
  • 27
  • 7