• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ORA-12547: TNS:lost Contact (Oracle 12c2)

By admin

The Problem

While connecting the database as sysdba, we are getting below error:

sqlplus /as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Wed May 10 00:40:31 2017

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

ERROR:
ORA-12547: TNS:lost contact

The version of Oracle database used here is 12.2.0.1.0.

The Solution

The solution is quite simple here. The OS variable ORACLE_BASE was not set specifically here. Just set this variable into the bash profile of oracle user in Linux and you are good to go.

Add ORACLE_BASE variable permanently

To add the ORACLE_BASE environment varibale permanently, edit the bash_profile for oracle user and export the variable in that file.

$ vi ~/.bash_profile
export ORACLE_BASE=[your oracle base here]

You can either logout or login again for the changes to take effect or run the bash profile in the same session.

$ . ~/.bash_profile

Add ORACLE_BASE variable temporarily on command line

To add the ORACLE_BASE varibale teporarily on command line, use the below command:

$ export ORACLE_BASE=[your oracle base here]

The above settings are temporary and will go away when you log out and log in back.

Verify

To verify if you have set the environment varibale correct, use the Linux command env:

$ env | grep ORACLE_BASE

Or you can simple echo the variable on command line:

$ echo $ORACLE_BASE

Filed Under: oracle, oracle 12c

Some more articles you might also be interested in …

  1. Oracle 12c New Feature – Multi-Threaded architecture of processes
  2. How to Merge Multiple Partitions in Oracle 12c
  3. ASM Fast Mirror Resync Feature – Example To Simulate Transient Disk Failure And Restore Disk
  4. ASM background processes in 11gR2
  5. Beginners Guide to Working with spfile in Oracle ASM
  6. What are Oracle Key Vault Roles
  7. ASMLib-Managed Disks on Multipathed iSCSI Targets are not Discovered after Server Reboot in CentOS/RHEL 7
  8. CentOS / RHEL 7 : How to set udev rules for ASM on multipath disks
  9. Real-time SQL Monitoring for Developers – Oracle Database 19c New Feature
  10. How to get the Values Assigned by Default to a Profile in Oracle Database

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ICMP redirects on CentOS/RHEL
  • What are Oracle Key Vault Roles
  • What Is Oracle Key Vault
  • Auditing with Oracle Database Vault Reports
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary