Oracle Database Client 12.2 on Oracle Linux 8
Overview
This guide shows you how to deploy and configure Oracle Database Client 12c R2 (version 12.2.0.1.0) on Oracle Linux 8 on Microsoft Azure. It uses SecureAnyCloud's preconfigured virtual machine image from the Azure Marketplace.
Oracle Database Client 12c R2 provides the tools and libraries that you need to connect to and manage legacy Oracle 12.2 and earlier database instances. It includes SQL*Plus, sqlldr, tnsping, expdp, impdp, the full Oracle Net client utility set, and OCI and JDBC drivers. You do not need a database server on the same VM.
What you get:
- Oracle Database Client 12c R2 12.2.0.1.0 (Administrator install), installed at /u01.
- A dedicated oracle OS user with an environment script (setEnv.sh).
- SQL*Plus, sqlldr, tnsping, expdp, impdp, exp, imp, tkprof, rman, adrci and the full Oracle Net client utility set.
- Pre-seeded 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.
- A libnsl shim and an OEL8 compatibility layer, so that the 12c R2 binaries link cleanly on Oracle Linux 8.
- The bundled Oracle JDK replaced with the system OpenJDK, so security patches arrive through dnf.
- An OS package update script that keeps the system current.
- The Azure Linux Agent (waagent) for Azure integration.
- Cloud-init for automated provisioning.
- The latest security patches, applied at build time.
- 24/7 SecureAnyCloud support with a guaranteed 24-hour response SLA.
Platform: Microsoft Azure (Gen2 Hyper-V)
Default user: azureuser
Oracle Home: /u01/app/oracle/product/12.2.0/client_1
TNS Admin: /u01/app/oracle/product/12.2.0/client_1/network/admin
Compatibility Note
Oracle originally certified Oracle Database Client 12c R2 on Oracle Linux 5, 6 and 7. SecureAnyCloud packages 12c R2 on Oracle Linux 8 by installing the equivalent compatibility libraries (libnsl, libxcrypt-compat and libstdc++ 32-bit) and relinking the client binaries against the OL 8 system libraries.
The result is functionally equivalent to a certified install for the customer-facing tooling (SQL*Plus, Oracle Net, sqlldr, expdp and impdp). For Oracle support questions about this combination, contact your Oracle account manager. SecureAnyCloud provides 24/7 support for the platform integration.
Prerequisites
Before you deploy this image, make sure that 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 (or SID) of the Oracle Database that 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.
Deploy the Virtual Machine
Option A: Azure Portal
- Go to the Azure Marketplace and search for "Oracle Database Client 12.2 Oracle Linux 8 SecureAnyCloud".
- Select the image and choose Create.
- Configure the basics:
- Subscription: select your Azure subscription.
- Resource Group: create a new one or select an existing one.
- Virtual Machine Name: enter a name for your VM.
- Region: select your preferred Azure region.
- Size:
Standard_B2sis recommended. - Under Administrator Account, select SSH public key and enter your key.
- Under Inbound Port Rules, allow SSH (port 22) from your trusted IP only.
- Choose Review + Create, then Create.
Option B: Azure CLI
Accept the Marketplace terms once per subscription, then create the VM:
az vm image terms accept --urn sac1647283583153:oracle-db-12-2-client-oel8:default:latest
az vm create \
--resource-group myResourceGroup \
--name my-oracle-client-12-2-vm \
--image sac1647283583153:oracle-db-12-2-client-oel8:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku StandardImportant: The Oracle Client makes outbound connections to remote databases on port 1521. You do not need to open port 1521 inbound on this VM. Review your Network Security Group and route table to confirm that the VM can reach your target Oracle Database server on the listener port.
Connect with SSH
When your VM is running, connect with 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-12-2-vm --show-details --query publicIps -o tsvTo 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.
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 the command rather than copying and pasting it.
sudo su - oracle cd $HOME . ./setEnv.sh sqlplus -VThe setEnv.sh script sets the Oracle environment variables that utilities such as sqlplus require:
ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/12.2.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.AL32UTF8The 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 at login.
Explore the client tooling
sqlplus -H prints a usage summary of every command-line option that the SQL*Plus binary accepts. Use it to confirm that the client works and to look up an option without leaving the shell:
sqlplus -H | head -28Browse the install tree to see the full set of binaries in the Administrator install set:
ls $ORACLE_HOME/
ls $ORACLE_HOME/bin/ | grep -E "sqlplus|sqlldr|tnsping|exp|imp|rman"Configure tnsnames.ora
Before you connect to a remote Oracle Database, add an entry for it to tnsnames.ora. Run the following commands as the oracle user, and replace 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) ) ) TNSReplace the following values:
- YOUR_DB_HOSTNAME: the IP address or DNS name of your Oracle Database server.
- 1521: the port number, if it differs from the default.
- YOUR_SERVICE_NAME: the service name of the target database.
Verify that Oracle Net loads correctly and that your environment is set:
env | grep -E "^(ORACLE_|TNS_|LD_LIBRARY)" tnsping invalid_aliasThe TNS Ping Utility for Linux: Version 12.2.0.1.0 banner confirms that the Oracle Net layer loads. The TNS-03505: Failed to resolve name error for the invalid alias is expected. To test against your real database, use the alias that you just added to tnsnames.ora:
tnsping MY_DATABASEYou can expect one of the following results:
OK (n msec)appears ifYOUR_DB_HOSTNAMEresolves and the remote listener accepts the connection. This is the result that you want.TNS-12545: Connect failed because target host or object does not existappears ifYOUR_DB_HOSTNAMEcannot be resolved. The TNS layer is loading correctly. Replace the sample host with your real host name.TNS-12541: TNS:no listenerappears if the hostname resolves but nothing is listening on port 1521. Check that the target listener is up and reachable from this VM.
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 that you just created:
cd $HOME . ./setEnv.sh sqlplus system/your_password@MY_DATABASEYou can also use the EZCONNECT syntax, which does not require any change to tnsnames.ora:
sqlplus 'system/your_password@//your-db-host:1521/your-service-name'A successful connection prints output like the following:
SQL*Plus: Release 12.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.
Server Components
- Oracle Database Client 12c R2 (Administrator): version 12.2.0.1.0, installed at /u01/app/oracle/product/12.2.0/client_1.
- Oracle Linux 8: installed at /.
Note: Component versions may be updated on first boot by the automatic OS package update script.
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 independently.
Mount points:
- / (37 GB): root filesystem (LVM logical volume). It 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 (size varies): Azure temporary resource disk. It is not persistent across stop or deallocate.
Key Oracle directories:
- /u01/app/oracle: Oracle base directory.
- /u01/app/oracle/product/12.2.0/client_1: Oracle Client home directory.
- /u01/app/oracle/product/12.2.0/client_1/bin: client binaries (sqlplus, sqlldr, tnsping, expdp, impdp, exp, imp, tkprof, rman, adrci).
- /u01/app/oracle/product/12.2.0/client_1/lib: Oracle Net libraries (libclntsh.so).
- /u01/app/oracle/product/12.2.0/client_1/network/admin: TNS configuration files (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 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.shVerify the client is ready:
sqlplus -V which sqlplusScripts and Log Files
- 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 the 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 bring the image up to date. 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.shTroubleshooting
Cannot connect with SSH
- Verify that the VM is in the Running state in the Azure Portal.
- Check that port 22 is allowed in the Network Security Group.
- Make sure that you use the correct username:
azureuser. - Verify that your SSH key matches the one that you configured during deployment.
sqlplus: command not found
- Confirm that you switched to the oracle user:
sudo su - oracle. - Source the environment script:
. ~/setEnv.sh. - Verify that the install path exists:
ls /u01/app/oracle/product/12.2.0/client_1/bin/sqlplus. - Confirm that
$ORACLE_HOME/binis 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. - Confirm that
TNS_ADMINpoints at the network/admin directory:echo $TNS_ADMIN. - Validate that the alias resolves:
tnsping MY_DATABASE. - Check the alias name for typos and case sensitivity.
ORA-12170: TNS:Connect timeout occurred
- Confirm that the target database hostname and port are reachable from the VM:
nc -vz YOUR_DB_HOSTNAME 1521. - Check that the Network Security Group on the target database side allows inbound traffic from your VM.
- Verify the route tables, peering or VPN from this Azure VM to the target database network.
- If the target is on-premises, confirm Azure ExpressRoute or site-to-site VPN connectivity.
ORA-12541: TNS:no listener
- The remote database listener might be down. Check with the DBA who manages the target database.
- Confirm that you use the correct port number in your tnsnames.ora entry.
- Run
tnsping MY_DATABASEto confirm that the listener responds at the protocol layer.
Security Recommendations
- Restrict outbound access: allow outbound TCP 1521 only from this VM to the specific Oracle Database servers that 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.
- Use wallets for credentials: configure Oracle Wallet so that 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 only.
- 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 a 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 12c R2 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