Od
Databases Azure

Oracle Database Client 11g on OEL 8 on Azure User Guide

| Product: Oracle Database Client 11g on OEL 8 on Azure

Videos

Overview: Oracle Database Client 11g on OEL 8 on Azure: overview
Launch and log in: Oracle Database Client 11g on OEL 8 on Azure: launch and log in
Deep Dive: Oracle Database Client 11g on OEL 8 on Azure: deep dive

Overview

This guide covers the deployment and configuration of Oracle Database Client 11g (release 11.2.0.1.0) on Oracle Linux 8 on Microsoft Azure, using cloudimg's virtual machine image from the Azure Marketplace. The client gives you the tools and libraries to connect to and work with Oracle 11g and earlier databases, without a database server on the same VM.

What's included in this VM image:

  • Oracle Database Client 11.2.0.1.0 (Administrator install) in /u01/app/oracle/product/11.2.0/client_1
  • SQL*Plus, SQL*Loader, tnsping, Data Pump (expdp and impdp), exp and imp, Recovery Manager (rman), tkprof, adrci, and the wallet tools mkstore and orapki
  • The JDBC drivers (ojdbc5.jar, ojdbc6.jar) and the Oracle Call Interface library (libclntsh.so)
  • A dedicated oracle OS user with an environment script (setEnv.sh), and a system wide /etc/profile.d/oracle-client.sh hook so every user who logs in gets the same environment
  • sqlnet.ora set for tnsnames and Easy Connect naming, and an empty tnsnames.ora ready for your entries
  • /u01 on its own Azure data disk (20 GB), so the Oracle home sits apart from the OS disk
  • The system OpenJDK 8 in place of the bundled JDK, so Java updates arrive with dnf
  • firewalld on, allowing SSH; password login over SSH switched off
  • Azure Linux Agent (waagent) and cloud init for Azure provisioning
  • cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours

Platform: Microsoft Azure (Gen1 and Gen2 plans) Operating system: Oracle Linux Server 8.10 Default user: azureuser Oracle Home: /u01/app/oracle/product/11.2.0/client_1 TNS Admin: /u01/app/oracle/product/11.2.0/client_1/network/admin

Compatibility Note

Oracle certified Database Client 11gR2 on Oracle Linux 5, 6 and 7. This image runs it on Oracle Linux 8 with the compatibility libraries it needs (libnsl and libaio among them), and the customer facing tools (SQL*Plus, Oracle Net, SQL*Loader, Data Pump) work as on a certified install. Client 11.2.0.1.0 is an old release: use it to reach databases that need an 11g client, and use a current client for current databases. For Oracle support questions about this combination, refer to your Oracle account manager.

Prerequisites

Before deploying this image, ensure you have:

  1. An active Microsoft Azure subscription
  2. Access to the Azure Portal or Azure CLI
  3. An SSH key pair for Linux VM access
  4. The hostname, port, and service name of the Oracle Database you want to connect to
  5. 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 tools and libraries rather than a running service, so its needs are modest.

Step 1: Deploy the Virtual Machine

Option A: Azure Portal

  1. Open the Oracle Database Client 11g on OEL 8 listing by cloudimg in the Azure Marketplace
  2. Select Get it now, then Create
  3. Configure the basics:
  4. Subscription: Select your Azure subscription
  5. Resource Group: Create new or select existing
  6. Virtual Machine Name: Enter a name for your VM
  7. Region: Select your preferred Azure region
  8. Image: the Gen2 plan, unless you need Gen1
  9. Size: Standard_B2s recommended
  10. Under Administrator Account, select SSH public key and enter your key
  11. Under Inbound Port Rules, allow SSH (port 22) from your trusted IP only
  12. Select Review + create, then Create

Option B: Azure CLI

Accept the image's Marketplace terms once per subscription, then create the VM. The Gen2 plan is prod-ywworxykiqfuw-gen2; the Gen1 plan is prod-ywworxykiqfuw.

az vm image terms accept --urn cloudimg1647283583153:prod-ywworxykiqfuw:prod-ywworxykiqfuw-gen2:latest

az vm create \
  --resource-group myResourceGroup \
  --name my-oracle-client-vm \
  --image cloudimg1647283583153:prod-ywworxykiqfuw:prod-ywworxykiqfuw-gen2:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Important: The Oracle Client makes outbound connections to your databases, usually on port 1521. You do not need to open port 1521 inbound on this VM. Check that your Network Security Group and route tables let the VM reach the database's listener port.

