Oracle sql developer can acess from loalhost but not ip address - oracle

Here i have installed
widows server 2008 64
orale 11g r2 64
now i want to access this from the ip address that i have set to my server not
working i can't access trough the ip address....
when i use on my application .....local host it can get connected but
when i add the ip for example 10.0.0.2 it's not connecting
now simply also on local when i write the ip address it's not connecting
but with localhost works fine.....
so even i have used listener.
after running
C:\>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 10-NOV-2013 02:28
:36
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 10-NOV-2013 02:18:36
Uptime 0 days 0 hr. 10 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
Listener Log File c:\app\administrator\diag\tnslsnr\WIN-3ALDRUD96NE\list
ener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "pat_live" has 1 instance(s).
Instance "patlive", status READY, has 1 handler(s) for this service...
Service "pat_test" has 1 instance(s).
Instance "pattest", status READY, has 1 handler(s) for this service...
Service "patliveXDB" has 1 instance(s).
Instance "patlive", status READY, has 1 handler(s) for this service...
Service "pattestXDB" has 1 instance(s).
Instance "pattest", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\>
regards

Yeah, this happens when your hostname settings are detected incorrectly. Log in to the server where the database runs, and run:
lsnrctl status
You will most likely see that the listener listens on localhost/127.0.0.1, and not on the address which is reachable from the network.
Locate the listener.ora file (the lsnrctl status command displays the full path to it), edit it, e.g:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.2)(PORT = 1521))
)
)
Then restart the listener.
lsnrctl stop
lsnrctl start
Or use the "Services" management console in Windows to restart the listener service.

Context:
LSNRCTL for 64-bit Windows: Version 12.1.0.2.0
Steps:
lsnrctl stop
Change listener host from localhost to specific server IP
Sample path: C:\app\root\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora
lsnrctl start
for check: lsnrctl status

Check that the IP address and port of the server machine is correct and that you can ping it from the other machine. If it is correct and you can ping it, you need to reconfigure the firewall that is preventing you connecting on that port. It could be a firewall on the server itself, or somewhere else on your network.

Related

listener.ora, tnsnames.ora & sqlnet.ora not in $ORACLE_HOME/network/admin

