Deploying a Node.js project which uses Oracle Cloud database to Azure App Service - node.js

I have an application in Node JS which uses Oracle cloud anonymous database which is currently working perfectly with my application at local.
I wanted to deploy this app on Azure App Service and so I followed this Microsoft Doc Link using this I was able to deploy my project and it is running on the server but unfortunately it is not able to connect to my oracle could database
while deploying I got some logs which says this
** Node-oracledb 4.2.0 installed for Node.js 14.17.4 (linux, x64)
oracledb **
oracledb ** To use node-oracledb:
oracledb ** - Oracle Client libraries (64-bit) must be configured with ldconfig or LD_LIBRARY_PATH
oracledb ** - To get libraries, install an Instant Client Basic or Basic Light package from
oracledb ** https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
oracledb **
oracledb ** Installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html
oracledb
so from this, I somehow understood that I need to configure the Oracle client on a Linux server so after spending hours I got a solution where I need to set up the path here is the Oracle Doc but even this settings did not worked for me still not able to connect it.
also, one more thing I noticed was as soon as I redeploy or restart my App Service the settings get vanished
for oracle, I have database name, password, connection string, and oracle has also provided me with waller.zip which has tnsnames and cwaller.sso
have spent 3 days understanding the problem, if someone can help with it would be great, please comment if you need any more details to understand my problem

