Oracle資料庫啟動之最噁心的報錯檢查--ORA-00119、ORA-00130
今天一同事告知,新clone的資料庫無法正常啟動,登陸啟動之後報錯如下:
[oracle@PlanDB01Dev ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 15:17:38 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> alter system reset local_listener;
alter system reset local_listener
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> exit
Disconnected
首先想到可能是引數檔案設定問題,或者監聽器:
檢視引數檔案:
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=8589934592
*.diagnostic_dest='/u01/app/oracle'
*.log_archive_dest_1='LOCATION=/home/oracle/archivelog'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=1681915904
*.processes=1000
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=5047844864
*.undo_tablespace='UNDOTBS1'
可以看到一切正常。
再次嘗試用引數檔案啟動:
oracle@PlanDB01Dev dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 14:57:45 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> startup pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora' nomount;
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> exit
Disconnected
錯誤依舊存在。
檢查監聽器:
[oracle@PlanDB01Dev dbs]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-MAY-2015 14:56:24
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01UAT)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oracle@PlanDB01Dev dbs]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-MAY-2015 15:09:20
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/PlanDB01Dev/listener/alert/log.xml
TNS-12533: TNS:illegal ADDRESS parameters
TNS-12560: TNS:protocol adapter error
TNS-00503: Illegal ADDRESS parameters
上述結論中提示地址問題,檢視監聽檔案:
[oracle@PlanDB01Dev admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)主機資訊不存在(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
發現這裡缺少了主機資訊,懷疑與主機名和主機ip有關:檢查主機地址配置相關的檔案:
[root@PlanDB01Dev etc]# hostname
PlanDB01Dev
[root@PlanDB01Dev etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 PlanDB01UAT localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.72.1.188 PlanDB01UAT
[root@PlanDB01Dev etc]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=PlanDB01Dev
GATEWAY=10.71.1.1
終於找到問題原因了,127.0.0.1 PlanDB01UAT localhost.localdomain localhost 中的主機名設定與實際主機名不符,實際主機名為:
HOSTNAME=PlanDB01Dev ,修改好後再次啟動資料庫:
[root@PlanDB01Dev etc]# vi /etc/hosts
[root@PlanDB01Dev etc]# su - oracle
[oracle@PlanDB01Dev ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 15:21:21 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 5027385344 bytes
Fixed Size 2237008 bytes
Variable Size 2701135280 bytes
Database Buffers 2315255808 bytes
Redo Buffers 8757248 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
資料庫正常啟動,啟動後需要重建監聽器,或者進行修改。否則service無法註冊監聽,至此問題全部解決。
[oracle@PlanDB01Dev ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 15:17:38 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> alter system reset local_listener;
alter system reset local_listener
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> exit
Disconnected
首先想到可能是引數檔案設定問題,或者監聽器:
檢視引數檔案:
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=8589934592
*.diagnostic_dest='/u01/app/oracle'
*.log_archive_dest_1='LOCATION=/home/oracle/archivelog'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=1681915904
*.processes=1000
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=5047844864
*.undo_tablespace='UNDOTBS1'
可以看到一切正常。
再次嘗試用引數檔案啟動:
oracle@PlanDB01Dev dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 14:57:45 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> startup pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora' nomount;
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01Dev)(PORT=1521))'
SQL> exit
Disconnected
錯誤依舊存在。
檢查監聽器:
[oracle@PlanDB01Dev dbs]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-MAY-2015 14:56:24
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=PlanDB01UAT)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oracle@PlanDB01Dev dbs]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-MAY-2015 15:09:20
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/PlanDB01Dev/listener/alert/log.xml
TNS-12533: TNS:illegal ADDRESS parameters
TNS-12560: TNS:protocol adapter error
TNS-00503: Illegal ADDRESS parameters
上述結論中提示地址問題,檢視監聽檔案:
[oracle@PlanDB01Dev admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)主機資訊不存在(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[root@PlanDB01Dev etc]# hostname
PlanDB01Dev
[root@PlanDB01Dev etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 PlanDB01UAT localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.72.1.188 PlanDB01UAT
[root@PlanDB01Dev etc]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=PlanDB01Dev
GATEWAY=10.71.1.1
終於找到問題原因了,127.0.0.1 PlanDB01UAT localhost.localdomain localhost 中的主機名設定與實際主機名不符,實際主機名為:
HOSTNAME=PlanDB01Dev ,修改好後再次啟動資料庫:
[root@PlanDB01Dev etc]# vi /etc/hosts
[root@PlanDB01Dev etc]# su - oracle
[oracle@PlanDB01Dev ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 15 15:21:21 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 5027385344 bytes
Fixed Size 2237008 bytes
Variable Size 2701135280 bytes
Database Buffers 2315255808 bytes
Redo Buffers 8757248 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
資料庫正常啟動,啟動後需要重建監聽器,或者進行修改。否則service無法註冊監聽,至此問題全部解決。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28612416/viewspace-1656346/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Windows系統的資料庫不能啟動ORA-00119 ORA-00130Windows資料庫
- Oracle啟動出現了ORA-00119,ORA-00130Oracle
- oracle資料庫健康檢查報告模板Oracle資料庫
- Oracle資料庫啟動過程驗證檢查點SCNOracle資料庫
- oracle rman backup命令檢查資料庫錯誤Oracle資料庫
- ORACLE 18C啟動資料庫報錯ORA-04031Oracle資料庫
- 惡意程式造成資料庫啟動報錯資料庫
- 啟動oracle資料庫的時候報ORA-00205錯誤:Oracle資料庫
- oracle資料庫巡檢(二)全面檢查Oracle資料庫
- openguass 3.1.0 資料庫啟動,關閉,狀態檢查資料庫
- MySQL 5.7啟動資料庫報錯'does not exist or is not executable'MySql資料庫
- 刪除EM,強制結束EM程式後,啟動資料庫ORA-00119,ORA-00132報錯。資料庫
- 漫談Oracle資料庫健康檢查Oracle資料庫
- Oracle資料庫健康檢查常用SQLOracle資料庫SQL
- 資料庫啟動在mount狀態,無任何報錯資料庫
- 檢查資料庫是否啟用了跟蹤資料庫
- 資料庫資料恢復-oracle資料庫報錯無法開啟的如何恢復資料?資料庫資料恢復Oracle
- Oracle資料庫(RAC)巡檢報告Oracle資料庫
- 檢查主庫dataguard有無報錯資訊的檢視
- 資料庫資料恢復—MongoDB資料庫檔案丟失,啟動報錯的資料恢復案例資料庫資料恢復MongoDB
- oracle 資料庫效能健康檢查指令碼Oracle資料庫指令碼
- asm磁碟組依賴導致資料庫自啟動報錯ASM資料庫
- AIX系統中,啟動資料庫報錯ORA-27504AI資料庫
- oracle檢查資料庫是否有壞塊的命令Oracle資料庫
- Oracle資料庫啟動步驟Oracle資料庫
- Oracle資料庫啟動過程Oracle資料庫
- Oracle資料庫(單機)巡檢報告Oracle資料庫
- Oracle資料庫的啟動與關閉Oracle資料庫
- Oracle資料庫的啟動和關閉Oracle資料庫
- Oracle資料庫的四種啟動方式Oracle資料庫
- 資料庫配置檢查資料庫
- (轉)oracle 資料庫效能健康檢查指令碼Oracle資料庫指令碼
- 啟動資料庫,啟動監聽,檢視是否歸檔資料庫
- 4 配置Oracle資料庫自動啟動Oracle資料庫
- oracle資料庫開機自動啟動Oracle資料庫
- AIX下自動啟動/停止Oracle資料庫AIOracle資料庫
- 檢查點和oracle資料庫的恢復(一)SCNOracle資料庫
- ORACLE資料庫的啟動和關閉(轉)Oracle資料庫