How to connect Node.js 18 LTS to Oracle Database 12c EE using node-oracledb

Channel:
Subscribers:
5,740
Published on ● Video Link: https://www.youtube.com/watch?v=KeHm-VhMO7U



Category:
Tutorial
Duration: 2:35
4 views
0


In this video we are going to see How to connect Node.js 18 to Oracle Database 12c EE orcl instance using node-oracledb add-on.
1. First check nodejs is available in commandline (node --version, npm --version).
2. Go to Source code directory in commandline and run "npm install oracledb".
3. Finally run the js program "node oracle12c.js"

Node.js and node-oracledb add-on can be downloaded from:

https://nodejs.org/download/release/v18.16.0/
https://github.com/oracle/node-oracledb


Below is the program to connect NodeJS to Oracle Database 12c EE orcl instance.

IMPORTANT NOTE on SOURCE CODE: only source code that are acceptable by the youtube description box will be displayed.
In this program I have replaced the angled brackets with > or <. once you copy the source code to editor replace it with greater than or less than symbols respectively.
#########################SOURCE CODE STARTS HERE##############################
const oracledb = require('oracledb');

async function run() {
let connection = await oracledb.getConnection({
user : "C##Scott",
password : "tiger",
connectString : "localhost:1521/ORCL" // [hostname]:[port]/[DB service name]
});
let query = 'SELECT * from person';

connection.execute(query, (err, rows) => {
if(err) throw err;

console.log(rows);
});
}
run();
#########################END OF SOURCE CODE##############################

#nodejs #nodejs18 #nodejstutorial #nodejsoracle #oraclenodejs #nodejsdatabase #nodeoracledb #12c #oracle




Other Videos By java frm


2023-05-03How to install Oracle GraalVM Enterprise Edition 22 on Windows 10/11 - GraalVM 22
2023-05-03How to install Oracle GraalVM Enterprise Edition 22 on Rocky Linux 8 and run Java/C/C++/nodeJS
2023-05-02How to install Oracle GraalVM Enterprise Edition 22 on RHEL 8 and run Java/C/C++/nodeJS
2023-05-02How to install Oracle GraalVM Enterprise Edition 22 on Oracle Linux 8 and run Java/C/C++/nodeJS
2023-05-02How to connect Node.js 20 to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 20 to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 20 to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 20 on Windows 10/11 from zip archive
2023-05-02How to connect Node.js 18 LTS to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 18 LTS to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 18 LTS to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 18 LTS on Windows 10/11 from zip archive
2023-05-02How to connect Node.js 16 LTS to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 16 LTS to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 16 LTS to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 16 LTS on Windows 10/11 from zip archive
2023-05-02How to connect Node.js 14 LTS to Oracle Database 23c FREE using node-oracledb
2023-05-02How to connect Node.js 14 LTS to Oracle Database 19c EE using node-oracledb
2023-05-02How to connect Node.js 14 LTS to Oracle Database 12c EE using node-oracledb
2023-05-02How to install Node.js 14 LTS on Windows 10/11 from zip archive
2023-04-23Ubuntu Studio 23.04 Installation on VirtualBox 7.0 with Guest Additions step by step | Lunar Lobster



Tags:
how to connect nodejs 18 to oracle database 12c free
how to connect nodejs to oracle database 12c
nodejs oracle database connectivity
node-oracledb add-on to connect oracle database
nodejs oracle driver
install node-oracledb module
connect oracle database with nodejs
how to connect oracle with nodejs
node.js and oracle database
node-oracle db oracle database
nodejs oracledb module
node-oracledb package for oracle database
oracle database nodejs node-oracledb