This is not a full answer (i.e. it's too big for a comment).
Start by upgrading to a recent version of node-oracledb, e.g. 5.2.
It sounds like you know what to do with the wallet files, but here is the node-oracledb doc on Connecting to Oracle Cloud Autonomous Databases. If you don't have the wallet files in a default location you can (with node-oracledb 5) use initOracleClient({configDir:'/your/path'}) to indicate their location.
The final piece is to set LD_LIBRARY_PATH to the location of your Instant Client libraries. Search for Azure doc on how to do this - I don't have experience with this environment.

Related

How to connect Excel to Oracle with PowerQuery

I am trying to connect Excel to my company's Oracle Database. According to the following instructions it should be fairly easy: https://www.wikihow.com/Connect-Excel-to-an-Oracle-Database.
However it has been impossible and quite frustrating so far.
I have followed two different approaches that I've found online.
FIRST APPROACH: installed ODAC from Oracle's Universal Installer
I went to this site https://www.oracle.com/database/technologies/dotnet-odacdev-downloads.html and downloaded the ODAC 12.2.0.1.1 file.
Then, I went through the installation process basically just clicking 'next' on every step.
Note 1: (I don't know if this might be important), in the Database Connection configuration tab I did not fill in any of the information (simply because I didn't know what to put there). It said that if information wasn't filled in, it would not create the TNSNAMES.ORA file.
Note 2: After finishing the installation it says 'run the SQL scripts located in the ... directory after the install'. Which I didn't do, again, because I didn't know how.
After the installation finished a directory was created in the following location: C:\app\client\myUserName\.
The directory goes all the way down to C:\app\client\myUserName\product\12.2.0\client_1, and it contains a bunch of files and folders.
I noticed that no environmental variable was created.
SECOND APPROACH: installed ODBC instant client
I went to this site https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html and downloaded both instantclient-basic-windows.x64-19.6.0.0.0dbru.zip and instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip.
Then I created the directory C:\Oracle\instantclient_19_6 and unziped both folders contents into it.
Finally, I ran odbc_install from the command_line, as an administrator, but got Oracle ODBC Driver with same name already exists.
Note: in this case I also noticed that no environmental variable was created.
RESULTS:
When I go to Excel and click on Data\From Database\From Oracle Database I keep getting the same error as before: The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly.".
I was able to solve it by installing the 64 bits version of Oracle's client. Its located at https://www.oracle.com/database/technologies/112010-win64soft.html, file win64_11gR2_client.zip.
Although the message "The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly." remained, I was able to connect after ignoring it.
I have also tried a bunch of approaches and finally got rid of the 'Oracle.DataAccess.Client is not installed' error.
Install Oracle Client for Microsoft Tools:
ODP.NET, Oracle Developer Tools for Visual Studio (Code), and ODAC
https://www.oracle.com/database/technologies/net-downloads.html
Oracle Client for Microsoft Tools installs and configures ODP.NET to support 64-bit Microsoft tool connections with Oracle database. It supports connecting with Power BI Desktop, Power BI service, Excel, SQL Server Analysis Services, SQL Server Data Tools, SQL Server Integration Services, SQL Server Reporting Services, and BizTalk Server.
I have installed Oracle Client for Microsoft Tools 19.17 for (Microsoft Windows x64 (64-bit)) (V1032890-01.exe).
Alternatively, you could follow the learn more link:
Connect Microsoft Tools to Oracle Databases
https://www.oracle.com/database/technologies/appdev/ocmt.html
Tutorials > Power BI Desktop: Connect to Oracle Database
https://www.oracle.com/a/ocom/docs/database/microsoft-powerbi-connection-adw.pdf

Nodejs oracle Db connection on Openshift platform

I have created and deployed node.js application on Openshift platform.
I need to connect to oracle db which is on a remote host.
I am able to connect to the oracle Db from my local machine as i have installed oracle client.
But when I deploy the application to Openshift platform I get below error.
Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so
I know I need Oracle client installed on the hosting system.. but the openshift platform doesn't allow me any installation.
Can anybody suggest me any way how to get around this.
Thanks in advance.
Can you deploy a Docker container? If so, then check out https://github.com/oracle/docker-images/blob/master/OracleLinuxDevelopers/oraclelinux7/nodejs/12-oracledb/Dockerfile. Also see the node-oracledb installation instructions for docker: https://oracle.github.io/node-oracledb/INSTALL.html#docker. And see the blog post series https://blogs.oracle.com/opal/docker-for-oracle-database-applications-in-nodejs-and-python-part-1

Installing MongoDB compass this may take a few minutes

It has been half an hour and it is still stuck at the same progress. My machine is Windows 7 and I have downloaded the Community Server 2008 R2 64-bit and later. Sreenshot
Does anyone know why? Do I really need Compass if I were to use it with Node.js?
I'm new to MongoDB and node.js
Please help. Thanks in advance
As for January 2021, I've faced this issue with version 4.4.3. Press cancel on the installation won't help, and need to close the PowerShell process.
Then, Re-install without the compass, and after successful installation, install manually only the compass itself.
Compass is a GUI client which can be used to manages collections, documents etc.
To do development in Node.JS (or any other programming language) you do not need Compass as it is a GUI tool which is a mongo client.
You can use mongo CLI client(Recommended). If you really need GUI tool, you can try Robo 3T.
Only MongoDB server + any client is needed for most web development. Any client can be used to configure it, like CLI or Robo 3T or compass.
Although, you even don't need local installation of mongoDB server. You can use a cloud database like MongoDB Atlas. It has all tools inbuilt as is very powerful. However I would still recommend doing a local installation of mongo server to avoid dependency of network while testing your app.
Please refer to the following link.
https://checkinnuggets.wordpress.com/2018/01/14/installation-update-of-mongodb-3-6-2-on-windows-hangs/
Instead of choosing Complete Installation, choose "Custom" instead, then at the last step, uncheck 'Install MongoDB Compass'. This will complete the installation.
Downloading/installing version 4.0.14 worked for me.

Could not create connection from Driver

i am new to the oracle. ,My project is .net web application which is connected to the oracle database(oracle 11g) when i run my solution in local environment, i get the error in the below line saying that "Could not create connection from Driver".
return factory.ConnectionProvider.GetConnection();
but this project is working fine in windows XP and I am using windows 7 with oracle 11g installed in my system where i am facing the problem.please can any one give solution.
I understand from the team that this project is designed with oracle 9.2 in mind. how do i make it work in oracle 11g which i have it currently.
I would advise you to use Oracle's Managed Data Provider for .NET. All your problems with local Oracle installations will go away immediately. Since it's a 100% managed driver, you won't need to install Oracle's client on your machine before connecting to it with .NET programs.

Upgrade to Azure 1.7 now connecting to different dev storage

I have just upgraded to the Azure 1.7 sdk and have now lost the contents of my devstorage.
I can still see it in the local instance of sqlexpress (as DevelopmentStorage20110606), but when I use UseDevelopmentStorage=true, it longer connects to this.
Where has the new development storage db gone? I need to import my data from the previous version, as we use local storage for testing on the build server and have test data setup on it, or is there an upgrade script to be able to port this data accross.
Thanks
SDK 1.7 now uses IIS Express (compute) and SQL Server 2012 Express LocalDB (storage). You should be able to point your emulator to your existing database by running dsinit.
Michael Collier talks about the 1.6 vs. 1.7 differences in his post, here.
More information about LocalDB is here.
DSInit documentation is here.

Resources