{"id":5319,"date":"2024-11-14T12:21:45","date_gmt":"2024-11-14T04:21:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5319\/"},"modified":"2024-11-14T12:21:45","modified_gmt":"2024-11-14T04:21:45","slug":"oracle%e5%ad%97%e7%ac%a6%e9%9b%86%e6%80%8e%e4%b9%88%e6%94%b9","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5319\/","title":{"rendered":"oracle\u5b57\u7b26\u96c6\u600e\u4e48\u6539"},"content":{"rendered":"<blockquote><p>\n  \u6570\u636e\u5e93\u5b57\u7b26\u96c6\u66f4\u6539\u65b9\u6cd5\u5305\u62ec\uff1a1. \u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6\uff1b2. \u66f4\u6539\u7279\u5b9a\u6a21\u5f0f\u5b57\u7b26\u96c6\uff1b3. \u66f4\u6539\u7279\u5b9a\u8868\u6216\u89c6\u56fe\u5b57\u7b26\u96c6\uff1b4. \u66f4\u6539\u7279\u5b9a\u5217\u5b57\u7b26\u96c6\u3002\u6ce8\u610f\uff1a\u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6\u9700\u8981\u91cd\u542f\u6570\u636e\u5e93\uff0c\u8f6c\u6362\u5b57\u7b26\u96c6\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/26\/2024052619243423479.jpg\" class=\"aligncenter\" title=\"oracle\u5b57\u7b26\u96c6\u600e\u4e48\u6539\u63d2\u56fe\" alt=\"oracle\u5b57\u7b26\u96c6\u600e\u4e48\u6539\u63d2\u56fe\" \/><\/p>\n<h2>Oracle \u6570\u636e\u5e93\u5b57\u7b26\u96c6\u66f4\u6539\u65b9\u6cd5<\/h2>\n<p><strong>1. \u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6<\/strong><\/p>\n<pre>ALTER DATABASE CHARACTER SET [\u65b0\u5b57\u7b26\u96c6] SCOPE=BOTH;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u66f4\u6539\u7279\u5b9a\u6a21\u5f0f\u7684\u5b57\u7b26\u96c6<\/strong><\/p>\n<pre>ALTER SCHEMA [\u6a21\u5f0f\u540d] CHARACTER SET [\u65b0\u5b57\u7b26\u96c6];<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>3. \u66f4\u6539\u7279\u5b9a\u8868\u6216\u89c6\u56fe\u7684\u5b57\u7b26\u96c6<\/strong><\/p>\n<pre>ALTER TABLE [\u8868\u540d] CONVERT TO CHARACTER SET [\u65b0\u5b57\u7b26\u96c6];<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>4. \u66f4\u6539\u7279\u5b9a\u5217\u7684\u5b57\u7b26\u96c6<\/strong><\/p>\n<pre>ALTER TABLE [\u8868\u540d] \nALTER COLUMN [\u5217\u540d]\nSET DATA TYPE [\u65b0\u6570\u636e\u7c7b\u578b] CHARACTER SET [\u65b0\u5b57\u7b26\u96c6];<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>5. \u5176\u4ed6\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n<ul>\n<li>\u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6\u9700\u8981\u6570\u636e\u5e93\u91cd\u542f\u3002<\/li>\n<li>\u66f4\u6539\u7279\u5b9a\u6a21\u5f0f\u6216\u8868\/\u89c6\u56fe\/\u5217\u5b57\u7b26\u96c6\u4e0d\u9700\u8981\u6570\u636e\u5e93\u91cd\u542f\u3002<\/li>\n<li>\u8f6c\u6362\u5b57\u7b26\u96c6\u53ef\u80fd\u4f1a\u5bfc\u81f4\uff0c\u5efa\u8bae\u5728\u5236\u4f5c\u5907\u4efd\u540e\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<li>\u786e\u4fdd\u9009\u62e9\u4e0e\u5e94\u7528\u7a0b\u5e8f\u548c\u6570\u636e\u517c\u5bb9\u7684\u5b57\u7b26\u96c6\u3002<\/li>\n<\/ul>\n<p><strong>\u5e38\u89c1\u5b57\u7b26\u96c6<\/strong><\/p>\n<ul>\n<li>AL32UTF8<\/li>\n<li>UTF8<\/li>\n<li>WE8ISO8859P1<\/li>\n<li>ZHS16GBK<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5b57\u7b26\u96c6\u600e\u4e48\u6539\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6570\u636e\u5e93\u5b57\u7b26\u96c6\u66f4\u6539\u65b9\u6cd5\u5305\u62ec\uff1a1. \u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6\uff1b2. \u66f4\u6539\u7279\u5b9a\u6a21\u5f0f\u5b57\u7b26\u96c6\uff1b3. \u66f4\u6539\u7279\u5b9a\u8868\u6216\u89c6\u56fe\u5b57\u7b26\u96c6\uff1b4. \u66f4\u6539\u7279\u5b9a\u5217\u5b57\u7b26\u96c6\u3002\u6ce8\u610f\uff1a\u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6\u9700\u8981\u91cd\u542f\u6570\u636e\u5e93\uff0c\u8f6c\u6362\u5b57\u7b26\u96c6\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002 Oracle \u6570\u636e\u5e93\u5b57\u7b26\u96c6\u66f4\u6539\u65b9\u6cd5 1. \u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6 ALTER DATABASE CHARACTER SET [\u65b0\u5b57\u7b26\u96c6] SCOPE=BOTH; \u767b\u5f55\u540e\u590d\u5236 2. \u66f4\u6539\u7279\u5b9a\u6a21\u5f0f\u7684\u5b57\u7b26\u96c6 ALTER SCHEMA [\u6a21\u5f0f\u540d] CHARACTER SET [\u65b0\u5b57\u7b26\u96c6]; \u767b\u5f55\u540e\u590d\u5236 3. \u66f4\u6539\u7279\u5b9a\u8868\u6216\u89c6\u56fe\u7684\u5b57\u7b26\u96c6 ALTER TABLE [\u8868\u540d] CONVERT TO CHARACTER SET [\u65b0\u5b57\u7b26\u96c6]; \u767b\u5f55\u540e\u590d\u5236 4. \u66f4\u6539\u7279\u5b9a\u5217\u7684\u5b57\u7b26\u96c6 ALTER TABLE [\u8868\u540d] ALTER COLUMN [\u5217\u540d] SET DATA TYPE [\u65b0\u6570\u636e\u7c7b\u578b] CHARACTER SET [\u65b0\u5b57\u7b26\u96c6]; \u767b\u5f55\u540e\u590d\u5236 5. \u5176\u4ed6\u6ce8\u610f\u4e8b\u9879 \u66f4\u6539\u6570\u636e\u5e93\u5b57\u7b26\u96c6\u9700\u8981\u6570\u636e\u5e93\u91cd\u542f\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5319","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5319"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5319\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}