{"id":155271,"date":"2024-11-02T18:39:19","date_gmt":"2024-11-02T10:39:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/155271\/"},"modified":"2024-11-02T18:39:20","modified_gmt":"2024-11-02T10:39:20","slug":"%e7%99%bc%e6%8f%ae-oracle-%e6%95%b8%e6%93%9a%e5%ba%ab%e6%95%b8%e6%93%9a%e7%ae%a1%e7%90%86%e5%8a%9f%e8%83%bd%e7%9a%84-3-%e5%80%8b%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/155271\/","title":{"rendered":"\u767c\u63ee Oracle \u6578\u64da\u5eab\u6578\u64da\u7ba1\u7406\u529f\u80fd\u7684 3 \u500b\u65b9\u6848"},"content":{"rendered":"<h1 id=\"%e7%99%bc%e6%8f%ae-oracle-%e6%95%b8%e6%93%9a%e5%ba%ab%e6%95%b8%e6%93%9a%e7%ae%a1%e7%90%86%e5%8a%9f%e8%83%bd%e7%9a%84-3-%e5%80%8b%e6%96%b9%e6%a1%88-ZpmCOMNJpH\">\u767c\u63ee Oracle \u6578\u64da\u5eab\u6578\u64da\u7ba1\u7406\u529f\u80fd\u7684 3 \u500b\u65b9\u6848<\/h1>\n<p>Oracle \u6578\u64da\u5eab\u4f5c\u70ba\u4e00\u500b\u5f37\u5927\u7684\u6578\u64da\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5404\u7a2e\u884c\u696d\u4e2d\u3002\u5176\u9ad8\u6548\u7684\u6578\u64da\u8655\u7406\u80fd\u529b\u548c\u9748\u6d3b\u7684\u6578\u64da\u7ba1\u7406\u529f\u80fd\uff0c\u4f7f\u5f97\u4f01\u696d\u80fd\u5920\u66f4\u597d\u5730\u7ba1\u7406\u548c\u5206\u6790\u6578\u64da\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u4e09\u500b\u6709\u6548\u7684\u65b9\u6848\uff0c\u4ee5\u767c\u63ee Oracle \u6578\u64da\u5eab\u7684\u6578\u64da\u7ba1\u7406\u529f\u80fd\uff0c\u5e6b\u52a9\u4f01\u696d\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\u3002<\/p>\n<h2 id=\"%e6%96%b9%e6%a1%88%e4%b8%80%ef%bc%9a%e4%bd%bf%e7%94%a8-oracle-data-pump-%e9%80%b2%e8%a1%8c%e6%95%b8%e6%93%9a%e5%b0%8e%e5%85%a5%e5%92%8c%e5%b0%8e%e5%87%ba-ZpmCOMNJpH\">\u65b9\u6848\u4e00\uff1a\u4f7f\u7528 Oracle Data Pump \u9032\u884c\u6578\u64da\u5c0e\u5165\u548c\u5c0e\u51fa<\/h2>\n<p>Oracle Data Pump \u662f\u4e00\u500b\u9ad8\u6548\u7684\u6578\u64da\u5c0e\u5165\u548c\u5c0e\u51fa\u5de5\u5177\uff0c\u80fd\u5920\u5feb\u901f\u5730\u5c07\u6578\u64da\u5f9e\u4e00\u500b Oracle \u6578\u64da\u5eab\u8f49\u79fb\u5230\u53e6\u4e00\u500b\u6578\u64da\u5eab\u3002\u9019\u500b\u5de5\u5177\u4e0d\u50c5\u652f\u6301\u5168\u91cf\u6578\u64da\u7684\u5c0e\u5165\u548c\u5c0e\u51fa\uff0c\u9084\u652f\u6301\u589e\u91cf\u6578\u64da\u7684\u8655\u7406\uff0c\u9019\u5c0d\u65bc\u9700\u8981\u5b9a\u671f\u5099\u4efd\u6216\u9077\u79fb\u6578\u64da\u7684\u4f01\u696d\u4f86\u8aaa\u5c24\u70ba\u91cd\u8981\u3002<\/p>\n<h3 id=\"%e4%bd%bf%e7%94%a8%e7%a4%ba%e4%be%8b-ZpmCOMNJpH\">\u4f7f\u7528\u793a\u4f8b<\/h3>\n<pre><code>expdp username\/password DIRECTORY=dpump_dir DUMPFILE=mydata.dmp LOGFILE=mydata.log SCHEMAS=my_schema<\/code><\/pre>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5c07\u6307\u5b9a\u6a21\u5f0f\u7684\u6578\u64da\u5c0e\u51fa\u5230\u4e00\u500b DUMP \u6587\u4ef6\u4e2d\uff0c\u4e26\u751f\u6210\u76f8\u61c9\u7684\u65e5\u8a8c\u6587\u4ef6\u3002\u4f7f\u7528 Data Pump\uff0c\u4f01\u696d\u53ef\u4ee5\u8f15\u9b06\u5730\u7ba1\u7406\u6578\u64da\u7684\u5099\u4efd\u548c\u6062\u5fa9\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b89\u5168\u6027\u548c\u5b8c\u6574\u6027\u3002<\/p>\n<h2 id=\"%e6%96%b9%e6%a1%88%e4%ba%8c%ef%bc%9a%e5%88%a9%e7%94%a8-oracle-flashback-%e6%8a%80%e8%a1%93%e9%80%b2%e8%a1%8c%e6%95%b8%e6%93%9a%e6%81%a2%e5%be%a9-ZpmCOMNJpH\">\u65b9\u6848\u4e8c\uff1a\u5229\u7528 Oracle Flashback \u6280\u8853\u9032\u884c\u6578\u64da\u6062\u5fa9<\/h2>\n<p>Oracle Flashback \u6280\u8853\u5141\u8a31\u7528\u6236\u5728\u6578\u64da\u640d\u58de\u6216\u8aa4\u522a\u9664\u7684\u60c5\u6cc1\u4e0b\uff0c\u8fc5\u901f\u6062\u5fa9\u5230\u5148\u524d\u7684\u72c0\u614b\u3002\u9019\u4e00\u529f\u80fd\u5c0d\u65bc\u9700\u8981\u9ad8\u53ef\u7528\u6027\u548c\u6578\u64da\u5b8c\u6574\u6027\u7684\u61c9\u7528\u5834\u666f\u5c24\u70ba\u91cd\u8981\u3002<\/p>\n<h3 id=\"%e4%bd%bf%e7%94%a8%e7%a4%ba%e4%be%8b-ZpmCOMNJpH\">\u4f7f\u7528\u793a\u4f8b<\/h3>\n<pre><code>FLASHBACK TABLE my_table TO TIMESTAMP (SYSTIMESTAMP - INTERVAL '10' MINUTE);<\/code><\/pre>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5c07\u6307\u5b9a\u7684\u8868\u6062\u5fa9\u5230\u5341\u5206\u949f\u524d\u7684\u72c0\u614b\u3002\u901a\u904e Flashback \u6280\u8853\uff0c\u4f01\u696d\u80fd\u5920\u5728\u6578\u64da\u4e1f\u5931\u6216\u932f\u8aa4\u64cd\u4f5c\u5f8c\uff0c\u8fc5\u901f\u6062\u5fa9\u696d\u52d9\u904b\u884c\uff0c\u6e1b\u5c11\u640d\u5931\u3002<\/p>\n<h2 id=\"%e6%96%b9%e6%a1%88%e4%b8%89%ef%bc%9a%e5%af%a6%e6%96%bd-oracle-partitioning-%e4%bb%a5%e5%84%aa%e5%8c%96%e6%9f%a5%e8%a9%a2%e6%80%a7%e8%83%bd-ZpmCOMNJpH\">\u65b9\u6848\u4e09\uff1a\u5be6\u65bd Oracle Partitioning \u4ee5\u512a\u5316\u67e5\u8a62\u6027\u80fd<\/h2>\n<p>Oracle Partitioning \u662f\u4e00\u7a2e\u5c07\u5927\u578b\u8868\u5206\u5272\u6210\u66f4\u5c0f\u3001\u66f4\u6613\u65bc\u7ba1\u7406\u7684\u90e8\u5206\u7684\u6280\u8853\u3002\u9019\u4e0d\u50c5\u80fd\u5920\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\uff0c\u9084\u80fd\u5920\u7c21\u5316\u6578\u64da\u7ba1\u7406\u3002\u901a\u904e\u5c07\u6578\u64da\u6839\u64da\u67d0\u4e9b\u689d\u4ef6\uff08\u5982\u65e5\u671f\u3001\u5730\u5340\u7b49\uff09\u9032\u884c\u5206\u5340\uff0c\u4f01\u696d\u53ef\u4ee5\u66f4\u5feb\u5730\u6aa2\u7d22\u6240\u9700\u6578\u64da\u3002<\/p>\n<h3 id=\"%e4%bd%bf%e7%94%a8%e7%a4%ba%e4%be%8b-ZpmCOMNJpH\">\u4f7f\u7528\u793a\u4f8b<\/h3>\n<pre><code>CREATE TABLE sales\n(\n    sale_id NUMBER,\n    sale_date DATE,\n    amount NUMBER\n)\nPARTITION BY RANGE (sale_date)\n(\n    PARTITION p1 VALUES LESS THAN (TO_DATE('2023-01-01', 'YYYY-MM-DD')),\n    PARTITION p2 VALUES LESS THAN (TO_DATE('2024-01-01', 'YYYY-MM-DD'))\n);<\/code><\/pre>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5275\u5efa\u4e86\u4e00\u500b\u6309\u92b7\u552e\u65e5\u671f\u5206\u5340\u7684\u8868\u3002\u9019\u6a23\u7684\u8a2d\u8a08\u80fd\u5920\u986f\u8457\u63d0\u9ad8\u67e5\u8a62\u6548\u7387\uff0c\u7279\u5225\u662f\u5728\u8655\u7406\u5927\u91cf\u6578\u64da\u6642\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-ZpmCOMNJpH\">\u7e3d\u7d50<\/h2>\n<p>\u901a\u904e\u4f7f\u7528 Oracle Data Pump \u9032\u884c\u6578\u64da\u5c0e\u5165\u548c\u5c0e\u51fa\u3001\u5229\u7528 Oracle Flashback \u6280\u8853\u9032\u884c\u6578\u64da\u6062\u5fa9\uff0c\u4ee5\u53ca\u5be6\u65bd Oracle Partitioning \u4ee5\u512a\u5316\u67e5\u8a62\u6027\u80fd\uff0c\u4f01\u696d\u53ef\u4ee5\u5145\u5206\u767c\u63ee Oracle \u6578\u64da\u5eab\u7684\u6578\u64da\u7ba1\u7406\u529f\u80fd\u3002\u9019\u4e9b\u65b9\u6848\u4e0d\u50c5\u63d0\u9ad8\u4e86\u6578\u64da\u8655\u7406\u7684\u6548\u7387\uff0c\u9084\u589e\u5f37\u4e86\u6578\u64da\u7684\u5b89\u5168\u6027\u548c\u53ef\u7528\u6027\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u5e6b\u52a9\u60a8\u66f4\u597d\u5730\u7ba1\u7406\u548c\u904b\u884c\u60a8\u7684 Oracle \u6578\u64da\u5eab\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u4e09\u500b\u65b9\u6848\uff0c\u5145\u5206\u767c\u63ee Oracle \u6578\u64da\u5eab\u7684\u6578\u64da\u7ba1\u7406\u529f\u80fd\uff0c\u63d0\u5347\u6548\u7387\u8207\u6027\u80fd\uff0c\u52a9\u529b\u4f01\u696d\u6578\u64da\u9a45\u52d5\u6c7a\u7b56\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-155271","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/155271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=155271"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/155271\/revisions"}],"predecessor-version":[{"id":155272,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/155271\/revisions\/155272"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=155271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=155271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=155271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}