问题描述: 生产环境的oracle数据库突然登录不上去了,rlwrap生产环境的oracle数据库突然登录不上去了,rlwrap sqlplus "/ as sysdba"报错如下:rlwrap [oracle@localhost root]$ rlwrap sqlplus "/ as sysdba" rlwrap: warning: your $TERM is ‘xterm‘ but rlwrap couldn‘t find it in the terminfo database. Expect some problems. rlwrap: Cannot execute sqlplus: Permission denied [oracle@localhost root]$ sqlplus "/ as sysdba" bash: sqlplus: command not found [oracle@localhost root]$
1,oracle登录报错 [oracle@localhost root]$ rlwrap sqlplus "/ as sysdba" Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory [oracle@localhost root]$ [oracle@localhost root]$
4,ORACLE_HOME环境变量有值了,再去用sqlplus登录一下,试试看 [oracle@localhost root]$ rlwrap sqlplus "/ as sysdba" rlwrap: warning: your $TERM is ‘xterm‘ but rlwrap couldn‘t find it in the terminfo database. Expect some problems. rlwrap: Cannot execute sqlplus: Permission denied [oracle@localhost root]$
[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 ‘xterm‘ but rlwrap couldn‘t find it in the terminfo database. Expect some problems. SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 16 10:25:33 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
9,验证下su - oracle [oracle@localhost ~]$ rlwrap sqlplus "/ as sysdba" rlwrap: warning: your $TERM is ‘xterm‘ but rlwrap couldn‘t find it in the terminfo database. Expect some problems. SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 16 10:36:51 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining, Oracle Database Vault and Real Application Testing options
SQL>
10,OK,尝试使用非sys账号登录报错 [oracle@localhost ~]$ rlwrap sqlplus "plas_prd/plrd_1628@pxxerxxs as sysdba" rlwrap: warning: your $TERM is ‘xterm‘ but rlwrap couldn‘t find it in the terminfo database. Expect some problems.
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 16 16:53:11 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR: ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name: ERROR: ORA-01017: invalid username/password; logon denied
然后用非sys用户登录 [oracle@localhost ~]$ rlwrap sqlplus "pxxerxxsk/pa141215@MPMD2" rlwrap: warning: your $TERM is ‘xterm‘ but rlwrap couldn‘t find it in the terminfo database. Expect some problems.
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 16 20:30:30 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining, Oracle Database Vault and Real Application Testing options