oralce 启动时 报 ORA-00119 ORA-00132 错误

来源:互联网 发布:淘宝店铺首页大图图片 编辑:程序博客网 时间:2024/06/05 20:30
ORA-00119: invalid specification for system parameter LOCAL_LISTENER

ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL' 

1.进入cmd
sqlplus  /  as  sysdba
请输入用户名:  sys as sysdba
输入口令:
已连接到空闲例程。
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL11'
SQL> create pfile from spfile='D:\oracle\app\Administrator\product\11.2.0\dbhome_1\database\SPFILEMYDB.ORA';
文件已创建。
默认生成到D:\oracle\app\Administrator\product\11.2.0\dbhome_1\database
生成文件:INIT<sid>.ORA
也可以指定路径:create pfile='c:\xxx\pfile.txt' from .....;
2.修改pfile参数文件(也即修改init<sid>.ora文件) 
用gedit打开,找到local_listener这一行,然后将其值修改为: 
(ADDRESS_LIST=(Address=(Protocol=tcp) (Host=your_hostname)(Port=1521)))
其中的your_hostname为你的主机名,
其实导致ORA-00119和ORA-00132错误的原因就很可能是你修改了你的hostname,
但是我看了一下我的tnsname.ora文件里面的那个LISTENER_ORCL(可能你不是这个名字)和后面修改的your_hostname一致,
我做的只是将tnsname.ora文件中的(ADDRESS_LIST=(Address= (Protocol=tcp) (Host=your_hostname)(Port=1521)))
复制到pfile文件的“local_listener=”后面,然后就顺利启动了 数据库,我也不知道为什么直接用*.
local_listener='LISTENER_ORCL'就找不到,而一定 要*.local_listener='(ADDRESS_LIST=(Address=(Protocol=tcp) (Host=your_hostname)(Port=1521)))'才可以
,这个问题以后研究一下。
以下是我的一个修改样例: 
修改之前可能是这样 
*.local_listener='LISTENER_ORCL' 
修改后的值大概就是这个样子了 
*.local_listener='(ADDRESS_LIST=(Address=(Protocol=tcp) (Host=your_hostname)(Port=1521)))'
然后保存退出 
3.pfile创建spfile 
使用以下命令创建spfile 
SQL> create spfile from pfile='/u01/oracle/product/10.2.0/db_1/dbs/initorcl.ora';
SPFILE<sid>.ORA文件会重新生成到D:\oracle\app\Administrator\product\11.2.0\dbhome_1\database
4.启动数据库 
SQL> startup
ORACLE 例程已经启动。
Total System Global Area  753278976 bytes
Fixed Size                  1374724 bytes
Variable Size             243271164 bytes
Database Buffers          503316480 bytes
Redo Buffers                5316608 bytes
数据库装载完毕。
数据库已经打开。

0 0
原创粉丝点击