Step 2: Connect via SSH

Find your VM's public IP address:

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

Then connect as azureuser with your key:

ssh azureuser@<public-ip-address>

Wait for the VM to reach the running state before you connect: early attempts can be refused while cloud init finishes provisioning.

Step 3: Switch to the Oracle User and Set the Environment

The Oracle Client software is owned by the oracle OS user. Switch to it, source the environment script and check the SQL*Plus release:

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

Expected output:

SQL*Plus: Release 11.2.0.1.0 Production

setEnv.sh sets the variables the client tools need. Check them with:

env | grep -E "^(ORACLE_|TNS_|NLS_)" | sort

Expected output:

NLS_LANG=AMERICAN_AMERICA.AL32UTF8
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1
TNS_ADMIN=/u01/app/oracle/product/11.2.0/client_1/network/admin

The same environment is set for every user by /etc/profile.d/oracle-client.sh, so any account you add on the VM can run the client tools too.

Step 4: Explore the Client Tooling

List the main tools in the Oracle home:

ls $ORACLE_HOME/bin | grep -xE "sqlplus|sqlldr|tnsping|exp|imp|expdp|impdp|rman|tkprof|adrci|mkstore|orapki" | paste -sd" " -

Expected output:

adrci exp expdp imp impdp mkstore orapki rman sqlldr sqlplus tkprof tnsping

Oracle Net reads sqlnet.ora for its naming methods. The image looks names up in tnsnames.ora first, then accepts Easy Connect strings:

cat $TNS_ADMIN/sqlnet.ora

Expected output:

NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
SQLNET.EXPIRE_TIME = 10

For your own applications, the JDBC drivers are in $ORACLE_HOME/jdbc/lib (ojdbc6.jar for Java 6 and later) and the Oracle Call Interface library is $ORACLE_HOME/lib/libclntsh.so.

Step 5: Configure tnsnames.ora

Before connecting to a remote Oracle Database, add an entry for it to tnsnames.ora. Run the following as the oracle user, replacing the placeholder values with your database's details:

cat >> "$TNS_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 the following values:

  • YOUR_DB_HOSTNAME with the IP address or DNS name of your Oracle Database server
  • 1521 with the listener port, if it is different
  • YOUR_SERVICE_NAME with the service name of the target database

Then check the alias resolves and the listener answers:

tnsping MY_DATABASE

With the placeholder host still in place, the output shows Oracle Net resolving the alias and then failing to find the host:

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 02-DEC-2026 04:01:35

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/11.2.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)))
TNS-12545: Connect failed because target host or object does not exist

With your real host in the entry you can expect one of the following:

  • OK (n msec) when the host resolves and the remote listener accepts the connection. This is what you want to see.
  • TNS-12545: Connect failed because target host or object does not exist when the host does not resolve. Check the host name in the entry.
  • TNS-12541: TNS:no listener when the host resolves but nothing listens on the port. Check the listener is up and reachable from this VM.

Step 6: Connect to a Remote Database via SQL*Plus

With the environment sourced and tnsnames.ora populated, connect to your database by its alias. SQL*Plus prompts for the password, so it never appears on the command line or in your shell history:

sqlplus system@MY_DATABASE

You can also connect with an Easy Connect string, without editing tnsnames.ora:

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

Expected output, once you enter the password at the prompt:

SQL*Plus: Release 11.2.0.1.0 Production

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database ...

SQL>

Type EXIT to leave the SQL*Plus session.

Step 7: Keep the VM Updated

The image does not update itself on first boot. Apply the latest Oracle Linux updates after you deploy, and regularly after that:

sudo dnf -y update

Reboot afterwards if the update installed a new kernel.

Server Components

Component Version Install Path
Oracle Database Client (Administrator) 11.2.0.1.0 /u01/app/oracle/product/11.2.0/client_1
OpenJDK 1.8.0 /usr/lib/jvm (linked as $ORACLE_HOME/jdk)
Oracle Linux 8.10 /

Filesystem Layout

Mount Point Size Description
/ 37 GB Root filesystem (LVM logical volume)
/u01 20 GB Azure data disk holding the Oracle base, the Oracle home and the inventory
/boot 2 GB Operating system kernel files
/boot/efi 100 MB UEFI boot partition
/var/crash 10 GB Reserved for kernel crash dumps (LVM logical volume)
/mnt varies Azure temporary resource disk (not persistent across stop or deallocate)

Key Oracle directories:

Directory Purpose
/u01/app/oracle Oracle base directory
/u01/app/oracle/product/11.2.0/client_1 Oracle Client home directory
/u01/app/oracle/product/11.2.0/client_1/bin Client tools (sqlplus, sqlldr, tnsping, expdp, impdp, exp, imp, rman, tkprof, adrci, mkstore, orapki)
/u01/app/oracle/product/11.2.0/client_1/lib Oracle Call Interface libraries (libclntsh.so)
/u01/app/oracle/product/11.2.0/client_1/jdbc/lib JDBC drivers (ojdbc5.jar, ojdbc6.jar)
/u01/app/oracle/product/11.2.0/client_1/network/admin Oracle Net configuration (tnsnames.ora, sqlnet.ora)
/u01/app/oraInventory Oracle Universal Installer inventory

Managing the Oracle Client

The Oracle Client is a set of tools and libraries, not a running service: there is nothing to start or stop. Switch to the oracle user and source the environment to use the tools:

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

Check the client is ready:

sqlplus -V
which sqlplus

Scripts and Log Files

Script/Log Path Description
setEnv.sh /home/oracle Sets the Oracle environment variables for sqlplus and the other tools
oracle-client.sh /etc/profile.d System wide environment hook for every user who logs in
cloudimg-datadisk /usr/local/sbin First boot: puts /u01 on its Azure data disk
cloudimg-datadisk log journalctl -u cloudimg-datadisk What the first boot step did with the data disk

On Startup

On the VM's first boot, the cloudimg-datadisk service formats the image's data disk, copies the contents of /u01 onto it and mounts it at /u01 by UUID in /etc/fstab. On later boots it finds the disk already formatted and leaves it alone. Check what it did with:

journalctl -b -u cloudimg-datadisk --no-pager -o cat | grep lun

Expected output (the device name and UUID can differ on your VM):

cloudimg-datadisk: lun0 (/dev/sdc) -> /u01 (ext4, UUID=b27f1fdb-4776-4225-9d35-2a01d52e0317, 1.1G copied)

No package update runs at boot: apply updates yourself as Step 7 shows.

Troubleshooting

Cannot connect via SSH

  1. Verify the VM is in Running state in the Azure Portal
  2. Check that port 22 is allowed from your IP in the Network Security Group
  3. Ensure you are using the correct username: azureuser
  4. Verify your SSH key matches the one configured during deployment

sqlplus: command not found

  1. Confirm you switched to the oracle user: sudo su - oracle
  2. Source the environment script: . ~/setEnv.sh
  3. Verify the install path exists: ls /u01/app/oracle/product/11.2.0/client_1/bin/sqlplus
  4. Confirm /u01 is mounted: df -h /u01

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

  1. Check that your alias is defined in tnsnames.ora: cat $TNS_ADMIN/tnsnames.ora
  2. Confirm TNS_ADMIN points at the network/admin directory: echo $TNS_ADMIN
  3. Validate the alias resolves: tnsping MY_DATABASE
  4. Watch for typos in the alias name

ORA-12170: TNS:Connect timeout occurred

  1. Confirm the database host and port are reachable from the VM: timeout 5 bash -c '</dev/tcp/YOUR_DB_HOSTNAME/1521' && echo reachable
  2. Check the database side's Network Security Group allows inbound from your VM
  3. Verify route tables, peering, or VPN from this Azure VM to the database network

ORA-12541: TNS:no listener

  1. The remote database listener may be down. Check with the DBA managing the database
  2. Confirm the port number in your tnsnames.ora entry
  3. Run tnsping MY_DATABASE to confirm the listener responds

Security Recommendations

  • Restrict outbound access: Only allow outbound TCP 1521 from this VM to the Oracle Database servers it needs to reach
  • Protect tnsnames.ora: It names your database hosts and services. Keep its permissions tight
  • Keep passwords off the command line: Let SQL*Plus prompt for them, or store them in an Oracle Wallet (mkstore)
  • Encrypt connections: Configure Oracle Net encryption for client to database traffic
  • Limit SSH access: Allow port 22 only from trusted addresses
  • Keep the system updated: Apply Oracle Linux updates regularly (Step 7)

Support

If you encounter any issues with this product, contact cloudimg support:

For Oracle licensing questions, contact your Oracle account manager.

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