The Oracle database in the production environment suddenly fails to log on, and the oracle database in the rlwrap production environment suddenly fails to log on. The rlwrapsqlplusassysdba reports an error, as shown in
The Oracle database in the production environment suddenly fails to log on, and the oracle database in the rlwrap production environment suddenly fails to log on. The rlwrap sqlplus/as sysdba reports an error, as shown in
Problem description:
The Oracle database in the production environment suddenly fails to log on, and the oracle database in the rlwrap production environment suddenly fails to log on. rlwrap sqlplus "/as sysdba" reports the following error: rlwrap
[Oracle @ localhost root] $ rlwrap sqlplus "/as sysdba"
Rlwrap: warning: your $ TERM is 'xtermin' but rlwrap couldn't find it in the terminfo database. Specific CT some problems.
Rlwrap: Cannot execute sqlplus: Permission denied
[Oracle @ localhost root] $ sqlplus "/as sysdba"
Bash: sqlplus: command not found
[Oracle @ localhost root] $
1. oracle logon Error
[Oracle @ localhost root] $ rlwrap sqlplus "/as sysdba"
Error 6 initializing SQL * Plus
SP2-0667: Message file sp1 . Msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[Oracle @ localhost root] $
[Oracle @ localhost root] $
2. Check the ORACLE_HOME variable, which is null.
[Oracle @ localhost root] $ echo $ ORACLE_HOME
[Oracle @ localhost root] $
3. Set the ORACLE_HOME variable in/etc/profile.
[Root @ localhost ~] # Vim/etc/profile
Export ORACLE_HOME =/opt/oracle/app/oracle/product/11.2.0/dbhome_1
[Root @ localhost ~] # Source/etc/profile
[Root @ localhost ~] # Su oracle
[Oracle @ localhost root] $
[Oracle @ localhost root] $ echo $ ORACLE_HOME
/Oracle/app/oracle/product/11.2.0/dbhome_1/
[Oracle @ localhost root] $
4. the ORACLE_HOME environment variable has a value. Log On With sqlplus and try again.
[Oracle @ localhost root] $ rlwrap sqlplus "/as sysdba"
Rlwrap: warning: your $ TERM is 'xtermin' but rlwrap couldn't find it in the terminfo database. Specific CT some problems.
Rlwrap: Cannot execute sqlplus: Permission denied
[Oracle @ localhost root] $
5. Perform a soft connection to sqlplus.
[Oracle @ localhost root] $ exit
Exit
[Root @ localhost ~] # Ln-s $ ORACLE_HOME/bin/sqlplus/usr/bin
[Root @ localhost ~] # Su oracle
[Oracle @ localhost root] $ sqlplus "/as sysdba"
SQL * Plus: Release 11.2.0.1.0 Production on Fri Jan 16 10:19:39 2015
Copyright (c) 1982,200 9, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS: net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS: net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS: net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL * Plus
[Oracle @ localhost root] $
[Oracle @ localhost root] $ echo $ ORACLE_SID
[Oracle @ localhost root] $
There is no ORACLE_SID in the system environment variable.
6. Set ORACLE_SID
[Oracle @ localhost root] $ exit
Exit
[Root @ localhost ~] # Vim/etc/profile
Export ORACLE_HOME =/oracle/app/oracle/product/11.2.0/dbhome_1/
Export ORACLE_SID = pxxerxxs
[Root @ localhost ~] # Source/etc/profile
[Oracle @ localhost root] $ exit
Exit
[Root @ localhost ~] # Vim/etc/profile
[Root @ localhost ~] # Source/etc/profile
[Root @ localhost ~] # Su oracle
[Oracle @ localhost root] $ rlwrap sqlplus "/as sysdba"
Rlwrap: warning: your $ TERM is 'xtermin' but rlwrap couldn't find it in the terminfo database. Specific CT some problems.
SQL * Plus: Release 11.2.0.1.0 Production on Fri Jan 16 10:25:33 2015
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL>
SQL>
7. Go to oracle user to view system variables
[Oracle @ localhost root] $ cat ~ /. Bash_profile
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
PATH = $ PATH: $ HOME/bin
Export PATH