Deployment guide

Oracle Database Client 19c on Oracle Linux 8

Overview

This guide shows how to deploy and configure Oracle Database Client 19c on Oracle Linux 8 on Microsoft Azure. It uses the preconfigured SecureAnyCloud virtual machine image from the Azure Marketplace. Oracle Database Client 19c provides the tools and libraries to connect to and manage remote Oracle 19c and earlier database instances. It includes SQL*Plus, Oracle Net, JDBC and OCI drivers, and the full Administrator install set, with no database server needed on the same VM.

What you get:

  • Oracle Database Client 19c 19.3.0.0.0 (Administrator install) installed at /u01
  • A dedicated oracle OS user with an environment script (setEnv.sh)
  • SQL*Plus, sqlldr, tnsping, expdp, impdp and the full Oracle Net client utility set
  • Preseeded tnsnames.ora and sqlnet.ora files, ready for your entries
  • A system-wide /etc/profile.d hook, so any future user picks up the client tools
  • An OS package update script to keep the system current
  • Azure Linux Agent (waagent) for Azure integration
  • cloud-init for automated provisioning
  • Latest security patches applied at build time
  • 24/7 SecureAnyCloud support with guaranteed 24 hour response SLA

Platform: Microsoft Azure (Gen2 Hyper-V) Default user: azureuser Oracle Home: /u01/app/oracle/product/19.3.0/client_1 TNS Admin: /u01/app/oracle/product/19.3.0/client_1/network/admin

Prerequisites

Before you deploy this image, make sure you have:

  • An active Microsoft Azure subscription
  • Access to the Azure Portal or Azure CLI
  • An SSH key pair for Linux VM access
  • The hostname, port and service name of the Oracle Database you want to connect to
  • Network connectivity from the new VM to the target Oracle Database (typically TCP 1521 outbound)

Recommended VM size: Standard_B2s (2 vCPU, 4 GB RAM) or larger. The Oracle Client is a set of libraries and tools rather than a running service, so the minimum requirements are modest: 1 vCPU, 1 GB RAM and 20 GB disk space.

1

Deploy the virtual machine

Option A: Azure Portal

  • Open the Azure Marketplace and search for "Oracle Database Client 19c Oracle Linux 8 SecureAnyCloud".
  • Select the image and click Create.
  • Configure the basics:
    • Subscription: Select your Azure subscription.
    • Resource Group: Create a new group or select an existing one.
    • Virtual Machine Name: Enter a name for your VM.
    • Region: Select your preferred Azure region.
    • Size: Select Standard_B2s (recommended).
  • Under Administrator Account, select SSH public key and enter your key.
  • Under Inbound Port Rules, allow SSH (port 22) from your trusted IP address only.
  • Click Review + Create, then Create.

Option B: Azure CLI

az vm image terms accept --urn sac1647283583153:oracle-db-19c-client-oel8:default:latest
az vm create \
  --resource-group myResourceGroup \
  --name my-oracle-client-19c-vm \
  --image sac1647283583153:oracle-db-19c-client-oel8:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Important: The Oracle Client makes outbound connections to remote databases on port 1521. You do not need to open port 1521 inbound on this VM. Check your Network Security Group and route table to confirm that the VM can reach your target Oracle Database server on the listener port.

2

Connect over SSH

When your VM is running, connect over SSH:

ssh azureuser@<public-ip-address>

To find your VM's public IP address, run:

az vm show --resource-group myResourceGroup --name my-oracle-client-19c-vm --show-details --query publicIps -o tsv

To switch to the root user, run:

sudo su -

Important: Wait for the VM to reach the running state before you connect. Early connection attempts can fail with permission denied errors while cloud-init completes the initial provisioning.

3

Switch to the oracle user and set the environment

The dedicated oracle OS user owns the Oracle Client software. Switch to this user and source the environment. Type this command rather than copying and pasting it:

sudo su - oracle cd $HOME . ./setEnv.sh

The setEnv.sh script sets the Oracle environment variables that utilities such as sqlplus need:

ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/19.3.0/client_1 TNS_ADMIN=$ORACLE_HOME/network/admin PATH=$ORACLE_HOME/bin:$PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH NLS_LANG=AMERICAN_AMERICA.AL32UTF8

