[oracle@localhost dbs]$ ls -l
total 28
-rw-rw----. 1 oracle oinstall 1544 Mar 8 09:05 hc_orcl.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r--. 1 oracle oinstall 1202 Mar 7 15:35 initorcl.ora
-rw-r-----. 1 oracle oinstall 24 Dec 30 12:51 lkORCL
-rw-r-----. 1 oracle oinstall 1536 Dec 30 13:58 orapworcl
-rw-r-----. 1 oracle oinstall 3584 Mar 7 18:03 spfileorcl_back.ora
-rw-r--r--. 1 root root 2560 Mar 7 18:06 spfileorcl.ora
[oracle@localhost dbs]$ su
Password:
[root@localhost dbs]# chmod 777 spfileorcl.ora
[root@localhost dbs]# ls -l
total 28
-rw-rw----. 1 oracle oinstall 1544 Mar 8 09:05 hc_orcl.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r--. 1 oracle oinstall 1202 Mar 7 15:35 initorcl.ora
-rw-r-----. 1 oracle oinstall 24 Dec 30 12:51 lkORCL
-rw-r-----. 1 oracle oinstall 1536 Dec 30 13:58 orapworcl
-rw-r-----. 1 oracle oinstall 3584 Mar 7 18:03 spfileorcl_back.ora
-rwxrwxrwx. 1 root root 2560 Mar 7 18:06 spfileorcl.ora
[root@localhost dbs]# exit
exit
[oracle@localhost dbs]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 8 09:49:38 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> alter system set local_listener = '(ADDRESS = (PROTOCOL=TCP)(HOST=192.168.0.188)(PORT=1521)(SID=orcl))' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 6680915968 bytes
Fixed Size 2213936 bytes
Variable Size 3892316112 bytes
Database Buffers 2751463424 bytes
Redo Buffers 34922496 bytes
Database mounted.
Database opened.
SQL> connect hwdosconplid/pokiujuwdxawsz@orcl
Connected.
SQL> OK
SP2-0042: unknown command "OK" - rest of line ignored.
SQL>
如果local_listener缺失,将导致自动实例注册失败,数据库实例不会识别Listener;当Listener连接数据库实例的时候,由于Listener没有注册,导致了这两个错误