• 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. How to Delete ASM Disk on Multipath Device in CentOS/RHEL
  2. Beginners guide to oracle synonyms
  3. How to split BCV and open oracle ASM database
  4. Which SPFILE Parameter File is Impacted when Issuing an ALTER SYSTEM Command
  5. Oracle RMAN: Monitoring Recovery Manager Jobs
  6. How to Migrate ASM Disk Groups to another Storage Online [non ASMLIB Devices]
  7. Cron Script does not Execute as Expected from crontab – Troubleshoot
  8. CentOS / RHEL 7 : How to set udev rules for ASM on multipath disks
  9. IPv4 Subnet Basics and Oracle Clusterware
  10. How to set custom device names using udev in CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary