{"id":95408,"date":"2024-10-20T00:48:17","date_gmt":"2024-10-19T16:48:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/95408\/"},"modified":"2024-10-20T00:48:18","modified_gmt":"2024-10-19T16:48:18","slug":"oracle%e6%95%b8%e6%93%9a%e5%b0%8e%e5%85%a5imp-exp%e7%9a%84%e5%af%a6%e6%93%8d","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/95408\/","title":{"rendered":"Oracle\u6578\u64da\u5c0e\u5165imp\/exp\u7684\u5be6\u64cd"},"content":{"rendered":"<h1 id=\"oracle%e6%95%b8%e6%93%9a%e5%b0%8e%e5%85%a5imp-exp%e7%9a%84%e5%af%a6%e6%93%8d-yHSQJoZLSk\">Oracle\u6578\u64da\u5c0e\u5165imp\/exp\u7684\u5be6\u64cd<\/h1>\n<p>\u5728\u6578\u64da\u5eab\u7ba1\u7406\u4e2d\uff0c\u6578\u64da\u7684\u5c0e\u5165\u548c\u5c0e\u51fa\u662f\u975e\u5e38\u91cd\u8981\u7684\u64cd\u4f5c\u3002Oracle\u6578\u64da\u5eab\u63d0\u4f9b\u4e86\u591a\u7a2e\u5de5\u5177\u4f86\u5be6\u73fe\u9019\u4e9b\u529f\u80fd\uff0c\u5176\u4e2d\u6700\u5e38\u7528\u7684\u5de5\u5177\u4e4b\u4e00\u5c31\u662fimp\uff08\u5c0e\u5165\uff09\u548cexp\uff08\u5c0e\u51fa\uff09\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eOracle\u6578\u64da\u5c0e\u5165\u548c\u5c0e\u51fa\u7684\u5be6\u64cd\u904e\u7a0b\uff0c\u5e6b\u52a9\u8b80\u8005\u66f4\u597d\u5730\u7406\u89e3\u9019\u4e9b\u5de5\u5177\u7684\u4f7f\u7528\u3002<\/p>\n<h2 id=\"1-oracle%e6%95%b8%e6%93%9a%e5%b0%8e%e5%87%ba%ef%bc%88exp%ef%bc%89-yHSQJoZLSk\">1. Oracle\u6578\u64da\u5c0e\u51fa\uff08exp\uff09<\/h2>\n<p>Oracle\u7684exp\u5de5\u5177\u7528\u65bc\u5c07\u6578\u64da\u5f9e\u6578\u64da\u5eab\u5c0e\u51fa\u5230\u4e00\u500b\u6587\u4ef6\u4e2d\uff0c\u9019\u500b\u6587\u4ef6\u53ef\u4ee5\u7528\u65bc\u5099\u4efd\u6216\u5728\u5176\u4ed6\u6578\u64da\u5eab\u4e2d\u5c0e\u5165\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528exp\u5de5\u5177\u7684\u57fa\u672c\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-1-%e5%9f%ba%e6%9c%ac%e8%aa%9e%e6%b3%95-yHSQJoZLSk\">1.1 \u57fa\u672c\u8a9e\u6cd5<\/h3>\n<pre><code>exp username\/password@database file=export.dmp log=export.log<\/code><\/pre>\n<p>\u5728\u9019\u88e1\uff0c<code>username<\/code>\u548c<code>password<\/code>\u662f\u7528\u6236\u540d\u548c\u5bc6\u78bc\uff0c<code>database<\/code>\u662f\u6578\u64da\u5eab\u7684\u540d\u7a31\uff0c<code>file<\/code>\u6307\u5b9a\u4e86\u5c0e\u51fa\u6587\u4ef6\u7684\u540d\u7a31\uff0c<code>log<\/code>\u5247\u662f\u5c0e\u51fa\u904e\u7a0b\u7684\u65e5\u8a8c\u6587\u4ef6\u3002<\/p>\n<h3 id=\"1-2-%e5%b0%8e%e5%87%ba%e7%89%b9%e5%ae%9a%e8%a1%a8-yHSQJoZLSk\">1.2 \u5c0e\u51fa\u7279\u5b9a\u8868<\/h3>\n<p>\u5982\u679c\u53ea\u60f3\u5c0e\u51fa\u7279\u5b9a\u7684\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>exp username\/password@database tables=table_name file=export_table.dmp log=export_table.log<\/code><\/pre>\n<h2 id=\"2-oracle%e6%95%b8%e6%93%9a%e5%b0%8e%e5%85%a5%ef%bc%88imp%ef%bc%89-yHSQJoZLSk\">2. Oracle\u6578\u64da\u5c0e\u5165\uff08imp\uff09<\/h2>\n<p>\u5c0e\u5165\u6578\u64da\u7684\u904e\u7a0b\u8207\u5c0e\u51fa\u76f8\u4f3c\uff0c\u4f7f\u7528imp\u5de5\u5177\u53ef\u4ee5\u5c07\u4e4b\u524d\u5c0e\u51fa\u7684\u6578\u64da\u5c0e\u5165\u5230Oracle\u6578\u64da\u5eab\u4e2d\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528imp\u5de5\u5177\u7684\u57fa\u672c\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"2-1-%e5%9f%ba%e6%9c%ac%e8%aa%9e%e6%b3%95-yHSQJoZLSk\">2.1 \u57fa\u672c\u8a9e\u6cd5<\/h3>\n<pre><code>imp username\/password@database file=export.dmp log=import.log<\/code><\/pre>\n<p>\u9019\u88e1\u7684\u53c3\u6578\u8207\u5c0e\u51fa\u6642\u76f8\u4f3c\uff0c<code>file<\/code>\u6307\u5b9a\u4e86\u8981\u5c0e\u5165\u7684\u6587\u4ef6\u3002<\/p>\n<h3 id=\"2-2-%e5%b0%8e%e5%85%a5%e7%89%b9%e5%ae%9a%e8%a1%a8-yHSQJoZLSk\">2.2 \u5c0e\u5165\u7279\u5b9a\u8868<\/h3>\n<p>\u5982\u679c\u53ea\u60f3\u5c0e\u5165\u7279\u5b9a\u7684\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>imp username\/password@database tables=table_name file=export_table.dmp log=import_table.log<\/code><\/pre>\n<h2 id=\"3-%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-yHSQJoZLSk\">3. \u6ce8\u610f\u4e8b\u9805<\/h2>\n<ul>\n<li>\u5728\u9032\u884c\u5c0e\u51fa\u548c\u5c0e\u5165\u64cd\u4f5c\u4e4b\u524d\uff0c\u78ba\u4fdd\u6709\u8db3\u5920\u7684\u6b0a\u9650\u3002<\/li>\n<li>\u5c0e\u51fa\u6587\u4ef6\u7684\u5927\u5c0f\u53ef\u80fd\u6703\u5f71\u97ff\u5c0e\u5165\u7684\u901f\u5ea6\uff0c\u5efa\u8b70\u6839\u64da\u5be6\u969b\u60c5\u6cc1\u9032\u884c\u5206\u5272\u3002<\/li>\n<li>\u5728\u5c0e\u5165\u904e\u7a0b\u4e2d\uff0c\u6ce8\u610f\u6578\u64da\u7684\u5b8c\u6574\u6027\u548c\u4e00\u81f4\u6027\u3002<\/li>\n<\/ul>\n<h2 id=\"4-%e5%af%a6%e9%9a%9b%e6%a1%88%e4%be%8b-yHSQJoZLSk\">4. \u5be6\u969b\u6848\u4f8b<\/h2>\n<p>\u5047\u8a2d\u6211\u5011\u6709\u4e00\u500b\u540d\u70ba<code>employees<\/code>\u7684\u8868\uff0c\u4e26\u5e0c\u671b\u5c07\u5176\u5c0e\u51fa\u548c\u5c0e\u5165\u3002\u9996\u5148\uff0c\u6211\u5011\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c0e\u51fa\u8a72\u8868\uff1a<\/p>\n<pre><code>exp hr\/hr_password@orcl tables=employees file=employees.dmp log=employees_export.log<\/code><\/pre>\n<p>\u63a5\u8457\uff0c\u7576\u6211\u5011\u9700\u8981\u5c07\u9019\u500b\u8868\u5c0e\u5165\u5230\u53e6\u4e00\u500b\u6578\u64da\u5eab\u6642\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n<pre><code>imp hr\/hr_password@orcl file=employees.dmp log=employees_import.log<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-yHSQJoZLSk\">\u7e3d\u7d50<\/h2>\n<p>Oracle\u7684imp\u548cexp\u5de5\u5177\u70ba\u6578\u64da\u7684\u5c0e\u5165\u548c\u5c0e\u51fa\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u65b9\u5f0f\u3002\u901a\u904e\u6b63\u78ba\u7684\u4f7f\u7528\u9019\u4e9b\u5de5\u5177\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u4ee5\u6709\u6548\u5730\u9032\u884c\u6578\u64da\u5099\u4efd\u548c\u6062\u5fa9\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b89\u5168\u6027\u548c\u5b8c\u6574\u6027\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u6578\u64da\u7ba1\u7406\u7684\u4f01\u696d\u4f86\u8aaa\uff0c\u9078\u64c7\u5408\u9069\u7684<code><a href=\"https:\/\/server.hk\">VPS<\/a><\/code>\u89e3\u6c7a\u65b9\u6848\u4e5f\u662f\u81f3\u95dc\u91cd\u8981\u7684\uff0c\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u6578\u64da\u5eab\u7684\u7a69\u5b9a\u904b\u884c\u548c\u5feb\u901f\u97ff\u61c9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u638c\u63e1Oracle\u6578\u64da\u5c0e\u5165\u5c0e\u51faimp\/exp\u7684\u5be6\u64cd\u6280\u5de7\uff0c\u63d0\u5347\u6578\u64da\u7ba1\u7406\u6548\u7387\uff0c\u78ba\u4fdd\u6578\u64da\u5b89\u5168\u8207\u5b8c\u6574\u6027\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-95408","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95408","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=95408"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95408\/revisions"}],"predecessor-version":[{"id":95409,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95408\/revisions\/95409"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=95408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=95408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=95408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}