Oracle Database Recovery Check 介绍
根据多年来的数据库恢复经验,提炼出来数据库恢复关键点信息收集脚本(Oracle Database Recovery Check),该脚本主要是在数据库mount状态情况下查询数据库的一些基础表信息等信息,不对数据库进行任何写操作(只做读和dump操作),不会在坏的数据库基础之上带来任何破坏,不影响任何数据库后续的恢复工作。通过该脚本收集信息能够快速定位数据库异常原因,并初步判断数据库恢复疑难程度,减少数据库异常恢复诊断时间,提供恢复效率和准确性。
Oracle Database Recovery Check下载
Oracle Database Recovery Check(check_db.zip)
Oracle Database Recovery Check使用说明
=========for linux/unix操作系统环境oracle数据库恢复检测=========
下载check_db.zip放到/tmp中
su – oracle
sqlplus / as sysdba
startup mount;
exit;
cd /tmp
unzip check_db.zip
cd /tmp/check
sh check_db.sh
********************************************************
=========for windows操作系统环境oracle数据库恢复检测=========
1.下载check_db.zip放到非c盘根目录
2. mount 数据库
sqlplus / as sysdba
startup mount;
exit;
3. 然后解压当当前目录
4. 把check_db_win.bat文件拖到步骤2的cmd窗口中
5. 回车执行,如果是12c及其之后版本输入check_recover_db_12c,11g及其之前版本直接回车
********************************************************
把生成html文件和数据库alert日志(告警日志)一起打包发给QQ(107644445)、邮箱(dba@xifenfei.com)或者微信(17813235971)
linux/aix/hp-unix/solaris等非win环境收集信息操作步骤
[root@xifenfei tmp]# su - oracle Last login: Sun Jun 13 09:28:25 CST 2021 on pts/0 [oracle@xifenfei ~]$ cd /tmp/ [oracle@xifenfei tmp]$ ls -ltr total 20 -rw-r--r-- 1 root root 11324 Jun 13 15:23 check_db.zip [oracle@xifenfei tmp]$ unzip check_db.zip Archive: check_db.zip creating: check_db/ inflating: check_db/check_db.sh inflating: check_db/check_db_win.bat inflating: check_db/check_recover_db.sql inflating: check_db/check_recover_db_12c.sql inflating: check_db/READ_ME.txt [oracle@xifenfei tmp]$ cd check_db [oracle@xifenfei check_db]$ sh check_db.sh SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 13 15:24:21 2021 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, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> STATUS ------------ OPEN SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options echo ----Starting Collect Oracle Database Information---- SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 13 15:24:21 2021 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, OLAP, Data Mining and Real Application Testing options +----------------------------------------------------------------------------+ | Oracle Database Recovery Check Result | |----------------------------------------------------------------------------+ | Copyright (c) 2010-2021 xifenfei. All rights reserved. (www.xifenfei.com) | +----------------------------------------------------------------------------+ Please start the database to mount state. Note: Do not modify any inspection results To send xifenfei_db_recover_YYYYMMDD.html to dba@xifenfei.com or QQ(107644445) Please refer to the use of the script:https://www.xifenfei.com/oracle_recovery_check Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options echo ----End Collect Oracle Database Information---- SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 13 15:24:21 2021 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, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 'XIFENFEI_DB_RECOVER_'||LOWER(NAME)||'_'||T ------------------------------------------- xifenfei_db_recover_orcl_20210613.html SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ----Starting Collect PATCH Information---- ----End Collect PATCH Information---- ----Starting Collect Oracle Alert Information---- SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 13 15:24:23 2021 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, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> VALUE -------------------------------------------------------------------------------- /u01/app/oracle/diag/rdbms/orcl/orcl/trace SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 13 15:24:23 2021 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, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> VALUE -------------------------------------------------------------------------------- /u01/app/oracle SQL> SQL> SQL> VALUE -------------------------------------------------------------------------------- orcl SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options /u01/app/oracle/diag/rdbms/orcl/orcl/trace orcl /u01/app/oracle ----End Collect Oracle Alert Information---- SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 13 15:24:23 2021 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, OLAP, Data Mining and Real Application Testing options SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> dbv userid=sys/oracle file=/u01/app/oracle/oradata/orcl/system01.dbf blocksize=8192 logfile=.dbv_1.log SQL> SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ----Starting dbv system datafile Information---- DBVERIFY: Release 11.2.0.4.0 - Production on Sun Jun 13 15:24:23 2021 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ----End dbv system datafile Information---- ******************************************************************************** Please check and download /tmp/check_db/xifenfei_db_recover_orcl_20210613.html ******************************************************************************** [oracle@xifenfei check_db]$
win环境收集信息操作步骤
---打开cmd,然后把check_db_win.bat拖到cmd中,执行回车 Microsoft Windows [版本 10.0.17763.1339] (c) 2018 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>C:\Users\Administrator\Desktop\check_db\check_db_win.bat =-=-=-=-=欢迎使用Oracle Database Recovery Check =-=-=-=-= 当前系统PATH配置: C:\APP\ORACLE\19C\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\; C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps; **************************************************************************************** 请检查Oracle_sid,Oracle_home,sqlplus执行路径是否正确 如果不正确,请选择:计算机-管理-服务,选择OracleServiceXXXX,确保处于启动状态,并双击 发现类似:d:\app\xifenfei\product\11.2.0.4\dbhome_1\bin\ORACLE.EXE XXXX 请在cmd中执行类似命令(替换为您机器的OracleServiceXXXX中具体值: set ORACLE_SID=XXXX set ORACLE_HOME=d:\app\xifenfei\product\11.2.0.4\dbhome_1 set PATH=d:\app\xifenfei\product\11.2.0.4\dbhome_1\bin 然后重新在cmd中执行 check_db_win.bat 程序 **************************************************************************************** SQL*Plus: Release 19.0.0.0.0 - Production Version 19.11.0.0.0 如果数据库版本为12c/18c/19c版本数据库,请输入:check_recover_db_12c . 其他版本数据库,直接回车,或者输入:check_recover_db . 请输入脚本名称[check_recover_db]:check_recover_db_12c <===注意输入合适的脚本(输入check_recover_db_12c或者check_recover_db) . 您输入的脚本为:check_recover_db_12c SQL*Plus: Release 19.0.0.0.0 - Production on 星期日 6月 13 15:30:07 2021 Version 19.11.0.0.0 Copyright (c) 1982, 2020, Oracle. All rights reserved. 连接到: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.11.0.0.0 +----------------------------------------------------------------------------+ | Oracle Database Recovery Check Result | |----------------------------------------------------------------------------+ | Copyright (c) 2010-2021 xifenfei. All rights reserved. (www.xifenfei.com) | +----------------------------------------------------------------------------+ Please start the database to mount state. Note: Do not modify any inspection results To send xifenfei_db_recover_YYYYMMDD.html to dba@xifenfei.com or QQ(107644445) Please refer to the use of the script:https://www.xifenfei.com/oracle_recovery_check 从 Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.11.0.0.0 断开 请将生成的.html文件上传发给QQ(107644445)或者邮箱(dba@xifenfei.com) 驱动器 C 中的卷没有标签。 卷的序列号是 B4AF-DE8C C:\Users\Administrator\Desktop\check_db 的目录 2021/06/13 15:30 45,730 xifenfei_db_recover_orcl19c_20210613.html 1 个文件 45,730 字节 0 个目录 78,518,018,048 可用字节 C:\Users\Administrator\Desktop\check_db>
当你的数据库因为异常断电,强制关机,硬盘故障,drop表,truncate表,delete表,dmp文件异常,asm无法正常mount等故障无法解决导致数据丢失,且无法自行解决,请联系我们,提供专业ORACLE数据库恢复技术支持
Phone:17813235971 Q Q:107644445 E-Mail:dba@xifenfei.com