The image also installs a system-wide hook at /etc/profile.d/oracle-client.sh. Any future Linux user on the VM picks up the same environment automatically on login.

4

Configure tnsnames.ora

Before you connect to a remote Oracle Database, add an entry for it to tnsnames.ora. As the oracle user, run these commands, replacing the sample values with the details of your target database:

cd $HOME . ./setEnv.sh cat >> "$ORACLE_HOME/network/admin/tnsnames.ora" << 'TNS' MY_DATABASE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = YOUR_DB_HOSTNAME)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = YOUR_SERVICE_NAME) ) ) TNS

Replace these values:

  • YOUR_DB_HOSTNAME with the IP address or DNS name of your Oracle Database server.
  • 1521 with the port number, if it differs from the default.
  • YOUR_SERVICE_NAME with the service name of the target database.

Check that Oracle Net can resolve the alias:

tnsping MY_DATABASE

Expected output (common prefix):

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production Used parameter files: /u01/app/oracle/product/19.3.0/client_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = YOUR_DB_HOSTNAME)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = YOUR_SERVICE_NAME)))

The output then ends with one of these lines:

  • OK (n msec) if YOUR_DB_HOSTNAME resolves and the remote listener accepts the connection. This is the result you want.
  • TNS-12545: Connect failed because target host or object does not exist if YOUR_DB_HOSTNAME is still the sample value or otherwise does not resolve. The TNS layer is loading correctly. Replace the sample host with an Oracle database server that you can reach.
  • TNS-12541: TNS:no listener if the hostname resolves but nothing listens on port 1521 at that address. Check that the target database listener is up and reachable from this VM.

Any of the three results shows that tnsping is set up correctly. Only the first shows that the full round trip to your target database works.

5

Connect to a remote database with SQL*Plus

With the environment sourced and tnsnames.ora populated, connect to your remote database. The simplest form uses the TNS alias you just created:

cd $HOME . ./setEnv.sh sqlplus system/your_password@MY_DATABASE

You can also use the EZCONNECT syntax, which does not need a tnsnames.ora entry:

sqlplus 'system/your_password@//your-db-host:1521/your-service-name'

Expected output:

SQL*Plus: Release 19.0.0.0.0 Production Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to: Oracle Database ... SQL>

Type EXIT to leave the SQL*Plus session.

Server components

Component Version Install Path

Oracle Database Client 19c (Administrator) 19.3.0.0.0 /u01/app/oracle/product/19.3.0/client_1

Oracle Linux 8 /

Note: The automatic OS package update script can update component versions on first boot.

Filesystem layout

The image uses LVM on a single OS disk. The root filesystem hosts the Oracle Client software under /u01. There is no separate /u01 mount point to manage or resize.

Mount Point Size Description

/ 37 GB Root filesystem (LVM logical volume), hosts the Oracle Client software under /u01

/boot 2 GB Operating system kernel files

/boot/efi 100 MB UEFI boot partition (Gen2 Hyper-V)

/var/crash 10 GB Reserved for kernel crash dumps (LVM logical volume)

/mnt varies Azure temporary resource disk (not persistent across stop/deallocate)

Key Oracle directories:

Directory Purpose

/u01/app/oracle Oracle base directory

/u01/app/oracle/product/19.3.0/client_1 Oracle Client home directory

/u01/app/oracle/product/19.3.0/client_1/bin Client binaries (sqlplus, sqlldr, tnsping, expdp, impdp)

/u01/app/oracle/product/19.3.0/client_1/lib Oracle Net libraries (libclntsh.so)

/u01/app/oracle/product/19.3.0/client_1/network/admin TNS configuration files (tnsnames.ora, sqlnet.ora)

/u01/app/oraInventory Oracle Universal Installer inventory

Manage the Oracle Client

The Oracle Client is a set of tools and libraries, not a running service, so there are no services to start or stop. To use the client tools, switch to the oracle user and source the environment:

sudo su - oracle cd $HOME . ./setEnv.sh

Check that the client is ready:

