<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: MohananT</title>
    <description>The latest articles on Forem by MohananT (@mohanant).</description>
    <link>https://forem.com/mohanant</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F86954%2Fdc2691dc-b9ca-48e4-9c5d-8bce123e2087.png</url>
      <title>Forem: MohananT</title>
      <link>https://forem.com/mohanant</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mohanant"/>
    <language>en</language>
    <item>
      <title>Install &amp; Configure oracledb node module in windows</title>
      <dc:creator>MohananT</dc:creator>
      <pubDate>Thu, 26 Jul 2018 14:00:29 +0000</pubDate>
      <link>https://forem.com/mohanant/install--configure-oracledb-node-module-in-windows-41fg</link>
      <guid>https://forem.com/mohanant/install--configure-oracledb-node-module-in-windows-41fg</guid>
      <description>

&lt;p&gt;Hi Friends, I am new to this community and this is my first post.TADA!!. Ok, coming to the topic recently when i came across a requirement to use oracledb as a backend to nodejs server. I believed npm install of oracledb will suffice but sooner or later after reading the documentation of oracle and its npm library support. I figured it out, this is going to be a daunting task. It took me a day to install and establish connection between nodejs and oracle server.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installation of oracledb
&lt;/h1&gt;

&lt;p&gt;As per oracledb node github page &lt;a href="https://oracle.github.io/node-oracledb/INSTALL.html#quickstart"&gt;Link&lt;/a&gt;, the command &lt;em&gt;npm install oracledb&lt;/em&gt; must be enough to install orabledb package but if and only if your computer system has binary of oracledb which we would not have it anyway. So, to get it installed i followed the following steps which I would recommend everyone to follow sequentially to get started in no time.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://www.python.org/downloads/"&gt;Python&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;After installing python, set the environment variable for python. Under System variables in PATH, add/append python.exe's path.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Install a C Compiler with support for C++ 11

&lt;ul&gt;
&lt;li&gt;Install Visual Studio 2015 Community Edition &lt;a href="https://visualstudio.microsoft.com/downloads/"&gt;Link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;In case, if the compiler is not working, we need to set it up. This is not a tedious process since it can be done internally if we try to create a C++ project which in turn installs required compiler and sets the environment.&lt;/li&gt;
&lt;li&gt;One thing to note here is, check whether you have necessary C++ Redistributable.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Oracle instant client for Windows

&lt;ul&gt;
&lt;li&gt;Download both  Instant Client Package - Basic and Instant Client Package - SDK &lt;a href="http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html"&gt;Link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Copy the contents in both zip files into C:\Oracle\instantclient.&lt;/li&gt;
&lt;li&gt;Set System variables as explained earlier.Include the instantclient's location to PATH variable like PATH: C:\Oracle\instantclient.&lt;/li&gt;
&lt;li&gt;Create a new variable with name as OCI_LIB_DIR and add value as C:\Oracle\instantclient\sdk\lib\msvc.
&lt;code&gt;OCI_LIB_DIR: C:\Oracle\instantclient\sdk\lib\msvc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a new variable with name as OCI_INC_DIR and add value as C:\Oracle\instantclient\sdk\include. &lt;code&gt;OCI_INC_DIR: C:\Oracle\instantclient\sdk\include&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm install oracle/node-oracledb.git#v2.3.0&lt;/code&gt;. This should suffice and tada oracledb node module installs into out working directory after binary compilation.&lt;/li&gt;
&lt;li&gt;don't forget to install github :-)&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Issues faced
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;NJS-045: cannot load the oracledb add-on binary for Node.js or DPI-1047: Oracle Client library cannot be loaded, then review any messages and the installation instructions.&lt;/code&gt; This error would be caused mainly due to dependency mismatch. All the versions must be under same architecture.&lt;/li&gt;
&lt;li&gt;On the hindsight, don't use 12c since it trims return text while retrieving from oracle&lt;/li&gt;
&lt;/ol&gt;


</description>
      <category>javascript</category>
      <category>npm</category>
      <category>oracledb</category>
      <category>node</category>
    </item>
  </channel>
</rss>
