Has anyone used the node-oracledb (https://www.npmjs.com/package/oracledb) add-on with Profound.js on an IBM i?
I was trying to load it and it appears there isn't a pre-compiled binary for the IBM i.
Is there a different oracle connector package that I can install to connect to an Oracle database?
The databaseConnections documentation (https://docs.profoundlogic.com/display/ ... onnections) shows an example of using the "oracledb" driver. Does that example only work on Profound.js spaces?
oracledb
-
- Profound User
- Posts: 30
- Joined: Mon Jun 22, 2020 1:48 pm
- First Name: Rich
- Last Name: Dotson
- Company Name: MTD Products
- State / Province: Ohio
- Country: United States
- Contact:
oracledb
- Attachments
-
- oracledb.png (38.21 KiB) Viewed 22137 times
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: oracledb
I've only used it on Windows, and Oracle provides a prebuilt binary for Windows.
Seems to work well once you get it installed, though I do feel like it was a bit fussy about getting all of the stuff installed and working right the first time. I'm not a huge Oracle fan in general, but the Node driver seems decent.
Seems to work well once you get it installed, though I do feel like it was a bit fussy about getting all of the stuff installed and working right the first time. I'm not a huge Oracle fan in general, but the Node driver seems decent.
-
- Profound User
- Posts: 30
- Joined: Mon Jun 22, 2020 1:48 pm
- First Name: Rich
- Last Name: Dotson
- Company Name: MTD Products
- State / Province: Ohio
- Country: United States
- Contact:
Re: oracledb
I'm not a huge Oracle fan either but our data warehouse is in Oracle. I've been able to access to our MS SQL Server easily via Profound.js on our IBM i and I was hoping to be able to do the same with Oracle.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: oracledb
I'll experiment a bit and see how hard it is to get this working on IBM i.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: oracledb
Looks like this will be a no-go.
I was able to compile a copy of node-oracledb from source code. That part was pretty easy. However, under the covers, node-oracledb calls some other programs that come from Oracle that are not open source. So, for those programs, there's no way I can compile them.... you'd have to get Oracle to provide them for PASE. They do provide them for AIX, and sometimes AIX programs will work fine in PASE, but in this case it refers to something called 'libperfstat' which is in AIX, but is not available for PASE, so it won't work.
So... I did what I could to try to make this work, but it doesn't look possible. At least, not unless Oracle wanted to help.
A solution might be to run a copy of Profound.js on Windows or Linux that does the Oracle stuff. If its important to run the application on IBM i, you could set up REST APIs on the Windows/Linux box and call them from the IBM i code. You'd have to write the APIs, so there's some extra work there, but depending on what you need to do this might be an easy solution.
Of course, if you're willing to run the application itself on Windows or Linux, then you don't need to have special REST APIs. (But, in that case, why was it a requirement to have the Oracle driver run on IBM i?) Keep in mind that Profound.js programs, even if run on Windows or Linux, can have a "proxy program" on IBM i so that you can still call them with a simple CALL command (or RPG prototype) so even though they're on another box, they're still very easy to integrate with your standard RPG and CL programs.
I was able to compile a copy of node-oracledb from source code. That part was pretty easy. However, under the covers, node-oracledb calls some other programs that come from Oracle that are not open source. So, for those programs, there's no way I can compile them.... you'd have to get Oracle to provide them for PASE. They do provide them for AIX, and sometimes AIX programs will work fine in PASE, but in this case it refers to something called 'libperfstat' which is in AIX, but is not available for PASE, so it won't work.
So... I did what I could to try to make this work, but it doesn't look possible. At least, not unless Oracle wanted to help.
A solution might be to run a copy of Profound.js on Windows or Linux that does the Oracle stuff. If its important to run the application on IBM i, you could set up REST APIs on the Windows/Linux box and call them from the IBM i code. You'd have to write the APIs, so there's some extra work there, but depending on what you need to do this might be an easy solution.
Of course, if you're willing to run the application itself on Windows or Linux, then you don't need to have special REST APIs. (But, in that case, why was it a requirement to have the Oracle driver run on IBM i?) Keep in mind that Profound.js programs, even if run on Windows or Linux, can have a "proxy program" on IBM i so that you can still call them with a simple CALL command (or RPG prototype) so even though they're on another box, they're still very easy to integrate with your standard RPG and CL programs.
-
- Profound User
- Posts: 30
- Joined: Mon Jun 22, 2020 1:48 pm
- First Name: Rich
- Last Name: Dotson
- Company Name: MTD Products
- State / Province: Ohio
- Country: United States
- Contact:
Re: oracledb
Thanks for looking into this for me Scott. I was trying to keep all the development on the IBM i because, unfortunately, our development here is pretty siloed and if the REST APIs are on the Windows box then that would be another development group and it would also invoke other project management requirements that I was trying to avoid.
I'll research other solutions for accessing our Oracle data from the IBM i.
Thanks again for checking into this for me.
I'll research other solutions for accessing our Oracle data from the IBM i.
Thanks again for checking into this for me.
Who is online
Users browsing this forum: No registered users and 2 guests