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.2 Click to download the private key
- 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
(Click Connect > SSH)
- 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.
(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
(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
- Host/IP for external access
- Port used
- Service of target connection
- 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 likesqlplus
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.
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.