非oracle用户使用sqlplus登录错误ORA-12547: TNS:lost contact

环境版本:AIX 6.1 oracle 11.2.02
正常安装完数据库,新建了ogg用户,所属组为dba和oinstall。
settledb01:/ #id ogg
uid=1003(ogg) gid=510(dba) groups=511(oinstall)
listener状态也是正常:
settledb01:/oracle >lsnrctl status listener_settle
LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production on 13-AUG-2012 10:58:02
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sett_svc1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener_settle
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
Start Date                13-AUG-2012 10:48:34
Uptime                    0 days 0 hr. 9 min. 28 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /oracle/app/oracle/product/11.02/db_1/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/product/11.02/db_1/network/log/listener_settle.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=173.16.2.36)(PORT=1521)))
Services Summary...
Service "settledb" has 2 instance(s).
  Instance "settledb", status UNKNOWN, has 1 handler(s) for this service...
  Instance "settledb", status READY, has 1 handler(s) for this service...
Service "settledbXDB" has 1 instance(s).
  Instance "settledb", status READY, has 1 handler(s) for this service...
The command completed successfully
使用oracle用户登录,一切正常:
settledb01:/oracle >sqlplus goldengate/goldengate
SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 13 10:58:48 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
settledb01:/oracle >sqlplus goldengate/goldengate@settledb
SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 13 10:58:58 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
但是使用新建的系统用户ogg登录,出现如下情况:
settledb01:/ogg/software >sqlplus goldengate/goldengate@settledb
SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 13 10:59:41 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
settledb01:/ogg/software >sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 13 10:39:28 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
SQL> conn /as sysdba
ERROR:
ORA-12547: TNS:lost contact
SQL> exit
报出了ORA-12547: TNS:lost contact错误。
 
检查$ORACLE_HOME/bin/oracle权限
settledb01:/oracle/app/oracle/product/11.02/db_1/bin >ls -al oracle
-rwxr-xr-x    1 oracle   oinstall  294663505 May 20 03:48 oracle
发现没有s权限。
解决措施:
增加$ORACLE_HOME/bin/oracle文件的s权限
settledb01:/oracle/app/oracle/product/11.02/db_1/bin >chmod +s oracle
settledb01:/oracle/app/oracle/product/11.02/db_1/bin >ls -al oracle
-rwsr-sr-x    1 oracle   oinstall  294663505 May 20 03:48 oracle
 
测试:
settledb01:/ #su - ogg
settledb01:/ogg/software >sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 13 10:46:12 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
故障解决

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15115188/viewspace-742600/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15115188/viewspace-742600/

你可能感兴趣的:(数据库)