标签云
asm 恢复 asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (100)
- 数据库 (1,597)
- DB2 (22)
- MySQL (70)
- Oracle (1,463)
- Data Guard (49)
- EXADATA (7)
- GoldenGate (21)
- ORA-xxxxx (158)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (13)
- ORACLE 21C (3)
- Oracle ASM (65)
- Oracle Bug (7)
- Oracle RAC (47)
- Oracle 安全 (6)
- Oracle 开发 (27)
- Oracle 监听 (27)
- Oracle备份恢复 (530)
- Oracle安装升级 (84)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (75)
- PostgreSQL (17)
- PostgreSQL恢复 (5)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (36)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (19)
-
最近发表
- Oracle 19c/21c最新patch信息-202404
- PostgreSQL恢复系列:pg_filedump批量处理
- PostgreSQL部分主要字典信息
- PostgreSQL恢复系列:pg_filedump恢复字典构造
- PostgreSQL 16 源码安装
- ORA-00742 ORA-00312 恢复
- 数据库open成功后报ORA-00353 ORA-00354错误引起的一系列问题(本质ntfs文件系统异常)
- ORA-600 ktsiseginfo1故障
- ORA-00600: internal error code, arguments: [16703], [1403], [4] 原因
- 最近遇到几起ORA-600 16703故障(tab$被清空),请引起重视
- ORA-600 2662快速恢复之Patch scn工具
- TNS-12518: TNS:listener could not hand off client connection
- ora.storage无法启动报ORA-12514故障处理
- 断电引起文件scn异常数据库恢复
- ORA-16188: LOG_ARCHIVE_CONFIG settings inconsistent with previously started instance
- .[hudsonL@cock.li].mkp勒索加密数据库完美恢复
- 模拟带库实现rman远程备份
- 又一例:ORA-600 kclchkblk_4和2662故障
- Oracle误删除数据文件恢复
- Oracle 19C 备库DML重定向—DML Redirection
月归档:一月 2018
osw配置私网监控(oswprvtnet)
OS Watcher Black Box (OSWbb) 是一种 UNIX shell 脚本的集合,主要用于收集和归档操作系统和网络的度量,以便为诊断性能问题提供支持。OSWbb 作为服务器上的一组后台进程来运行,定期收集OS 数据,其调用 Unix 实用程序,如 vmstat、netstat 和 iostat 等。在最近的gi psu中已经把osw包含在tfa中了,但是默认不启用私网的监控,如果需要可以进行人工配置
OSWbb 使用 traceroute 命令获取这些私有网络的状态。每个操作系统对 traceroute 命令使用的参数都略有不同。基本 oswbb 目录中的示例Exampleprivate.net 文件中包含每个操作系统使用的语法。因此,这将导致在 UNIX 平台中的输出显示有所不同。OSWbb 按指定间隔运行 private.net 文件,并在归档目录下的 oswprvtnet 子目录中存储数据。数据存储在每小时归档的文件中。文件中的每个条目都包含一个时间戳,前缀为 ***,嵌入在顶部输出中。
tfa中含osw
[root@xifenfei01 ~]# ps -ef|grep osw grid 17673 1 0 Jan30 ? 00:00:07 /bin/sh ./OSWatcher.sh 30 48 NONE /u01/app/grid/tfa/repository/suptools/xifenfei01/oswbb/grid/archive grid 17841 17673 0 Jan30 ? 00:00:01 /bin/sh ./OSWatcherFM.sh 48 /u01/app/grid/tfa/repository/suptools/xifenfei01/oswbb/grid/archive root 64159 64120 0 00:30 pts/0 00:00:00 grep osw
测试prvtnet.sh
[root@xifenfei01 oswbb]# cd /u01/app/grid/tfa/repository/suptools/xifenfei01/oswbb/grid/oswbb [root@xifenfei01 oswbb]# more prvtnet.sh echo "zzz ***"`date` traceroute -r -F xifenfei01-priv traceroute -r -F xifenfei02-priv ###################################################################### # DO NOT DELETE THE FOLLOWING LINE!!!!!!!!!!!!!!!!!!!!! ###################################################################### rm locks/lock.file [root@xifenfei01 oswbb]# ./prvtnet.sh zzz ***Tue Jan 30 18:02:49 CST 2018 traceroute to xifenfei01-priv (192.168.102.11), 30 hops max, 60 byte packets 1 xifenfei01-priv (192.168.102.11) 0.010 ms 0.003 ms 0.002 ms traceroute to xifenfei02-priv (192.168.102.14), 30 hops max, 60 byte packets 1 xifenfei02-priv (192.168.102.14) 0.081 ms 0.076 ms 0.087 ms rm: cannot remove `locks/lock.file': No such file or directory
配置private.net正式收集私网信息
[root@xifenfei01 oswbb]# find . -name OSWatcher.sh | xargs grep -i "private" # Run traceroute for private networks if file private.net exists if [ -x private.net ]; then ./private.net >> $OSWBB_ARCHIVE_DEST/oswprvtnet/${hostn}_prvtnet_$hour 2>&1 &
这里重要的是:
./OSWatcher.sh:# Run traceroute for private networks if file private.net exists
表示,在OSWatcher.sh中调用的文件名称是private.net
将prvtnet.sh复制为供OSWatcher.sh脚本调用的文件名称
[root@xifenfei01 oswbb]# cp prvtnet.sh private.net [root@xifenfei01 oswbb]# chown grid:oinstall prvtnet.net [root@xifenfei01 oswbb]# chmod +x prvtnet.net
关注内容
示例 1: 接口处于启动和响应状态: traceroute to X.X.X.X, (X.X.X.X) 30 hops max, 1492 byte packets 1 X.X.X.X 1.015 ms 0.766 ms 0.755 ms 示例 2: 目标接口不是在直接连接的网络上,所以需要验证地址 是否正确或其插入的交换机是否位于相同的 VLAN 上(或其他问题): traceroute to X.X.X.X, (X.X.X.X) 30 hops max, 40 byte packets traceroute: host X.X.X.X is not on a directly-attached network 示例 3: 网络无法访问: traceroute to X.X.X.X, (X.X.X.X) 30 hops max, 40 byte packets Network is unreachable 示例 4: 网络无法访问: xifenfei01_prvtnet_18.01.30.2000.dat-zzz ***Tue Jan 30 20:27:43 CST 2018 xifenfei01_prvtnet_18.01.30.2000.dat-traceroute to xifenfei01-priv (192.168.102.11), 30 hops max, 60 byte packets xifenfei01_prvtnet_18.01.30.2000.dat- 1 xifenfei01-priv (192.168.102.11) 0.014 ms 0.004 ms 0.005 ms xifenfei01_prvtnet_18.01.30.2000.dat-traceroute to xifenfei02-priv (192.168.102.14), 30 hops max, 60 byte packets xifenfei01_prvtnet_18.01.30.2000.dat- 1 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 2 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 3 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 4 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 5 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 6 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 7 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 8 * * * xifenfei01_prvtnet_18.01.30.2000.dat- 9 * * * xifenfei01_prvtnet_18.01.30.2000.dat-10 * * * xifenfei01_prvtnet_18.01.30.2000.dat-11 * * * xifenfei01_prvtnet_18.01.30.2000.dat-12 * * * xifenfei01_prvtnet_18.01.30.2000.dat-13 * * * xifenfei01_prvtnet_18.01.30.2000.dat-14 * * * xifenfei01_prvtnet_18.01.30.2000.dat-15 * * * xifenfei01_prvtnet_18.01.30.2000.dat-16 * * * xifenfei01_prvtnet_18.01.30.2000.dat-17 * * * xifenfei01_prvtnet_18.01.30.2000.dat-18 * * * xifenfei01_prvtnet_18.01.30.2000.dat-19 * * * xifenfei01_prvtnet_18.01.30.2000.dat-20 * * * xifenfei01_prvtnet_18.01.30.2000.dat-21 * * * xifenfei01_prvtnet_18.01.30.2000.dat-22 * * * xifenfei01_prvtnet_18.01.30.2000.dat-23 * * * xifenfei01_prvtnet_18.01.30.2000.dat-24 * * * xifenfei01_prvtnet_18.01.30.2000.dat-25 * * * xifenfei01_prvtnet_18.01.30.2000.dat-26 * * * xifenfei01_prvtnet_18.01.30.2000.dat-27 * * * xifenfei01_prvtnet_18.01.30.2000.dat-28 * * * xifenfei01_prvtnet_18.01.30.2000.dat-29 * * * xifenfei01_prvtnet_18.01.30.2000.dat-30 * * * xifenfei01_prvtnet_18.01.30.2000.dat:zzz ***Warning. Traceroute response is spanning snapshot intervals.
重建oraInventory解决ORA-20001
数据库启动报ORA-20001: Latest xml inventory is not loaded into table错误
Completed: ALTER DATABASE OPEN 2018-01-23T23:46:27.924841+08:00 CJQ0 started with pid=54, OS id=6653 2018-01-23T23:46:31.705550+08:00 Unable to obtain current patch information due to error: 20001, ORA-20001: Latest xml inventory is not loaded into table ORA-06512: at "SYS.DBMS_QOPATCH", line 777 ORA-06512: at "SYS.DBMS_QOPATCH", line 864 ORA-06512: at "SYS.DBMS_QOPATCH", line 2222 ORA-06512: at "SYS.DBMS_QOPATCH", line 740 ORA-06512: at "SYS.DBMS_QOPATCH", line 2247 =========================================================== Dumping current patch information =========================================================== Unable to obtain current patch information due to error: 20001 ===========================================================
查询相关sql报错
SYS@xffdb>select * from OPATCH_XML_INV ; ERROR: ORA-29913: error in executing ODCIEXTTABLEFETCH callout ORA-29400: data cartridge error KUP-04004: error while reading file /u03/app/oracle/product/12.2.0.1/dbhome/QOpatch/qopiprep.bat no rows selected Elapsed: 00:00:00.58 SYS@xffdb>select xmltransform(dbms_qopatch.get_opatch_lsinventory(), dbms_qopatch.GET_OPATCH_XSLT()) from dual ; ERROR: ORA-20001: Latest xml inventory is not loaded into table ORA-06512: at "SYS.DBMS_QOPATCH", line 777 ORA-06512: at "SYS.DBMS_QOPATCH", line 864 ORA-06512: at "SYS.DBMS_QOPATCH", line 2222 ORA-06512: at "SYS.DBMS_QOPATCH", line 740 ORA-06512: at "SYS.DBMS_QOPATCH", line 2247 no rows selected Elapsed: 00:00:00.63
datapatch -prereq报错
[oracle@xifenfei ~]$ $ORACLE_HOME/OPatch/datapatch -prereq SQL Patching tool version 12.2.0.1.0 Production on Tue Jan 23 18:11:32 2018 Copyright (c) 2012, 2017, Oracle. All rights reserved. Connecting to database...OK Note: Datapatch will only apply or rollback SQL fixes for PDBs that are in an open state, no patches will be applied to closed PDBs. Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1) Queryable inventory could not determine the current opatch status. Execute 'select dbms_sqlpatch.verify_queryable_inventory from dual' and/or check the invocation log /u03/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_4909_2018_01_23_18_11_32/sqlpatch_invocation.log for the complete error. Prereq check failed, exiting without installing any patches. Please refer to MOS Note 1609718.1 and/or the invocation log /u03/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_4909_2018_01_23_18_11_32/sqlpatch_invocation.log for information on how to resolve the above errors. SQL Patching tool complete on Tue Jan 23 18:11:45 2018
分析qopiprep.bat文件
cd $ORACLE_HOME PATH=/bin:/usr/bin export PATH # sed tried to convert from one encoding to other in presence of LC_ALL # or LANG settings. Since opatch returning UTF-8 based encoding we do not # need such a conversion. So safely skip it LANG=en_US.UTF-8 export LANG LC_ALL='' export LC_ALL # Option: "-retry 0" avoids retries in case of locked inventory. # Option: "-invPtrLoc" is required for non-central-inventory # locations. $OPATCH_PREP_LSINV_OPTS which may set by users # in the environment to configure special OPatch options # ("-jdk" is another good candidate that may require configuration!). # Option: "-all" gives information on all Oracle Homes # installed in the central inventory. With that information, the # patches of non-RDBMS homes could be fetched. DBSID=$ORACLE_SID ORABASE=`$ORACLE_HOME/bin/orabasehome` rm -rf $ORABASE/rdbms/log/xml_file_$DBSID.xml $ORACLE_HOME/OPatch/opatch lsinventory -xml $ORABASE/rdbms/log/xml_file_$DBSID.xml -retry 0 -invPtrLoc $ORACLE_HOME/oraInst.loc >> $ORABASE/rdbms/log/stout_$DBSID.txt cat $ORABASE/rdbms/log/xml_file_$DBSID.xml | sed 's/^ *//' | tr '\n' ' ' echo "UIJSVTBOEIZBEFFQBL" rm $ORABASE/rdbms/log/xml_file_$DBSID.xml rm $ORABASE/rdbms/log/stout_$DBSID.txt
这里主要是$ORACLE_HOME/OPatch/opatch lsinventory可能异常,测试该功能
qopatch_log日志
[oracle@xifenfei ~]$ tail -f /u03/app/oracle/product/12.2.0.1/dbhome/QOpatch/qopatch_log.log LOG file opened at 01/23/18 18:48:55 KUP-05007: Warning: Intra source concurrency disabled because the preprocessor option is being used. Field Definitions for table OPATCH_XML_INV Record format DELIMITED BY NEWLINE Data in file has same endianness as the platform Reject rows with all null fields Fields in Data Source: XML_INVENTORY CHAR (100000000) Terminated by "UIJSVTBOEIZBEFFQBL" Trim whitespace same as SQL Loader KUP-04004: error while reading file /u03/app/oracle/product/12.2.0.1/dbhome/QOpatch/qopiprep.bat KUP-04017: OS message: Error 0 KUP-04017: OS message: LsInventorySession failed: RawInventory gets null OracleHomeInfo cat: /u03/app/oracle/product/12.2.0.1/dbhome/rdbms/log/xml_file_xffdb.xml: No such file or direc KUP-04118: operation "pipe read", location "skudmir:2"
opatch lsinventory验证
[oracle@xifenfei ~]$ /u03/app/oracle/product/12.2.0.1/dbhome/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.2.0.1.6 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /u03/app/oracle/product/12.2.0.1/dbhome Central Inventory : /u01/app/oraInventory from : /u03/app/oracle/product/12.2.0.1/dbhome/oraInst.loc OPatch version : 12.2.0.1.6 OUI version : 12.2.0.1.4 Log file location : /u03/app/oracle/product/12.2.0.1/dbhome/cfgtoollogs/opatch/opatch2018-01-23_23-50-29PM_1.log List of Homes on this system: Home name= OraDB12Home1, Location= "/u01/app/oracle/product/12.2.0/dbhome_1" LsInventorySession failed: RawInventory gets null OracleHomeInfo OPatch failed with error code 73
现在到这一步,可以确定判断opatch lsinventory运行异常,导致DBMS_QOPATCH无法正常工作,而引起opatch异常的原因是由于RawInventory gets null OracleHomeInfo
分析inventory.xml 文件
[oracle@xifenfei ContentsXML]$ cat inventory.xml <?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>12.2.0.1.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0/dbhome_1" TYPE="O" IDX="1"/> </HOME_LIST> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> </INVENTORY>
因为该机器上安装过三个版本的oracle,12.2 beta,11.2.0.4,12.2.0.1,现在oracle home只有第一个beta的,因此这个部分肯定异常,导致后面的12.2正式版无法获取到oraclehome
重建oraInventory
[oracle@xifenfei app]$ cd $ORACLE_HOME/oui/bin [oracle@xifenfei bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/app/oracle/product/12.2.0/dbhome_1" ORACLE_HOME_NAME="OraDB12betaHome1" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3935 MB Passed The inventory pointer is located at /etc/oraInst.loc 'AttachHome' was successful. [oracle@xifenfei bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u02/app/oracle/product/11.2.0.4/dbhome" ORACLE_HOME_NAME="OraDb11g_home1" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3935 MB Passed The inventory pointer is located at /etc/oraInst.loc 'AttachHome' was successful. [oracle@xifenfei bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u03/app/oracle/product/12.2.0.1/dbhome" ORACLE_HOME_NAME="OraDb122g_home1" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3935 MB Passed The inventory pointer is located at /etc/oraInst.loc 'AttachHome' was successful. --验证inventory.xml 文件 [oracle@xifenfei ContentsXML]$ cat inventory.xml <?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>12.2.0.1.4</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="OraDB12betaHome1" LOC="/u01/app/oracle/product/12.2.0/dbhome_1" TYPE="O" IDX="1"/> <HOME NAME="OraDb11g_home1" LOC="/u02/app/oracle/product/11.2.0.4/dbhome" TYPE="O" IDX="2"/> <HOME NAME="OraDb122g_home1" LOC="/u03/app/oracle/product/12.2.0.1/dbhome" TYPE="O" IDX="3"/> </HOME_LIST> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> </INVENTORY>
验证opatch lsinventory
[oracle@xifenfei bin]$ opatch lsinv Oracle Interim Patch Installer version 12.2.0.1.6 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /u03/app/oracle/product/12.2.0.1/dbhome Central Inventory : /u01/app/oraInventory from : /u03/app/oracle/product/12.2.0.1/dbhome/oraInst.loc OPatch version : 12.2.0.1.6 OUI version : 12.2.0.1.4 Log file location : /u03/app/oracle/product/12.2.0.1/dbhome/cfgtoollogs/opatch/opatch2018-01-24_00-19-55AM_1.log Lsinventory Output file location : /u03/app/oracle/product/12.2.0.1/dbhome/cfgtoollogs/opatch/lsinv/lsinventory2018-01-24_00-19-55AM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: xifenfei ARU platform id: 226 ARU platform description:: Linux x86-64 Installed Top-level Products (1): Oracle Database 12c 12.2.0.1.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. -------------------------------------------------------------------------------- OPatch succeeded.
验证dbms_qopatch工作正常
[oracle@xifenfei ContentsXML]$ $ORACLE_HOME/OPatch/datapatch -prereq SQL Patching tool version 12.2.0.1.0 Production on Wed Jan 24 00:21:48 2018 Copyright (c) 2012, 2017, Oracle. All rights reserved. Connecting to database...OK Note: Datapatch will only apply or rollback SQL fixes for PDBs that are in an open state, no patches will be applied to closed PDBs. Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1) Determining current state...done Adding patches to installation queue and performing prereq checks...done Installation queue: For the following PDBs: CDB$ROOT PDB$SEED Nothing to roll back Nothing to apply SQL Patching tool complete on Wed Jan 24 00:21:55 2018 SYS@xffdb>select dbms_sqlpatch.verify_queryable_inventory from dual; VERIFY_QUERYABLE_INVENTORY -------------------------------------------------------------------------------------------------- OK Elapsed: 00:00:01.03 SYS@xffdb>select xmltransform(dbms_qopatch.get_opatch_lsinventory(), dbms_qopatch.GET_OPATCH_XSLT()) from dual ; XMLTRANSFORM(DBMS_QOPATCH.GET_OPATCH_LSINVENTORY(),DBMS_QOPATCH.GET_OPATCH_XSLT()) ---------------------------------------------------------------------------------------------------------- Oracle Querayable Patch Interface 1.0 ----------------------------------------- Elapsed: 00:00:01.09 SYS@xffdb>
通过修复错误的oraInventory解决ORA-20001问题