Is there some simple example livebook, where is described how to use jamdb_oracle DB driver to connect to Oracle database ? There are some smart cell prepared for Postgres but I use Oracle. Is there any simple way how to connect to DB and start to run SQL commands?
In the setup add the dependency:
{:jamdb_oracle, “~> 0.5.10”}
In your cell(s):
opts = [ hostname: “your host name”, port: 1521, database: “your SID”, username: “HR”, password: “HR”, timeout: 15000 ]
{:ok, conn} = Jamdb.Oracle.connect(opts)
result = Jamdb.Oracle.query(conn, ‘select sysdate from dual where 1=:1’, [1])
Jamdb.Oracle.disconnect(:now, conn)
result
Thx a lot Nico, it works. Pretty easy and straightforward solution, I was thinking about Ecto solution, but this is more flexible for me.
P.