Skip to main content
Version: v2

How to connect to local Oracle from Azure VM?

Demo Objective: Canner Enterprise installed on Azure will have an outbound IP. This document will first describe how to test the feasibility of connecting Azure to the local oracle through the public IP through Azure VM and installing Canner Enterprise on Azure. After that, you can set the outbound IP to access the local Oracle.

Step 1: Create a test Azure VM

  • 1.1 Please go to the Virtual Machine page, click the Add (+Add) button, fill in the name in the settings, please select the CentOS VM, click Review & Create, click OK after confirmation

1_onprem_oracle

  • 1.2 Click to download the private key

2_onprem_oracle

  • 1.3 Go to the Overview page of the VM, click the Connect button, and refer to the instructions to connect to the VM via SSH

3_onprem_oracle (Click Connect > SSH)

4_onprem_oracle

  • 1.4 After SSH to the VM, please install the oracle instant client Please refer to the section Installation of RPM files in Official Documentation to install Oracle via RPM instant client.

5_onprem_oracle

(SSH into the VM, after setting the environment variables and other information according to the official document, you can enter sqlplus to test whether the installation is successful)

Step 2: Local firewall and NAT settings allow specific IP access

  • 2.1 Go to the VM's Overview page, copy the external Public IP Address, and set up the local firewall and NAT for the IT staff so that this IP can connect to Oracle

6_onprem_oracle

(Click Copy to clipboard to copy)

  • 2.2 Get Oracle's externally accessible IP or Host and other connection information

Here we won't explain the firewall and NAT settings in detail because each company's structure and adoption plan are different. Finally, you should be able to obtain the following information

  1. Host/IP for external access
  2. Port used
  3. Service of target connection
  4. Username/password

Step 3: Confirm that you can connect to Oracle IP/Host from Azure

  • 3.1 Re-SSH to the VM created in step 1, and connect to the IP/Host through sqlplus (if you see similar errors like sqlplus command not found, please reset the environment variables and other information)

Use the connection information obtained in step 2 to do the following connection test.

sqlplus username/password@host:port/service

After success, you should see information similar to the image below.

7_onprem_oracle

After the third step is successful, the representative can connect to the local Oracle from Azure, deploy Canner Enterprise on Azure, and obtain the outbound IP of Canner Enterprise on Azure for configuration.