ORA-00119,ORA-00130 错误处理
环境说明:操作系统版本:redhat 6.5
数据库版本:oracle 12.1.0.2
原主机名 ora12c 现主机名 dg1
原IP地址:192.168.1.7 现IP地址:192.168.1.135
自己将主机名和IP地址修改后,启动数据库报如下错误
SQL> startup nomount;
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=ora12c)(PORT=1521))'
错误原因:
1、查看错误号对应的具体描述:
[oracle@dg1 ~]$ oerr ora 119 00119, 00000, "invalid specification for system parameter %s" // *Cause: The syntax for the specified parameter is incorrect. // *Action: Refer to the Oracle Reference Manual for the correct syntax.
[oracle@dg1 dbs]$ oerr ora 00130 00130, 00000, "invalid listener address '%s'" // *Cause: The listener address specification is not valid. // *Action: Make sure that all fields in the listener address // (protocol, port, host, key, ...) are correct.
根据错误信息的个体描述应该知道问题出在了系统参数配置和侦听地址有误。
2、因为主机名变了,侦听的配置文件必须修改
LISTENER.ORA文件内容:
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c)(PORT = 1521)) --需要将原主机名更换成新的主机名:dg1 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) )
tnsnames.ora文件内容
LISTENER_SCP = (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c)(PORT = 1521)) --需要将原主机名更换成新的主机名:dg1 SCP = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c)(PORT = 1521)) --需要将原主机名更换成新的主机名:dg1 (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = scp) ) )
经过以上调整后,再次启动数据库:
SQL> startup nomount; ORACLE instance started. Total System Global Area 1010827264 bytes Fixed Size 2931904 bytes Variable Size 662700864 bytes Database Buffers 339738624 bytes Redo Buffers 5455872 bytes SQL> alter database mount; Database altered. SQL> alter database open; Database altered.