{"id":1187,"date":"2018-12-18T17:34:42","date_gmt":"2018-12-18T09:34:42","guid":{"rendered":"http:\/\/www.821121.com\/?p=1187"},"modified":"2020-12-18T17:37:56","modified_gmt":"2020-12-18T09:37:56","slug":"%e7%9b%91%e6%8e%a7%e5%b9%b3%e5%8f%b0vsegment_statistics-%e5%92%8cvsegstat%e5%8a%a8%e6%80%81%e8%a7%86%e5%9b%be%e6%9f%a5%e8%af%a2%e6%85%a2%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.821121.com\/?p=1187","title":{"rendered":"\u76d1\u63a7\u5e73\u53f0V$SEGMENT_STATISTICS \u548cV$SEGSTAT\u52a8\u6001\u89c6\u56fe\u67e5\u8be2\u6162\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<pre><code class=\"language-sql\">\u5728\u96c6\u7fa4\u73af\u5883\u4e2d\uff0c\u81ea\u4e3b\u6d4b\u8bd5\u7684\u76d1\u63a7\u8f6f\u4ef6\u5728\u6240\u6709\u7684\u6570\u636e\u5e93\u5b9e\u4f8b\u4e2d\u53ea\u6709\u4e00\u4e2a\u8282\u70b9\u67e5\u8be2V$SEGMENT_STATISTICS\u65f6\u51e0\u4e2a\u5c0f\u65f6\u90fd\u672a\u51fa\u7ed3\u679c, \u67e5\u8be2\u8fd9\u4e2a\u95ee\u9898\u5f71\u54cd\u4e8611.2.0.3 ,11.2.0.4\u591a\u4e2a\u7248\u672c\u53ca\u5e73\u53f0, \u8fd9\u4e2a\u95ee\u9898\u5728MOS\u4e0a\u6709\u4e00\u4e2a\u76f8\u4f3c\u7684NOTE, \u8bb0\u5f55\u67e5\u8be2\u7684\u662fv$segstat view.\n\u5176\u5b9e\u6211\u4eec\u53ef\u4ee5\u786e\u8ba4\u7684\u662f V$SEGMENT_STATISTICS \u548cV$SEGSTAT \u572811G\u7248\u672c\u4e2d\u90fd\u5171\u540c\u4f7f\u7528\u4e86x$ksolsfts\u3002\u6709\u5173\u67e5\u8be2\u7f51\u7ad9\uff1ahttps:\/\/www.anbob.com\/archives\/2812.html\n\u8fd9\u4e2a\u95ee\u9898\u4e3b\u8981\u8868\u73b0\u67e5\u8be2\u7684view\u4e2d\u4f7f\u7528\u4e86x$ksolsfts ,\u800cx$ksolsfts \u8868\u5b58\u5728\u5927\u91cf\u7684\u8bb0\u5f55\u53ca\u91cd\u590d\u8bb0\u5f55, \u800c\u5bfc\u81f4\u7684\u67e5\u8be2\u7f13\u6162, \u800c\u4e14\u5728RAC\u73af\u5883\u4e2d\u6709\u53ef\u80fd\u53ea\u5f71\u54cd\u4e00\u4e2a\u8282\u70b9\n\u89e3\u51b3\u65b9\u6cd5\uff1a\n1, \u5e94\u7528\u5bf9\u5e94\u7248\u672c\u4e2dBUG 21050285\u7684\u8865\u4e01\n2, \u91cd\u542f\u95ee\u9898\u8282\u70b9\u7684\u5b9e\u4f8b\u53ef\u4ee5\u7f13\u89e3\u8be5\u95ee\u9898, \u4f1a\u5728\u542f\u52a8\u540e\u91cd\u65b0\u6784\u9020\u6570\u636e.\n\n\u672c\u6b21\u5b9e\u9a8c\u662f\u6d4b\u8bd5\u5b89\u88c5BUG 21050285\u7684\u8865\u4e01\uff0c\u89e3\u51b3\u76d1\u63a7\u6570\u636e\u5e93\u6027\u80fd\u95ee\u9898\u3002\n\u51c6\u5907\uff1a\n\u4ecemos\u4e0a\u4e0b\u8f7d\u76f8\u5bf9\u5e94\u7248\u672c\u7684\u8865\u4e01\uff0c\u5982\u679c\u6570\u636e\u5e93\u6709\u6253\u8fc7PSU\u8865\u4e01\u5c31\u8981\u9009\u53d6\u76f8\u5e94\u7248\u672c\u768421050285\u7684\u8865\u4e01\n\noracle--&gt;ORACLE_HOME:\/u01\/app\/oracle\/product\/11.2.0.4\/db_1\ngrid--&gt;ORACLE_HOME:\/u01\/grid\/11.2.0.4<\/code><\/pre>\n<h1>1.\u65ad\u5f00\u6240\u6709\u4f1a\u8bdd<\/h1>\n<pre><code class=\"language-sql\">ps -ef|grep &#039;LOCAL=NO&#039;|grep $ORACLE_SID |grep -v grep|awk &#039;{print $2}&#039;|xargs -i kill -9 {}\n\u68c0\u67e5\u786e\u8ba4\nps -ef |grep LOCAL=NO\n<\/code><\/pre>\n<h1>2.\u5173\u95eddbconsole<\/h1>\n<pre><code class=\"language-sql\">echo $ORACLE_UNQNAME\n$ORACLE_HOME\/bin\/emctl status dbconsole\n$ORACLE_HOME\/bin\/emctl stop dbconsole\n<\/code><\/pre>\n<h1>3.\u5173\u95ed\u6570\u636e\u5e93<\/h1>\n<pre><code class=\"language-sql\">shutdown immediate<\/code><\/pre>\n<h1>4.\u5173\u95ed\u96c6\u7fa4<\/h1>\n<pre><code class=\"language-sql\">crsctl stop crs<\/code><\/pre>\n<h1>5.\u914d\u7f6e\u6700\u65b0\u7248\u672c\u7684OPatch,11.2.0.3.5\u53ca\u4ee5\u4e0a<\/h1>\n<pre><code class=\"language-sql\">chown -R oracle:oinstall OPatch\/\nchmod -R 775 OPatch\/\nmv OPatch OPacth_bak\nmv OPatch $ORACLE_HOME\/\nsu - oracle\ncd $ORACLE_HOME\/OPatch\n.\/opatch lsinventory \u9a8c\u8bc1<\/code><\/pre>\n<h1>6.\u4e0a\u4f20\u8865\u4e01\u5305\u5230u01\u76ee\u5f55\u4e0b\uff0c\u89e3\u538b\u5b89\u88c5\u5305\u8d4b\u4e88\u6743\u9650<\/h1>\n<pre><code class=\"language-sql\">uznip 21050285\nchown -R oracle:oinstall 21050285\/\nchmod -R 775 21050285\/\n<\/code><\/pre>\n<h1>7.\u786e\u5b9a\u5f53\u524d\u5b89\u88c5\u7684\u4e34\u65f6\u8865\u4e01\u662f\u5426\u4e0e\u8fd9\u4e2a\u8865\u4e0121050285\u51b2\u7a81\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/h1>\n<pre><code class=\"language-sql\">cd \/u01\/21050285\n\/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch prereq CheckConflictAgainstOHWithDetail -ph .\/<\/code><\/pre>\n<h1>8.\u5b89\u88c5\u8865\u4e01\uff08Oracle\u7528\u6237\uff09<\/h1>\n<pre><code class=\"language-sql\">cd \/u01\/21050285\n\/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch apply\n\u6210\u529f\u8bb0\u5f55\uff1a\n[oracle@rac1 21050285]$ \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch apply\nOracle Interim Patch Installer version 11.2.0.3.25\nCopyright (c) 2020, Oracle Corporation.  All rights reserved.\n\nOracle Home       : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\nCentral Inventory : \/u01\/app\/oraInventory\n   from           : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/oraInst.loc\nOPatch version    : 11.2.0.3.25\nOUI version       : 11.2.0.4.0\nLog file location : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/opatch2020-12-18_17-03-23PM_1.log\n\nVerifying environment and performing prerequisite checks...\nOPatch continues with these patches:   21050285  \n\nDo you want to proceed? [y|n]\ny\nUser Responded with: Y\nAll checks passed.\n\nPlease shutdown Oracle instances running out of this ORACLE_HOME on the local system.\n(Oracle Home = &#039;\/u01\/app\/oracle\/product\/11.2.0.4\/db_1&#039;)\n\nIs the local system ready for patching? [y|n]\ny\nUser Responded with: Y\nBacking up files...\nApplying interim patch &#039;21050285&#039; to OH &#039;\/u01\/app\/oracle\/product\/11.2.0.4\/db_1&#039;\n\nPatching component oracle.rdbms, 11.2.0.4.0...\nPatch 21050285 successfully applied.\nLog file location: \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/opatch2020-12-18_17-03-23PM_1.log\n\nOPatch succeeded.\n<\/code><\/pre>\n<h1>9.\u9a8c\u8bc1\u8865\u4e01\u4fe1\u606f<\/h1>\n<pre><code class=\"language-sql\">[oracle@rac1 21050285]$ \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch lsinventory\nOracle Interim Patch Installer version 11.2.0.3.25\nCopyright (c) 2020, Oracle Corporation.  All rights reserved.\n\nOracle Home       : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\nCentral Inventory : \/u01\/app\/oraInventory\n   from           : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/oraInst.loc\nOPatch version    : 11.2.0.3.25\nOUI version       : 11.2.0.4.0\nLog file location : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/opatch2020-12-18_17-06-02PM_1.log\n\nLsinventory Output file location : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/lsinv\/lsinventory2020-12-18_17-06-02PM.txt\n--------------------------------------------------------------------------------\nLocal Machine Information::\nHostname: rac1\nARU platform id: 226\nARU platform description:: Linux x86-64\n\nInstalled Top-level Products (1): \n\nOracle Database 11g                                                  11.2.0.4.0\nThere are 1 products installed in this Oracle Home.\n\nInterim patches (1) :\n\nPatch  21050285     : applied on Fri Dec 18 17:04:12 CST 2020\nUnique Patch ID:  19467713\n   Created on 19 Oct 2015, 16:38:09 hrs \n   Bugs fixed:\n     21050285\n\n--------------------------------------------------------------------------------\n\nOPatch succeeded.\n<\/code><\/pre>\n<h1>10.\u542f\u52a8CRS\uff0c\u542f\u52a8\u6570\u636e\u5e93<\/h1>\n<h1>11.\u5982\u679c\u8865\u4e01\u672a\u5e94\u7528\u6210\u529f\uff0c\u5219\u56de\u6eda\u8865\u4e01<\/h1>\n<pre><code class=\"language-sql\">cd \/u01\/21050285\n\/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch rollback -id 21050285\n[oracle@rac1 ~]$ \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch rollback -id 21050285\nOracle Interim Patch Installer version 11.2.0.3.25\nCopyright (c) 2020, Oracle Corporation.  All rights reserved.\n\nOracle Home       : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\nCentral Inventory : \/u01\/app\/oraInventory\n   from           : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/oraInst.loc\nOPatch version    : 11.2.0.3.25\nOUI version       : 11.2.0.4.0\nLog file location : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/opatch2020-12-18_17-22-31PM_1.log\n\nPatches will be rolled back in the following order: \n   21050285\nThe following patch(es) will be rolled back: 21050285  \n\nPlease shutdown Oracle instances running out of this ORACLE_HOME on the local system.\n(Oracle Home = &#039;\/u01\/app\/oracle\/product\/11.2.0.4\/db_1&#039;)\n\nIs the local system ready for patching? [y|n]\ny\nUser Responded with: Y\n\nRolling back patch 21050285...\n\nRollbackSession rolling back interim patch &#039;21050285&#039; from OH &#039;\/u01\/app\/oracle\/product\/11.2.0.4\/db_1&#039;\n\nPatching component oracle.rdbms, 11.2.0.4.0...\nyRollbackSession removing interim patch &#039;21050285&#039; from inventory\n\nLog file location: \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/opatch2020-12-18_17-22-31PM_1.log\n\nOPatch succeeded.\n<\/code><\/pre>\n<h1>12.\u67e5\u770b\u8865\u4e01\u662f\u5426\u88ab\u56de\u6eda<\/h1>\n<pre><code class=\"language-sql\">[oracle@rac1 ~]$ \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/OPatch\/opatch lsinventory\nOracle Interim Patch Installer version 11.2.0.3.25\nCopyright (c) 2020, Oracle Corporation.  All rights reserved.\n\nOracle Home       : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\nCentral Inventory : \/u01\/app\/oraInventory\n   from           : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/oraInst.loc\nOPatch version    : 11.2.0.3.25\nOUI version       : 11.2.0.4.0\nLog file location : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/opatch2020-12-18_17-25-32PM_1.log\n\nLsinventory Output file location : \/u01\/app\/oracle\/product\/11.2.0.4\/db_1\/cfgtoollogs\/opatch\/lsinv\/lsinventory2020-12-18_17-25-32PM.txt\n--------------------------------------------------------------------------------\nLocal Machine Information::\nHostname: rac1\nARU platform id: 226\nARU platform description:: Linux x86-64\n\nInstalled Top-level Products (1): \n\nOracle Database 11g                                                  11.2.0.4.0\nThere are 1 products installed in this Oracle Home.\n\nThere are no Interim patches installed in this Oracle Home.\n\n--------------------------------------------------------------------------------\n\nOPatch succeeded.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u96c6\u7fa4\u73af\u5883\u4e2d\uff0c\u81ea\u4e3b\u6d4b\u8bd5\u7684\u76d1\u63a7\u8f6f\u4ef6\u5728\u6240\u6709\u7684\u6570\u636e\u5e93\u5b9e\u4f8b<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,41],"tags":[],"class_list":["post-1187","post","type-post","status-publish","format-standard","hentry","category-oracle-11g","category-41"],"_links":{"self":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1187"}],"version-history":[{"count":1,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1187\/revisions"}],"predecessor-version":[{"id":1188,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/1187\/revisions\/1188"}],"wp:attachment":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1187"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}