检查数据库基本信息,确认数据库可对外正常提供服务;
查看oracle相关后台进程是否启动:
centos@SYS> !ps -elf|grep ora 0 S oracle 2211 1 0 80 0 - 54290 poll_s Mar23 ? 00:00:10 /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit 0 S oracle 15428 1 0 80 0 - 54229 poll_s Mar24 ? 00:00:09 /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit 4 S root 37499 37459 0 80 0 - 52975 wait 00:36 pts/0 00:00:00 su - oracle 4 S oracle 37500 37499 0 80 0 - 29043 wait 00:36 pts/0 00:00:00 -bash 4 S root 41350 41255 0 80 0 - 52975 wait 04:12 pts/2 00:00:00 su - oracle 4 S oracle 41351 41350 0 80 0 - 29043 wait 04:12 pts/2 00:00:00 -bash 4 S root 41681 1 0 80 0 - 52975 wait 04:24 ? 00:00:00 su - oracle 4 S oracle 41682 41681 0 80 0 - 29043 wait 04:24 ? 00:00:00 -bash 4 S root 42450 42415 0 80 0 - 52975 wait 05:00 pts/4 00:00:00 su - oracle 4 S oracle 42451 42450 0 80 0 - 29043 n_tty_ 05:00 pts/4 00:00:00 -bash 0 S oracle 42647 41682 0 80 0 - 26984 inotif 05:12 ? 00:00:00 tail -50f alert_centos.log 0 S oracle 48110 37500 0 80 0 - 18777 wait 11:03 pts/0 00:00:00 sqlplus as sysdba 0 S oracle 48116 1 0 80 0 - 266384 poll_s 11:03 ? 00:00:00 ora_pmon_centos 0 S oracle 48118 1 0 80 0 - 265809 SYSC_s 11:03 ? 00:00:01 ora_psp0_centos 0 S oracle 48120 1 1 58 - - 265809 hrtime 11:03 ? 00:01:34 ora_vktm_centos 0 S oracle 48124 1 0 80 0 - 265809 SYSC_s 11:03 ? 00:00:00 ora_gen0_centos 0 S oracle 48126 1 0 80 0 - 265809 SYSC_s 11:03 ? 00:00:00 ora_diag_centos 0 S oracle 48128 1 0 80 0 - 265937 SYSC_s 11:03 ? 00:00:00 ora_dbrm_centos 0 S oracle 48130 1 0 80 0 - 265937 SYSC_s 11:03 ? 00:00:03 ora_dia0_centos 0 S oracle 48132 1 0 80 0 - 265809 SYSC_s 11:03 ? 00:00:00 ora_mman_centos 0 S oracle 48134 1 0 80 0 - 267504 SYSC_s 11:03 ? 00:00:00 ora_dbw0_centos 0 S oracle 48136 1 0 80 0 - 269697 SYSC_s 11:03 ? 00:00:00 ora_lgwr_centos 0 S oracle 48138 1 0 80 0 - 265937 SYSC_s 11:03 ? 00:00:02 ora_ckpt_centos 0 S oracle 48140 1 0 80 0 - 267477 SYSC_s 11:03 ? 00:00:00 ora_smon_centos 0 S oracle 48142 1 0 80 0 - 265937 SYSC_s 11:03 ? 00:00:00 ora_reco_centos 0 S oracle 48144 1 0 80 0 - 267296 SYSC_s 11:03 ? 00:00:01 ora_mmon_centos 0 S oracle 48146 1 0 80 0 - 266118 SYSC_s 11:03 ? 00:00:02 ora_mmnl_centos 0 S oracle 48148 1 0 80 0 - 271157 poll_s 11:03 ? 00:00:00 ora_d000_centos 0 S oracle 48150 1 0 80 0 - 266108 poll_s 11:03 ? 00:00:00 ora_s000_centos 0 S oracle 48156 48110 0 80 0 - 267335 pipe_w 11:03 ? 00:00:00 oraclecentos (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 0 S oracle 48158 1 0 80 0 - 271745 SYSC_s 11:03 ? 00:00:00 ora_arc0_centos 0 S oracle 48160 1 0 80 0 - 271745 SYSC_s 11:03 ? 00:00:00 ora_arc1_centos 0 S oracle 48162 1 0 80 0 - 271745 SYSC_s 11:03 ? 00:00:00 ora_arc2_centos 0 S oracle 48164 1 0 80 0 - 271745 SYSC_s 11:03 ? 00:00:00 ora_arc3_centos 0 S oracle 48166 1 0 80 0 - 265809 SYSC_s 11:03 ? 00:00:00 ora_qmnc_centos 0 S oracle 48182 1 0 80 0 - 266979 SYSC_s 11:03 ? 00:00:01 ora_cjq0_centos 0 S oracle 48184 1 0 80 0 - 265809 hrtime 11:03 ? 00:00:09 ora_vkrm_centos 0 S oracle 48190 1 0 80 0 - 266202 SYSC_s 11:04 ? 00:00:00 ora_q000_centos 0 S oracle 48192 1 0 80 0 - 266192 SYSC_s 11:04 ? 00:00:00 ora_q001_centos 0 S oracle 48359 1 0 80 0 - 265809 SYSC_s 11:13 ? 00:00:00 ora_smco_centos 0 S oracle 48551 41351 0 80 0 - 24390 n_tty_ 11:25 pts/2 00:00:00 rman target / 0 S oracle 48556 48551 0 80 0 - 267276 pipe_w 11:25 ? 00:00:00 oraclecentos (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 0 S oracle 48570 48551 0 80 0 - 266493 pipe_w 11:26 ? 00:00:00 oraclecentos (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 0 S oracle 49437 1 0 80 0 - 265808 SYSC_s 12:24 ? 00:00:00 ora_w000_centos 0 S oracle 49463 48110 0 80 0 - 28280 wait 12:25 pts/0 00:00:00 /bin/bash -c ps -elf|grep ora 0 R oracle 49464 49463 0 80 0 - 37764 - 12:25 pts/0 00:00:00 ps -elf 0 S oracle 49465 49463 0 80 0 - 28163 pipe_w 12:25 pts/0 00:00:00 grep ora centos@SYS>
查看数据库启动状态是否处于open:
centos@SYS> select status from v$instance; STATUS ------------ OPEN centos@SYS>
oracle数据库启动状态参考 oracle数据库启动与关闭
查看监听状态:
[oracle@centos ~]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-MAR-2017 12:38:43 Copyright (c) 1991, 2013, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.40)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 21-MAR-2017 19:19:54 Uptime 3 days 17 hr. 18 min. 52 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/centos/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.40)(PORT=1521))) Services Summary... Service "centos" has 1 instance(s). Instance "centos", status READY, has 1 handler(s) for this service... Service "centosXDB" has 1 instance(s). Instance "centos", status READY, has 1 handler(s) for this service... The command completed successfully LSNRCTL>
监听日志检查:adrci
[oracle@centos ~]$ adrci ADRCI: Release 11.2.0.4.0 - Production on Sat Mar 25 12:43:22 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ADR base = "/u01/app/oracle" adrci> show alert Choose the alert log from the following homes to view: 1: diag/rdbms/centos/centos 2: diag/clients/user_oracle/host_1318545672_80 3: diag/tnslsnr/centos/listener Q: to quit Please select option:
查看归档状态:archive log list;
centos@SYS> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 1 Next log sequence to archive 1 Current log sequence 1 centos@SYS>
查看闪回状态:select flashback_on from v$database;
centos@SYS> select flashback_on from v$database; FLASHBACK_ON ------------------ NO centos@SYS>