
{"id":1149,"date":"2021-12-04T13:25:11","date_gmt":"2021-12-04T05:25:11","guid":{"rendered":"http:\/\/dba.qishuo.xin\/?p=1149"},"modified":"2021-12-06T08:18:37","modified_gmt":"2021-12-06T00:18:37","slug":"oracle-19c-rac%e8%ae%be%e7%bd%ae%e5%ae%9e%e4%be%8b%e8%87%aa%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"http:\/\/dba.qishuo.xin\/?p=1149","title":{"rendered":"Oracle 19C RAC\u8bbe\u7f6e\u5b9e\u4f8b\u81ea\u542f\u52a8"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-69f61fbc00cb6\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f61fbc00cb6\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/dba.qishuo.xin\/?p=1149\/#1_CRS%E6%9C%8D%E5%8A%A1%E5%BC%80%E6%9C%BA%E5%90%AF%E5%8A%A8\" >1. CRS\u670d\u52a1\u5f00\u673a\u542f\u52a8<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/dba.qishuo.xin\/?p=1149\/#11_%E6%9F%A5%E7%9C%8BCRS%E7%9A%84%E7%89%88%E6%9C%AC\" >1.1. \u67e5\u770bCRS\u7684\u7248\u672c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/dba.qishuo.xin\/?p=1149\/#12_%E6%9F%A5%E7%9C%8BCRS%E6%98%AF%E5%90%A6%E8%87%AA%E5%90%AF%E5%8A%A8\" >1.2. \u67e5\u770bCRS\u662f\u5426\u81ea\u542f\u52a8<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/dba.qishuo.xin\/?p=1149\/#13_%E8%AE%BE%E7%BD%AECRS%E8%87%AA%E5%90%AF%E5%8A%A8\" >1.3. \u8bbe\u7f6eCRS\u81ea\u542f\u52a8<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/dba.qishuo.xin\/?p=1149\/#2_%E6%95%B0%E6%8D%AE%E5%BA%93%E5%AE%9E%E4%BE%8B%E9%9A%8FCRS%E5%90%AF%E5%8A%A8\" >2. \u6570\u636e\u5e93\u5b9e\u4f8b\u968fCRS\u542f\u52a8<\/a><\/li><\/ul><\/nav><\/div>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOracle 19C CRS\u670d\u52a1\u662f\u968f\u7740\u7cfb\u7edf\u542f\u52a8\u800c\u81ea\u52a8\u542f\u52a8\u7684\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_CRS%E6%9C%8D%E5%8A%A1%E5%BC%80%E6%9C%BA%E5%90%AF%E5%8A%A8\"><\/span>1. CRS\u670d\u52a1\u5f00\u673a\u542f\u52a8<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"11_%E6%9F%A5%E7%9C%8BCRS%E7%9A%84%E7%89%88%E6%9C%AC\"><\/span>1.1. \u67e5\u770bCRS\u7684\u7248\u672c<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell line-numbers\">\/u01\/app\/19.0.0.0\/grid\/bin\/crsctl query crs softwareversion\n<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"12_%E6%9F%A5%E7%9C%8BCRS%E6%98%AF%E5%90%A6%E8%87%AA%E5%90%AF%E5%8A%A8\"><\/span>1.2. \u67e5\u770bCRS\u662f\u5426\u81ea\u542f\u52a8<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell line-numbers\">cat \/etc\/oracle\/scls_scr\/racnode1\/root\/ohasdstr\n<\/code><\/pre>\n<p>\u5982\u679c\u7ed3\u679c\u662fenable\u4ee3\u8868\u81ea\u542f\u52a8\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"13_%E8%AE%BE%E7%BD%AECRS%E8%87%AA%E5%90%AF%E5%8A%A8\"><\/span>1.3. \u8bbe\u7f6eCRS\u81ea\u542f\u52a8<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell line-numbers\">\/u01\/app\/19.0.0.0\/grid\/bin\/crsctl enable crs\n<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"2_%E6%95%B0%E6%8D%AE%E5%BA%93%E5%AE%9E%E4%BE%8B%E9%9A%8FCRS%E5%90%AF%E5%8A%A8\"><\/span>2. \u6570\u636e\u5e93\u5b9e\u4f8b\u968fCRS\u542f\u52a8<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOracle 19C RAC\u4e2d\u5b9e\u4f8b\u7684AUTO_START\u503c\u4e3arestore\u3002\u5176\u4e2drestore\u8868\u793a\u8fd8\u539f\u3001\u6062\u590d\u7684\u542b\u4e49\uff0c\u662f\u628a\u5b9e\u4f8b\u72b6\u6001\u6062\u590d\u5230CRS\u505c\u6b62\u524d\u7684\u72b6\u6001\u3002<\/p>\n<ol>\n<li>\u5982\u679cCRS\u505c\u6b62\u524d\uff0c\u624b\u52a8\u901a\u8fc7sqlplus \u6216\u8005\u662f srvctl \u505c\u6b62\u4e86\u5b9e\u4f8b\uff0c\u90a3\u4e48\u5728crs\u91cd\u542f\u540e\uff0c\u5b9e\u4f8b\u4e0d\u4f1a\u8ddf\u7740\u81ea\u52a8\u542f\u52a8\u3002<\/li>\n<li>\u5982\u679cCRS\u505c\u6b62\u524d\uff0c\u5b9e\u4f8b\u5904\u4e8eopen\u72b6\u6001\uff0c\u90a3\u4e48\u91cd\u542fCRS(\u6216\u8005\u64cd\u4f5c\u7cfb\u7edf\u91cd\u542f\u540e)\uff0c\u5b9e\u4f8b\u4f1a\u8ddf\u7740CRS\u542f\u52a8\u800c\u81ea\u52a8\u542f\u52a8\u3002<\/li>\n<li>\u5982\u679c\u5728\u6ca1\u6709\u505c\u6b62\u5b9e\u4f8b\u524d\uff0c\u76f4\u63a5\u505c\u6b62CRS\uff0c\u5b9e\u4f8b\u662f\u4ee5abort\u65b9\u5f0f\u505c\u6b62\u7684[Shutting down instance(abort)]\u3002<\/li>\n<\/ol>\n<p><strong>\u628aAUTO_START\u7531restore\u6539\u6210always\u540e\uff0c\u65e0\u8bbacrs\u505c\u6b62\u524d\u5b9e\u4f8b\u662fopen\u8fd8\u662fclose\u72b6\u6001\uff0c\u5b9e\u4f8b\u90fd\u4f1a\u8ddf\u7740CRS\u542f\u52a8\u800c\u542f\u52a8\u3002<\/strong><\/p>\n<pre><code class=\"language-shell line-numbers\">\/u01\/app\/19.0.0.0\/grid\/bin\/crsctl stat res ora.racdb.db -p|grep AUTO_START\n\nAUTO_START=restore\n<\/code><\/pre>\n<p>\u5982\u679cAUTO_START\u503c\u662f\u9ed8\u8ba4\u7684restore\uff0c\u90a3\u4e48Oracle 19C RAC\u9700\u8981\u4f7f\u7528oracle\u7528\u6237\u624b\u52a8\u542f\u52a8oracle\u5b9e\u4f8b\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">su - oracle\n\/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/bin\/srvctl start database -d racdb\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u5728root\u7528\u6237\u4e0b\u6267\u884c\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">~]# \/u01\/app\/19.0.0.0\/grid\/bin\/crsctl stat res ora.racdb.db -t\n<\/code><\/pre>\n<p>\u6216\u8005\u5728oracle\u7528\u6237\u4e0b\u6267\u884c\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">~]$ \/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/bin\/srvctl status instance -d racdb -i racdb1,racdb2 -f -v\n#\u5b9e\u4f8b\u624d\u4f1a\u663e\u793a\u662fONLINE\u72b6\u6001\u7684\u3002\n<\/code><\/pre>\n<p>\u8bbe\u7f6eOracle 19C RAC\u5b9e\u4f8b\u81ea\u542f\u52a8\u7684\u65b9\u6cd5\u662f\u4fee\u6539AUTO_START=always\u3002<\/p>\n<pre><code class=\"language-shell line-numbers\">~]# \/u01\/app\/19.0.0.0\/grid\/bin\/crsctl modify resource \"ora.racdb.db\" -attr \"AUTO_START=always\" -unsupported\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u6709\u4e2a\u6280\u5de7\u662f\u81ea\u4ece12.1.0.2\u4e4b\u540e\uff0c\u5982\u679c\u4f7f\u7528crsctl \u8fdb\u884cora resource\u7684\u4fee\u6539\u3001\u542f\u52a8\u3001\u5173\u95ed\uff0c\u90fd\u4f1a\u906d\u9047CRS-4995The command 'Modify resource' is invalid in crsctl. Use srvctl for this command.\u7684\u9519\u8bef\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\u662f\u52a0\u4e0a-unsupported\u7684\u53c2\u6570\u3002<\/p>\n<p>\u4fee\u6539\u5b8c\u6210\u540e\u67e5\u770b\u81ea\u542f\u52a8\u53c2\u6570\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">~]# \/u01\/app\/19.0.0.0\/grid\/bin\/crsctl stat res ora.racdb.db -p|grep AUTO_START\n~]$ \/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/bin\/srvctl status instance -d racdb -i racdb1,racdb2 -f -v\n~]$ \/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_1\/bin\/srvctl status database -d racdb\n\u624d\u4f1a\u663e\u793a\u662fONLINE\u72b6\u6001\u7684\u3002\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOracle 19C CRS\u670d\u52a1\u662f\u968f\u7740&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,27],"tags":[16,63,53],"class_list":{"0":"post-1149","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-oracle","8":"tag-oracle","9":"tag-rac","10":"tag-53"},"_links":{"self":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1149"}],"version-history":[{"count":3,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1149\/revisions"}],"predecessor-version":[{"id":1170,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1149\/revisions\/1170"}],"wp:attachment":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1149"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}