Sitemap
Oracle Developers

Aggregation of articles from Oracle engineers, Groundbreaker Ambassadors, Oracle ACEs, and Java Champions on all things Oracle technology. The views expressed are those of the authors and not necessarily of Oracle.

Member-only story

Connecting a Go application to Oracle Database

--

In this article, I want to walk you through connecting a Go app to a local Oracle Database and to Autonomous Database on OCI (both on-prem and autonomous, with and without Oracle Client libraries).

That’s sounds like a lot, but I promise it’s easier than it sounds.

One application uses only package go_ora and does not require the Oracle Instant Client library. The other uses package godror (aka goracle) and requires the Oracle Instant Client. For connecting to the local database both applications only use simple connection details — user, password, host, port, service name — but no wallet). For the connection to the Autonomous Database both applications use Oracle Wallet (to at least provide the certificate used for securing the transport to the database).

I had been struggling a bit with this one: how to connect from a Go application to an Oracle Database — both a locally running database as well as an Autonomous Database Instance running on Oracle Cloud. Ideally, my application does not require Oracle Client Libraries to be installed in order to contact a database as that rather complicates the installation process and general portability of the Go application. On one hand this is a smooth single binary that can run without additional requirement on a runtime configuration and JRE-like installation and then one…

--

--

Oracle Developers
Oracle Developers

Published in Oracle Developers

Aggregation of articles from Oracle engineers, Groundbreaker Ambassadors, Oracle ACEs, and Java Champions on all things Oracle technology. The views expressed are those of the authors and not necessarily of Oracle.

Lucas Jellema
Lucas Jellema

Written by Lucas Jellema

Lucas Jellema is CTO and IT architect at Conclusion, The Netherlands. He is Oracle ACE Director, one time JavaOne Rockstar and programmer

No responses yet