chrix75

chrix75

Connection to Oracle DB

Hi,

I continue my Elixir exploration and now I’m trying to fetch data from our databases that are Oracle DB.
I’ve found I must use the Erlang :odbc module and pass through ODBC connection.

I’ve installed the Oracle ODBC driver and set a Data Source but when I try to connect, that fails.

Below my actions and their results:

iex(18)> :odbc.start()
:ok
iex(19)> {ok, ref} = :odbc.connect('DSN=SIRENE_REC;UID=account;PWD=the_password', [])

13:25:21.953 [error] [79, 68, 66, 67, 58, 32, 114, 101, 99, 101, 105, 118, 101, 100, 32, 117, 110, 101, 120, 112, 101, 99, 116, 101, 100, 32, 105, 110, 102, 111, 58, 32, [123, ['tcp_closed', 44, '#Port<0.1505>'], 125], '\n'] {:error, :connection_closed}

13:25:21.954 [error] GenServer #PID<0.125.0> terminating
** (stop) {:port_exit, :collecting_of_driver_information_faild} Last message: {#Port<0.1503>, {:exit_status, 23}} State: {:state, #Port<0.1503>, {#PID<0.81.0>, #Reference<0.1271860022.1836056577.135740>}, #PID<0.81.0>, :undefined, :on, :undefined, :undefined, :on, :connecting, :undefined, 0, [#Port<0.1501>, #Port<0.1502>], #Port<0.1504>, #Port<0.1505>}

For my noob level, I’m lost :blush:

Most Liked

OvermindDL1

OvermindDL1

Instead of using ODBC (which kind of sucks), have you thought about using a direct Oracle driver like jamdb_oracle or so?

I personally mount my work Oracle database as a FDW inside my PostgreSQL database. ^.^

OvermindDL1

OvermindDL1

All the lower-case j prefixes make me think java. You could always write a Java Erlang node (the java api comes with the erlang distribution) for Elixir to talk to. ^.^

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New

Other popular topics Top

TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41539 114
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement