Posts

Showing posts with the label ubuntu

Making connections to the Oracle Database from Golang

I posted the other day about getting going with Golang[ 1 ], and as mentioned am planning to do a series of posts on various aspects of the language - as a means to help with the learning process. Being an Oracle developer, it seemed logical I would want to be able to make connections to the Oracle database. Built into the language core is an SQL interface (for issuing queries and statements) which is through the module "database/sql". The other side of it is that you need a valid driver. A list of available drivers is on the go wiki[ 2 ]. You will see that there are 2 listed for Oracle. How do I judge which project to use? First I see that one has considerably more stars and for another, the online commentary I see also seems to suggest that same package. And that is  https://github.com/mattn/go-oci8 . Driver setup Before we get to the driver, you need to make sure you have an Oracle client and the SDK installed on your system. For, this I followed the steps as per the...

My experience as an Oracle developer running Ubuntu

Image
If you have been following my blog, you may have noticed the desktop environment I use is the Ubuntu distribution of Linux. Growing up, I always tried Linux here and there, but never stuck with it - it was more just to try out. As with anything, if you are going to use something new, you really have to commit to it - pick a period of time you are willing to use it for, and see how you go. If you still don't like it at the end, go back into your old ways. (I will add that I did once upon a time own a Mac. Actually, I purchased a Powerbook right before Apple made the switch to the Intel CPU architecture. I know Mac OS X seems quite popular in the development community nowadays, however I still prefer to be able to select my hardware, and I believe I get that freedom and also get a bit of Software freedom by running Linux.) At around 2008 - actually, soon after I started working with APEX - I had a couple of colleagues that were running Ubuntu. Since I started developing with Or...

Up and running with the node Oracle driver on Ubuntu

Image
Dan McGhan did a great video guide on getting set up with Node.js and the Oracle driver, which you can check here: Installing Node As an alternative method to downloading the node.js tarball as per the video, you can just install using your package manager: sudo apt-get install nodejs npm Once installed, you can access the node interpreter with the command `nodejs`: Post install, you should set the NODE_PATH environment variable so that nodejs can find any modules you install: export NODE_PATH=/usr/local/lib/node_modules This is where the node-oracledb driver gets installed to. Installing the Oracle driver wget https://github.com/oracle/node-oracledb/archive/master.zip -O node-oracledb.zip unzip node-oracledb.zip cd node-oracledb-master sudo npm install -g Once all that is done, you can get rid of those files: cd ~ rm node-oracledb.zip rm -rf node-oracledb-master Then, we can get to the example files: cd $NODE_PATH/oracledb/examples ...

Enhancing gedit for PL/SQL Development

Most text editors allow customisation of syntax highlighting and the like, and having recently moved to using gedit, thought i'd enhance it a bit. In a fresh installation, it already has reasonable support for oracle based keywords, but could do with a bit of an update. The object that does the syntax highlighting is gtksourceview - depending on the version of gedit, either version 2 or 3.  By going to the project page on gnome, you will see the howto for adding a new language:  https://live.gnome.org/Gedit/NewLanguage . (Linux only) Since package source code is typically in files with the extension pks and pkb, it is first necessary to update the system to recognise that those files are of the mime type text/x-sql (or a custom one if you really want). So, create an xml file with the following: <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="text/x-sql"> <comment>SQL Source including P...