
{"id":951,"date":"2021-09-24T13:50:58","date_gmt":"2021-09-24T05:50:58","guid":{"rendered":"http:\/\/dba.qishuo.xin\/?p=951"},"modified":"2022-08-15T14:12:26","modified_gmt":"2022-08-15T06:12:26","slug":"oracle-rac-%e4%bf%ae%e6%94%b9pdb%e5%ad%97%e7%ac%a6%e9%9b%86","status":"publish","type":"post","link":"http:\/\/dba.qishuo.xin\/?p=951","title":{"rendered":"Oracle RAC \u4fee\u6539PDB\u5b57\u7b26\u96c6\u4e3aZHS16GBK"},"content":{"rendered":"<p>\u5728 12.1 \u4e2d\uff0c PDB \u7684\u5b57\u7b26\u96c6\u4e0e root \u5bb9\u5668\u5fc5\u987b\u4fdd\u6301\u4e00\u81f4\uff0c\u8fd9\u6837\u65e0\u5f62\u4e2d\u9020\u6210\u4e86 PDB \u8fc1\u79fb\u6216\u8005\u514b\u9686\u7684\u9650\u5236\u6027\u3002\u4ece 12.2 \u5f00\u59cb\uff0c\u540c\u4e00\u4e2a cdb \u4e2d\u7684\u5404\u4e2a PDB \u5b57\u7b26\u96c6\u53ef\u4ee5\u4e0d\u76f8\u540c\u3002<\/p>\n<p><span style='color:red'><strong>\u5bf9\u4e8e\u6700\u65b0\u7248\u672c 12.2.0.1 \uff0c\u5728\u65b0\u521b\u5efa PDB \u65f6\u5e76\u6ca1\u6709\u529e\u6cd5\u6307\u5b9a PDB \u7684\u5b57\u7b26\u96c6\uff0c\u56e0\u6b64\u53ea\u80fd\u548c root \u5bb9\u5668\u5b57\u7b26\u96c6\u76f8\u540c\uff0c\u800c\u4e0d\u540c PDB \u53ef\u4ee5\u4f7f\u7528 hot clone \u6216 Relocate PDB online \u65b9\u5f0f\u76f4\u63a5 plug-in \uff0c\u8fd8\u53ef\u4f7f\u7528 internal_use \u8fdb\u884c\u8f6c\u6362\u3002<\/strong><\/span><\/p>\n<p>\u4ece12.2\u8d77\u5f15\u5165\u65b0\u7279\u6027\u540c\u4e00CDB\u4e2d\u6bcf\u4e2aPDB\u53ef\u4ee5\u4f7f\u7528\u4e0d\u540c\u7684\u5b57\u7b26\u96c6\uff0c<strong>\u524d\u63d0CDB\u662fAL32UTF8<\/strong>\u3002 \u5982CDB\u662fAL32UTF8\uff0c\u5176\u4e2d\u7684PDB1\u4e3aWE8ISO8859P1 , PDB2\u4e3aZHS16GBK\uff0c \u4ece\u5176\u5b83CDB plug-in\u4e00\u4e2aJA16EUC\u5b57\u7b26\u96c6\u7684PDB\u4e5f\u662f\u5141\u8bb8\u7684\uff0c\u5728plug-in PDB\u7684\u8fc7\u7a0b\u4e2dPDB\u4f1a\u539f\u5c01\u4e0d\u52a8\u7684\u8fdb\u5165\u76ee\u6807CDB\uff0c\u8fc7\u7a0b\u4e2d\u5e76\u4e0d\u4f1a\u8f6c\u6362\u5b57\u7b26\u96c6\uff0c\u5e76\u4e14\u4ee5\u540e\u65b0insert\u7684\u6570\u636e\u662f\u76f4\u63a5\u4f7f\u7528\u7684\u539fPDB\u7684\u5b57\u7b26\u96c6\u3002<\/p>\n<p>Per-PDB Character Set\u7684\u6709\u51e0\u4e2a\u524d\u63d0\u6761\u4ef6\uff1a<br \/>\n1\uff09 CDB must be AL32UTF8<br \/>\n2\uff09 Application Container requires single character set<br \/>\n3\uff09 National character set also supported per PDB<br \/>\n4\uff09 Truncation of data can occur in cross-container queries if data conversion to UNICODE causes expansion<\/p>\n<ul>\n<li>\n<ol>\n<li>\u7b2c\u4e00\u79cd\u8fc1\u79fb\uff1b\u521b\u5efa\u4e00\u4e2aZHS16GBK \u7684CDB\uff0c \u540c\u65f6\u81ea\u5e26ZHS16GBK\u7684PDB\uff0c \u7136\u540e\u901a\u8fc7HOT CLONE PDB \u6216 Relocate PDB\u7684\u65b9\u5f0f\u8fc1\u79fb\u5230\u53e6\u4e00\u4e2aAL32UTF8\u5b57\u7b26\u96c6\u7684CDB\u4e2d\u3002<br \/>\n\u8be5\u64cd\u4f5c\u53ef\u4ee5\u5728\u540c\u4e00\u53f0\u6570\u636e\u5e93\u670d\u52a1\u5668\u4e0a\u521b\u5efa\uff0c\u56e0\u4e3a\u540c\u4e00server\u662f\u53ef\u4ee5\u521b\u5efa\u4e0d\u540c\u7684CDB\u7684\u3002\u5177\u4f53\u7684\u65b9\u6cd5\u5c31\u4e0d\u518d\u91cd\u590d\uff0c\u53ef\u4ee5\u53c2\u8003ANBOB.com\u4e0a\u6211\u4e4b\u524d\u7684clone,relocate\u7684\u7b14\u8bb0\u3002<\/li>\n<\/ol>\n<\/li>\n<li>\n<ol start=\"2\">\n<li>\u7b2c\u4e8c\u79cd\u8f6c\u6362\uff1b\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2aAL32UTF8\u7684PDB \u7136\u540e\u8f6c\u6362\u4e3aZHS16GBK\uff0c\u4e0b\u9762\u4f7f\u7528\u4e86internal_use\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u5728ORACLE\u662f\u4e0d\u592a\u5efa\u8bae\u7684\u3002<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>\u4e0b\u9762 CDB \u662fAL32UTF8 \u5e76\u4e14 pdb3 \u4e5f\u662f AL32UTF8 \u540e\u6765\u8f6c\u6362\u4e3aZHS16GBK\u3002 \u5b57\u7b26\u96c6\u7684\u53ef\u7528\u503c\u53ef\u4ee5\u67e5\u8be2 <code>V$NLS_VALID_VALUES<\/code> \u89c6\u56fe\uff0c \u5f53\u524d\u7684\u503c\u53ef\u4ee5\u67e5\u8be2 <code>V$NLS_PARAMETERS<\/code> \u89c6\u56fe\u3002<\/p>\n<p>RAC Instance:<br \/>\nrac\u5b9e\u4f8b\u4fee\u6539\u65f6\u548c\u5355\u5b9e\u4f8b\u6709\u70b9\u4e0d\u540c\uff0c\u9700\u8981\u5148\u505c\u6b62\u6240\u6709\u5176\u5b83instance\uff0c\u4fee\u6539\u540e\u518d\u6253\u5f00\u4e00\u4e2a\u5b9e\u4f8b\u3002<br \/>\n\u64cd\u4f5c\u73af\u5883\u4e3a <code>Oracle 19.10<\/code><\/p>\n<pre><code class=\"language-sql\">alter session set container=cdb$root;\nalter pluggable database pdb3 close instances=all;\nalter pluggable database  pdb3 open read write  restricted;\nalter session set container=pdb3;\nalter database character set internal_use zhs16gbk;\nalter pluggable database pdb3 close instances=all;\nalter pluggable database pdb3 open instances=all;\nalter session set container=pdb3;\n\nSELECT value\n  FROM nls_database_parameters\n WHERE parameter = &#039;NLS_CHARACTERSET&#039;;<\/code><\/pre>\n<p><a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2021\/09\/wp_editor_md_a6d505a1c24e999de2569d3d9a2297d1.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2021\/09\/wp_editor_md_a6d505a1c24e999de2569d3d9a2297d1.jpg\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 12.1 \u4e2d\uff0c PDB \u7684\u5b57\u7b26\u96c6\u4e0e root &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,24],"tags":[16,63,127],"class_list":["post-951","post","type-post","status-publish","format-standard","hentry","category-oracle","category-24","tag-oracle","tag-rac","tag-127"],"_links":{"self":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/951","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=951"}],"version-history":[{"count":7,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/951\/revisions"}],"predecessor-version":[{"id":2068,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/951\/revisions\/2068"}],"wp:attachment":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=951"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}