GCP Datafusion oracle connectivity issues - oracle

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 :)

Related

How to connect to an Oracle database with JDBC

I currently have a connection for MySQL database and connected as:
spring.datasource.url = jdbc:mysql://${mysql.service.host}:${mysql.service.port}/${mysql.service.database}
If I were to change the database and used Oracle database instead then how would the datasource URL change?
jdbc:oracle:thin:#//server:port/service
or
jdbc:oracle:thin:#//server:port:SID
The server entry would be the IP address or network name where your Oracle Listener is handling connection requests. The port would be the port number being used for said listener requests.
Service would be the database service name, if you're connecting to an Oracle Pluggable Database, you'll always need this.
The SID is a unique ID for your database, you could use that, but you're encouraged to use the service instead.
If you wish to make a THICK connection, that is, use an Oracle Client to make a connection to your database, then things get a bit more complicated. I would suggest using THIN until you can't.

remote oracle database connection

I am working on a project using oracle.The remote host pc ip address is 10.100.59.30 where my database exists.I want to connect the database from my computer(ip:10.100.59.150). How should I do it?Oracle listener is working fine.But Showing network adapter is not connecting.I checked the firewall.It is off.All is fine but database connection is not building up.I have tried every possible solution.Am I missing some silly things?I have tried with sqlplus username/password#hostA:1521 /XE in cmd.but not working.And I do not have oracle installed in my pc.
Do you have tnsnames.ora? Or here is AskTom answer how to connect to oracle without one.

Connecting to Oracle database from another machine on LAN

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

Connecting to remote Oracle database using Oracle Client

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

Cannot connect to Oracle server

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....

Resources