标题: ORA-01034错误:oracle not available [打印本页] 作者: jiawang 时间: 2019-5-6 16:31 标题: ORA-01034错误:oracle not available 本帖最后由 jiawang 于 2019-5-6 16:33 编辑
报错现象:
[oracle@rac02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Mon May 6 15:45:05 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected.
SQL> select name from v$datafile ;
select name from v$datafile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
报这个错误,一般是监听没启动
[grid@rac02 ~]$ lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAY-2019 15:46:47
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
[grid@rac02 ~]$ lsnrctl start
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAY-2019 15:47:51
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting /u01/app/18.3.0/grid/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /u01/app/18.3.0/grid/network/admin/listener.ora
Log messages written to /u01/app/grid/diag/tnslsnr/rac02/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 06-MAY-2019 15:47:51
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/18.3.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
The listener supports no services
The command completed successfully
[grid@rac02 ~]$ lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAY-2019 15:51:41
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 06-MAY-2019 15:49:20
Uptime 0 days 0 hr. 1 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/18.3.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.161)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.163)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=rac02)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/18.3.0/db_1/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "+APX" has 1 instance(s).
Instance "+APX2", status READY, has 1 handler(s) for this service...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "64a52f53a7683286e053cda9e80aed76" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "7c53bd34f539535ae053a000a8c0139a" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
重新连接数据库成功
[oracle@rac02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Mon May 6 15:52:06 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0