I'm currently exploring the Oracle Database 21c but I just realised that my listener.ora, tnsnames.ora & sqlnet.ora is not in the $ORACLE_HOME/network/admin by default.
I'm running Oracle Linux 7 on docker and this is my output
[oracle#d62a3728924b scripts]$ lsnrctl status
LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 15-OCT-2021 18:14:54
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 21.0.0.0.0 - Production
Start Date 15-OCT-2021 18:06:27
Uptime 0 days 0 hr. 8 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/homes/OraDB21Home1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/d62a3728924b/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=d62a3728924b)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully
My $ORACLE_HOME is in a different location
[oracle#d62a3728924b scripts]$ echo $ORACLE_HOME
/u01/app/oracle/product/21.0.0/dbhome_1
How can I change the Listener Parameter File to point to $ORACLE_HOME/network/admin?

Connecting from Host-SQLDeveloper to Virtualbox VM Oracle Database [duplicate]

I'm in real need of a help here. I setup a Oracle Database server on a VirtualBox VM and until yesterday everything seemed to work just fine. Today when I initiated the database to keep working, and turned on SQLDeveloper in my local machine (Client machine) it threw me this error:
Erro de ES: The Network Adapter could not establish the connection
My VirtualBox VM network setting is configure to bridged adapter. And I was able to connect just fine and today, out of nothing this error started occurring.
I did some research but none of them worked for me. Tried to follow this guy solution:
Oracle SQL Developer: Failure - Test failed: The Network Adapter could not establish the connection?
And didn't work as well. I'm gonna share my lsnrctl status and my file here so you can take a look.
First this is how I start my setup:
1. lsnrctl start to start the listener. Resulting in:
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-AUG-2020 10:40:56
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 24-AUG-2020 10:40:56
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
2. sqlplus / as sysdba to start sqlplus shell and then startup to start the database instance, which gives:
ORACLE instance started.
Total System Global Area 2550136832 bytes
Fixed Size 8623928 bytes
Variable Size 671090888 bytes
Database Buffers 1862270976 bytes
Redo Buffers 8151040 bytes
Database mounted.
Database opened.
Then my lsnrctl status gives:
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-AUG-2020 10:46:34
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 24-AUG-2020 10:40:56
Uptime 0 days 0 hr. 5 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=dbserver)(PORT=5500))(Security=(I removed the path for security))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
My listener.ora:
# listener.ora Network Configuration File: /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
My tnsnames.ora:
GNU nano 2.9.8 tnsnames.ora Modified
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
When I try to connect in the database through the SQLDeveloper installed inside the Virtual Machine (That is the server side) it works ok, but when I try to connect from the SQLDeveloper on the local machine (Client side) i throws the error.
Every post I saw, told me to look on the listener status, but that is not the problem, I think.
I'd appreciate any help guys. And thank you very much, any additional information I`m here to answer. =D
EDIT: forgot to mention that I'm using version 12c of the Oracle Databse
EDIT: Here is how I'm trying to connect to the DB:
EDIT: When I ping the host for the DB I get this:
[oracle#dbserver admin]$ ping dbserver
PING dbserver(dbserver (fe80::f8dd:c03c:920c:5442%enp0s3)) 56 data bytes
64 bytes from dbserver (fe80::f8dd:c03c:920c:5442%enp0s3): icmp_seq=1 ttl=64 time=0.075 ms
64 bytes from dbserver (fe80::f8dd:c03c:920c:5442%enp0s3): icmp_seq=2 ttl=64 time=0.053 ms
64 bytes from dbserver (fe80::f8dd:c03c:920c:5442%enp0s3): icmp_seq=3 ttl=64 time=0.051 ms
64 bytes from dbserver (fe80::f8dd:c03c:920c:5442%enp0s3): icmp_seq=4 ttl=64 time=0.072 ms
64 bytes from dbserver (fe80::f8dd:c03c:920c:5442%enp0s3): icmp_seq=5 ttl=64 time=0.049 ms
^C
--- dbserver ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 131ms
rtt min/avg/max/mdev = 0.049/0.060/0.075/0.011 ms
I used to fight with VM networking settings such that my host could 'see' my vm, and vice versa.
I stopped worrying about this once i learned about port forwards.
You can simply tell VirtualBox to take traffic from your local port, say 1521, and forward that to the VM, say also 1521.
So when connecting to the VM from my host in SQL Developer, I can go to localhost:1521, and have my connection traffic go to the Oracle Listener on my Linux VBox image, listening on port 1521
Click on Port Forwarding
Add an entry for TCP 1521 and 1521
Then, in SQL Developer you can simply do this to connect to your DB on the VM
I'm glad you got it working, but as an alternative, let me say that I'm not a big fan of port forwarding for this issue, nor am I a fan of using the bridged adapter. I've created scores of VMs under VBox, both on Windows and on Ubuntu hosts. In every case I create HOSTONLY adapter, and configure it with a fixed IP address. I then add an entry for the vm in the host's 'hosts' file. See more detail at https://edstevensdba.wordpress.com/2012/12/15/configure-the-virtualbox-network-2/

How do I access oracle db installed on one computer from another computer with SQL developer (So that 2 people can work collaboratively on same DB)

Hello I recently installed oracle DB and SQL developer on my PC. Now I want my friend sitting on another PC should to be able to connect and work on the same DB which is on my computer with the SQL developer. (So that we both can be connected to a single database)
Check the DB's listener and look for specifically the IP Address, PORT , and service names you need. So in the below check on my local DB.
IP=0.0.0.0 which means all host ip addresses ( your machine's IP)
From: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
PORT=1521
From : (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
SERVICE=xe
From: Service "xe" has 1 instance(s).
Then they can use these to connect by filling in these values in the SQL Developer Connection Dialog which has the name labels.
$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JAN-2020 14:56:12
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 15-JAN-2020 12:58:05
Uptime 0 days 1 hr. 58 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/b45e40e26f79/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=b45e40e26f79)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/ORCL/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "8967c87908440d12e053020011ac6f8a" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle#b45e40e26f79 ~]$
Have you tried the following steps?
Write down the IP from your PC
Your friend opens SQL Developer
Connections -> New Connection
Name -> Friend - Connection Type Basic
Hostname -> IP from your PC, Port 1521, Service Name orcl (could be XE as well)
Obviously, you have to have basic network connectivity between the two computers. Can your friend's computer successfully 'ping' yours? Also, you will need to be running the oracle listener, and your database will have to be registered with it. Check with the command line command 'lsnrctl status'. If so, then the next step is to simply define a connection in your friend's SQL Dev, exactly like you did in yours. Set 'connection type' to 'basic'; set 'hostname' to the network name or ip address of the computer running Oracle; set 'service name' to the name of the database. 'hostname' cannot be 'localhost', as that indicates to loop back to the originating machine.

Oracle APEX not working on CentOS 7

i´ve just installed a CentOs 7 minimum server in a VM with Oracle XE.
All installation went fine but that I cannot access APEX from a remote IP (my host computer). The CentOS is minimum and I don´t have GNOME to try to access from the localhost browser.
I´ve configured remote access, as follow:
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
Here is the listener status:
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 17-JAN-2016 12:22:15
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 17-JAN-2016 11:48:31
Uptime 0 days 0 hr. 33 min. 44 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
How can I know that the APEX is service is running ?
How can I start it up and access from a remote computer ?
You are missing the " (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))" in the Endpoint summary.
i.e. No listener running for apex
begin
dbms_xdb.sethttpport ('8080');
end;
To check if it's set:
select dbms_xdb.gethttpport as "HTTP-Port" from dual;

ORA-12637: Packet receive failed

After setting up oracle server, I found I can connect to the oracle by using
sqlplus64 user/pass#//192.168.23.14/testsid
in server 192.168.23.15
but I can not sqlplus on 172.26.142.33 (my local pc address)
I check the port, actually I can
telnet 192.168.23.14 1521
Here, I list my server information:
OS: Ubuntu 14.04LTS
[oracle#2404f0da2a14 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 18-JAN-2015 06:25:06
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 18-JAN-2015 04:48:59
Uptime 0 days 1 hr. 36 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/2404f0da2a14/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Services Summary...
Service "testsid" has 1 instance(s).
Instance "testsid", status READY, has 1 handler(s) for this service...
Service "testsidXDB" has 1 instance(s).
Instance "testsid", status READY, has 1 handler(s) for this service...
The command completed successfully
I also checked sqlnet.ora
# sqlnet.ora Network Configuration File: /opt/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
It seems there is no restriction.
What's the possible problem? Thank you.

Resources