0

I'm trying to create a small Google Cloud Function (GCF) that will query Oracle DB and send email. I'm looking into using Node.js. I wasn't able to find anything useful, the only closes I found was a post regarding GCF to Oracle with Python. Please let me know if there is a way to call Oracle DB from GCF

1
  • So much missing detail. Is the Oracle DB on-premise? Do you have network connectivity? Have you worked out which node.js dependency is required for Oracle connectivity? What level of experience do you have with node.js? Do you have some existing node.js can do this on-premise (not in a GCF?) Commented Sep 24, 2019 at 10:26

1 Answer 1

2

In summary it's not possible because you need to install Instant Client and you can't on Cloud Function environment. Same issue with AppEngine Standard.

I'm writing an article on Medium on this. I'm waiting a bug fix on Cloud Run and the validation of Google (because some things can be confidential in it) before publishing it.

There is 2 workaround:

  • build a container (simply put an express server in front of your function, that's all!).
    • If you need to reach OnPrem Oracle DB you could deploy your container on AppEngine Flex (However don't scale to 0) and set up a serverless VPC Connector
    • If you don't need a serverless VPC connector, you will be able to deploy on Cloud Run in a couple of weeks, after the bug rollout
  • Use Java. You will have to download the Oracle Jar driver manually and to install it manually in Maven/Gradle, but then it work anywhere, even on AppEngine standard.

UPDATE

The bug with Cloud Run and GVisor has been solved. Here my article

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer. Regarding 2nd option, there is no Java GCF, I'm assuming you meant Java in the AppEngine or other environments
Today, yes, Java in AppEngine standard works (scale to 0 and compliant with serverless VPC connector). Also work in AppEngine Flexible and Cloud Run TODAY, because the current bug with Instant Client isn't exist (because Instant Client isn't required). Java GCF are in alpha (and I speak about it in my article, that's why I'm waiting Google validation) and it will also be a solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.