安装完成后,您需要进行必要的检查,以验证数据库是否安装成功。
- 检查Oracle监听状态
- 介绍如何检查监听状态。本任务需要在各服务器节点中分别执行。
- 检查Oracle实例状态
- 介绍如何检查Oracle实例状态。本任务需要在各服务器节点中分别执行。
- 检查CRS集群状态
- 介绍如何检查CRS集群状态。本任务需要在各服务器节点中分别执行。
-
检查Oracle监听状态
介绍如何检查监听状态。本任务需要在各服务器节点中分别执行。
操作步骤
- 以oracle用户分别登录各服务器节点。
- 查看监听状态。
lsnrctl status LISTENER_ORA
- 在节点1中显示类似如下信息时表示监听正常。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-APR-2020 21:13:50 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_ORA))) STATUS of the LISTENER ------------------------ Alias LISTENER_ORA Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 29-APR-2020 20:55:31 Uptime 0 days 0 hr. 18 min. 21 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/cbgshdb1/listener_ora/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_ORA))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.215)(PORT=1526))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.217)(PORT=1526))) Services Summary... Service "shwebcc" has 1 instance(s). Instance "shwebcc1", status READY, has 1 handler(s) for this service... Service "shwebccXDB" has 1 instance(s). Instance "shwebcc1", status READY, has 1 handler(s) for this service... The command completed successfully oracle@cbgshdb1:/u01/app/oracle/product/dbs>
- 在节点linux50中显示类似如下信息时表示监听正常。
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-APR-2020 21:15:17 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_ORA))) STATUS of the LISTENER ------------------------ Alias LISTENER_ORA Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 29-APR-2020 20:55:48 Uptime 0 days 0 hr. 19 min. 29 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/cbgshdb2/listener_ora/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_ORA))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.216)(PORT=1526))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.218)(PORT=1526))) Services Summary... Service "shwebcc" has 1 instance(s). Instance "shwebcc2", status READY, has 1 handler(s) for this service... Service "shwebccXDB" has 1 instance(s). Instance "shwebcc2", status READY, has 1 handler(s) for this service... The command completed successfully oracle@cbgshdb2:~>
检查Oracle实例状态
介绍如何检查Oracle实例状态。本任务需要在各服务器节点中分别执行。
操作步骤
- 以oracle用户分别登录各服务器节点。
- 登录数据库。
sqlplus / as sysdba
2个节点中都显示类似如下信息时,说明连接成功。
- 查看实例状态。
select INSTANCE_NAME, STATUS from v$instance;
oracle@cbgshdb1:~> sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Apr 29 21:16:04 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select INSTANCE_NAME, STATUS from v$instance; INSTANCE_NAME STATUS ---------------- ------------ shwebcc1 OPEN
oracle@cbgshdb2:~> sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Apr 29 21:16:12 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select INSTANCE_NAME, STATUS from v$instance; INSTANCE_NAME STATUS ---------------- ------------ shwebcc2 OPEN SQL>
检查CRS集群状态
介绍如何检查CRS集群状态。本任务需要在各服务器节点中分别执行。
操作步骤
1.以grid用户分别登录各服务器节点。
2.执行olsnodes命令查看集群关系是否建立成功。
2个节点中都显示类似如下信息,说明创建成功。cbgshdb1 cbgshdb2
- 执行crsctl stat res -t命令查看集群状态。
- 2个节点中都显示类似如下信息,说明集群状态正常。
-------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DGDATA.dg ONLINE ONLINE cbgshdb1 ONLINE ONLINE cbgshdb2 ora.LISTENER.lsnr ONLINE ONLINE cbgshdb1 ONLINE ONLINE cbgshdb2 ora.LISTENER_ORA.lsnr ONLINE ONLINE cbgshdb1 ONLINE ONLINE cbgshdb2 ora.OCRVOT.dg ONLINE ONLINE cbgshdb1 ONLINE ONLINE cbgshdb2 ora.asm ONLINE ONLINE cbgshdb1 Started ONLINE ONLINE cbgshdb2 Started ora.gsd OFFLINE OFFLINE cbgshdb1 OFFLINE OFFLINE cbgshdb2 ora.net1.network ONLINE ONLINE cbgshdb1 ONLINE ONLINE cbgshdb2 ora.ons ONLINE ONLINE cbgshdb1 ONLINE ONLINE cbgshdb2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE cbgshdb1 ora.cbgshdb1.vip 1 ONLINE ONLINE cbgshdb1 ora.cbgshdb2.vip 1 ONLINE ONLINE cbgshdb2 ora.cvu 1 ONLINE ONLINE cbgshdb1 ora.oc4j 1 ONLINE ONLINE cbgshdb1 ora.scan1.vip 1 ONLINE ONLINE cbgshdb1 ora.shwebcc.db 1 ONLINE ONLINE cbgshdb1 Open 2 ONLINE ONLINE cbgshdb2 Open