I have a Oracle server which can be accessed locally (i.e. from the computer where Oracle installed) using SQLPlus and default port 1521.
From a client computer, I can access shared folders on that server, but I cannot access the oracle database using SQLPlus or SQL Developer. "IO Error: The network Adapter could not establish the connection."
I am sure that there are problems on the Oracle server, because I can access other similar Oracle servers from the same client.
There is no problem with network connection as well.
Tnsnames.ora files are also OK. Three oracle services are started (same as other similar Oracle servers): listener, DBConsole and Service.
All are Windows systems.
How can I figure it out?
P.S.:
No firewall on server;
tnsping is OK.
I think the listener on the server or tnsnames.ora on client is the problem. When connecting from the server the sql*net protocol is bypassed.
On server run :
c:\lsnrctl status
and check if database is serviced by the listener and check if parameters are the same as in tnsnames.ora, use fully qualified host names.
EDIT
Check
c:\lsnrctl services
May be your firewall block your port. you can enable this by changing firewall setting.
This is windows 7 configuration to access port
Control panel->system and security->windows firewall->advanced setting->In bound rules-> new Rule(On right hand side)-> select port option with value as "1521" -> next next....
Related
We're currently having issues setting up a connection to oracle datasources in datafusion (via jdbc) and i'm not sure if i am missing something.
Bit of a background, we had issues connecting to any data source initially so in gcp i setup a vm instance to act as a proxy server (due to it being a private datafusion instance) and used iptables to register the connections.
After this i can successfully connect to sql server datasources, on the vm instance i can ping and telnet all oracle and sql datasources.
Network connectivity tests show datafusion can connect to the proxy and also that the proxy can hit datasources on-prem.
The following pics are of my connection to oracle under namespace admin in datafusion
The ip address is of the proxy instance and the port is what was assigned in the iptable entry
Again this works for sql server. Our datateam can connect to these datasources via bigquery using odbc, but it looks like you cannot use that connection type in datafusion.
Think we have resolved the issue. We noticed the logins being used had older password versioning for oracle 10, 11 etc. Got the oracle dba to create a new user to test and connection successful instantly :)
I'm not an Oracle guy, but I find that I need to touch on some oracle resources to respond to a new report request. I'm working at an office where the connection to an oracle server uses LDAP and I can't get to the connection info. I do have an ODBC connection on my machine, so I can get into the database through MS Access. But I'd like to be able to connect with SQL Developer so I can do more useful profiling on the tables.
Is there any way to use my ODBC connection through Access to tease out Hostname, Port, and SID/Service name so I can connect through SQL Developer?
It seems I do not have permissions to the UTL_INADDR functions.
Since you have an ODBC connection defined already, you can open the ODBC Data Source Administrator on your computer (Goto the start menu and type ODBC in to search for it).
In the ODBC Data Source Administrator select the data source for the database in question (it may be on the User, System or File DSN tab) and click the Configure button.
From the Configuration screen you will be able to see the TNS Service Name for the connection.
The TNS Service Name should be all you'll need to supply to SQL Developer when creating the connection. Aside from your account credentials of course.
You can query SID and Hostname like this:
select instance_name, host_name from v$instance;
Afaik there is no way to query the port name from the database, see also this article on Ask TOM on this subject:
You cannot get the port -- the port is not necessarily known to the
database. The listener need not be running on the same machine with
the database, a single listener might be servicing many databases. A
database may have many listeners servicing it.
When I call net start OracleServiceORCL on the Windows command line I get
The requested service has already been started.
When I then run sqlplus on the command line I can log on to my database successfully.
However when using SQL Developer to connect to the database with the same credentials I'm getting the error
I/O error: The network adapter could not establish the connection.
Vendor code: 17002
The same error occurs when I starting my application server which is connected to the database.
I was already able to use SQL developer or start my server but don't know of anything that has changed since then. How can I make it work again?
There could be a lot of reasons for these. You can start checking your listener status. Check if Oracle listener is running for your database. sqlplus can connect to your database even if the listener is stopped, i'm not sure how it does. But with the listener not running it will disable the clients like sqldeveloper even it is on the same machine to locate your database.
> lsnrctl services
What sort of connection are you using? Oracle clients can use two types of connection via TCP or bequeath connection.
When using sqlplus on the same host as your DB is running, you usually do sqlplus / as sysdba this will create connection using bequeauth. Bequeauth bypasses the listener completely and directly spawns a child process which will handle requests to DB.
If you use sqlplus like this sqlplus username#host you are connecting using TCP via listener, which handles the connection and spawns process that will communicate with the DB.
Oracle listener by default runs on port 1521 so my first guess if the listener is running is that firewall is blocking access to 1521.
You should try to connect to db using first bequeatuh then via listener, if bequeauth works and TCP connection doesn't the problem is probably somewhere between listener and network. (You can also setup sqldeveloper to use bequeauth but it has to be installed on the same host as DB)
You can check listener status using lsnrctl status if everything seems fine there check the file listed under Listener Log File to see if any connections are being made via listener, or if there are any errors present.
Am a newbie to oracle, I've Oracle Database installed on my windows machine and I can connect to the database without any problem from my machine using the sqlPlus / SQL Developer. And I have a java application in my machine which needs to connect to the Database using JDBC driver. After downloading the ojdbc driver I can connect to the java application by providing the connection url as jdbc:oracle:thin:#127.0.0.1:1521:orcl
Now, I want to know how can I connect to my oracle database that is installed in my machine (ip address:10.0.xx.xx) from the java application which is running in another machine (ip address:10.0.yy.yy). BTW both the machines are connected in LAN.
Do I need to change anything in listener configuration or in tnsnames.ora file?
I checked these links for reference before posting this question:
How to connect to an Oracle DB from another system
also Cannot access oracle using sqlplus from another machine on the LAN
Please Suggest me how can I do this one. Thanks in advance.
The JDBC url has this form
jdbc:oracle:thin:#HOST:PORT:SID
So if you wanted to connect to an oracle server running on 10.1.2.3, on port 1521 (the default one), and on a database named 'stackoverflowdb' you'd use:
jdbc:oracle:thin:#10.1.2.3:1521:stackoverflowdb
I have to connect to a remote Oracle database. Connection will only work with a VPN access to the remote network. I have already setup the VPN, and that is working.
Remote team has passed TNS.ORA settings. I have hardly worked on configuring oracle and neither I am aware of the setup that I need to have on my machine. I just need to run few queries to test the data.
Can somebody guide me on the setup and the configuration I need to have on my windows 7 to connect to a remote Oracle database ?.
My first assumption was to download Oracle client. I downloaded Oracle Insta Client files, but I have no idea how to configure it to connect to a remote database. I couldn't even find any ORA file in the installed files of Insta client.
One you installed the instant client and installed it, you can conect to the remote database by using an easyconnect string. If you are in sqlplus you can do the following:
CONNECT username#[//]host[:port][/service_name][:server][/instance_name]
Lets assume your remote host is remote1 and the service_name is test (This can be retrieved from the tnsnames.ora)
connect username#//remote1/test