Is it possible yet to connect to an Oracle Database using Swift (raw or a Swift framework) on Linux? What I have done is tried to build a Docker VM, install the Oracle binaries, add the OCILIB package and then connect [tried] using a package called SwiftOracle, which seems unsupported (lots of build issues) and just exposes the OCILIB C code to Swift using a module map and wrapper.
I tried this using the Kitura framework and none of this seemed to work - Xcode can't compile because it isn't unable to either find the C library or create the module.
Here are the steps that I have tried to no avail:
Build Docker VM (which includes Oracle binaries): https://github.com/wnameless/docker-oracle-xe-11g
Download and install OCILIB: https://github.com/vrogier/ocilib
Add SwiftOracle package, fix build issues and try to build.
you can use the following method to connect to oracle database: ( This was possible by the help of vapor community.)
-----to make oracle driver work, I have Tied this method in Ubuntu------------- -- oracle client need to be installed such that the header and library path can be defined, you can get these from oracle website.
--install thus downloaded package using following command
-- Install libaio1 in ubuntu
-- this path should be in ~/.bashrc
--download OCILIB library from Github git clone https://github.com/vrogier/ocilib.git ( or download the latest version / tested on ocilib 4.5.2 ) -- extract ocilib file cd to ocilib folder, configure make and make install
-- use this configuration if you need to deal with unicodes, generally you don't need this
-- The above method installs OCILIB in your machine. -- To user OCILIB library in your Vapor project Include the following in you Package.swift file