sqlplus -V which sqlplus

Expected output:

SQL*Plus: Release 19.0.0.0.0 - Production Version 19.3.0.0.0 /u01/app/oracle/product/19.3.0/client_1/bin/sqlplus

Scripts and log files

Script/Log Path Description

initial_boot_update.sh /stage/scripts Updates the OS with the latest packages on first boot

initial_boot_update.log /stage/scripts Output log for the boot update script

setEnv.sh /home/oracle Sets Oracle environment variables for sqlplus and other tools

oracle-client.sh /etc/profile.d System-wide environment hook for any logged-in user

On startup

An OS package update script runs on first boot to apply any updates released since the build. To disable it, remove the script and its crontab entry:

sudo rm -f /stage/scripts/initial_boot_update.sh
sudo crontab -e
# Delete the following line, save and exit: @reboot /stage/scripts/initial_boot_update.sh

Troubleshooting

Cannot connect over SSH

  • Check that the VM is in the Running state in the Azure Portal.
  • Check that the Network Security Group allows port 22.
  • Check that you are using the correct username: azureuser.
  • Check that your SSH key matches the one you configured during deployment.

sqlplus: command not found

  • Check that you switched to the oracle user: sudo su - oracle.
  • Source the environment script: . ~/setEnv.sh.
  • Check that the install path exists: ls /u01/app/oracle/product/19.3.0/client_1/bin/sqlplus.
  • Check that $ORACLE_HOME/bin is on your PATH: echo $PATH.

ORA-12154: TNS:could not resolve the connect identifier specified

  • Check that your alias is defined in tnsnames.ora: cat $ORACLE_HOME/network/admin/tnsnames.ora.
  • Check that TNS_ADMIN points at the network/admin directory: echo $TNS_ADMIN.
  • Check that the alias resolves: tnsping MY_DATABASE.
  • Look for typos and case differences in the alias name.

ORA-12170: TNS:Connect timeout occurred

  • Check that the VM can reach the target database hostname and port: nc -vz YOUR_DB_HOSTNAME 1521.
  • Check that the Network Security Group on the target database side allows inbound traffic from your VM.
  • Check the route tables, peering or VPN from this Azure VM to the target database network.
  • If the target is on premises, check the Azure ExpressRoute or site-to-site VPN connectivity.

ORA-12541: TNS:no listener

  • The remote database listener may be down. Check with the DBA who manages the target database.
  • Check that your tnsnames.ora entry uses the correct port number.
  • Run tnsping MY_DATABASE to check that the listener responds at the protocol layer.

Security Recommendations

  • Restrict outbound access: Allow outbound TCP 1521 from this VM only to the Oracle Database servers it needs to reach.
  • Protect tnsnames.ora: The TNS configuration file can reveal the hostnames and service names of internal databases. Keep its file permissions tight and do not share it.
  • Use wallets for credentials: Configure Oracle Wallet so passwords are not stored in plain text in scripts or shell history.
  • Encrypt connections: Configure Oracle Net Services to use SSL/TLS encryption for client-to-database traffic.
  • Limit OS access: Restrict SSH access to authorised administrators.
  • Enable auditing: Forward shell history and OS audit logs to a central log store.
  • Keep the system updated: Apply Oracle Critical Patch Updates and OS security patches regularly.

Support

If you have any issues with this product, contact SecureAnyCloud support:

  • Email: sales@secureanycloud.com
  • Website: secureanycloud.com
  • Product Catalogue: secureanycloud.com/products
  • User Guides: secureanycloud.com/guides
  • Support hours: 24/7 with guaranteed 24 hour response SLA

SecureAnyCloud provides Oracle expertise and platform engineering support across AWS, Microsoft Azure and Alibaba Cloud. For Oracle licensing questions, contact your Oracle account manager.

Oracle and Oracle Database are registered trademarks of Oracle Corporation. SecureAnyCloud is an independent provider and is not affiliated with or endorsed by Oracle Corporation.

Deploy on Azure

Launch Oracle Database Client 19c on Oracle Linux 8 on Azure, with 24/7 support from SecureAnyCloud.

View on Marketplace

Need help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure