|
wangzhuoyan的專欄
明月松間照,清泉石上流 登錄 注冊(cè) 歡迎 退出 我的博客 配置 寫文章 文章管理 博客首頁 全站 當(dāng)前博客 空間 博客 好友 相冊(cè) 留言 用戶操作 [發(fā)私信] [加為好友] 王卓巖ID:wangzhuoyan 共1769次訪問,排名2萬外,好友27人,關(guān)注者27人。
StringBuffer dream = new StringBuffer (); dream .append("技術(shù)高手"); dream .append("彩票中獎(jiǎng)"); dream .append("有車,有房"); wangzhuoyan的文章 原創(chuàng) 13 篇 翻譯 0 篇 轉(zhuǎn)載 24 篇 評(píng)論 0 篇 訂閱我的博客 wangzhuoyan的公告 有理想在的地方,地獄就是天堂,有希望在的地方,痛苦也成歡樂. 文章分類 技術(shù)外話 數(shù)據(jù)庫 應(yīng)用程序 存檔 2009年07月(3) 2009年06月(7) 2009年05月(16) 2009年04月(11) Oracle不同版本間的導(dǎo)入導(dǎo)出命令詳解 收藏 Oracle的imp/exp組件是我們常用的工具,它的一個(gè)操作原則就是向下兼容。下面是據(jù)此總結(jié)的幾個(gè)使用規(guī)則和相關(guān)測(cè)試: 規(guī)則1:低版本的exp/imp可以連接到高版本(或同版本)的數(shù)據(jù)庫服務(wù)器,但高版本的exp/imp不能連接到低版本的數(shù)據(jù)庫服務(wù)器
--1.1 使用9i客戶端通過imp連接到10g數(shù)據(jù)庫 C:\Documents and Settings\yuechaotian>exp userid=hdtest/test@s67 tables=(ab01) rows=n file=d:\x.dmp Export: Release 9.2.0.1.0 - Production on 星期三 2月 20 10:09:55 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 已導(dǎo)出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集 注: 將不會(huì)導(dǎo)出表數(shù)據(jù)(行) 即將導(dǎo)出指定的表通過常規(guī)路徑 ...
. . 正在導(dǎo)出表 AB01 在沒有警告的情況下成功終止導(dǎo)出。 --1.2 使用10g客戶端通過imp連接9i數(shù)據(jù)庫:連接失?。ǘ皇菍?dǎo)出失敗)
C:\Documents and Settings\yuechaotian>exp userid=hbjb_kf_hd/test@s46 owner=hdtest file=d:\x.dmp Export: Release 10.2.0.1.0 - Production on 星期三 2月 20 09:57:22 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
EXP-00056: 遇到 ORACLE 錯(cuò)誤 6550 ORA-06550: 第 1 行, 第 41 列: PLS-00302: 必須說明 'SET_NO_OUTLINES' 組件 ORA-06550: 第 1 行, 第 15 列: PL/SQL: Statement ignored EXP-00000: 導(dǎo)出終止失敗 規(guī)則2:高版本exp出的dmp文件,低版本無法imp(無法識(shí)別dmp文件)
--2.1 使用10g客戶端exp出10g的數(shù)據(jù) C:\Documents and Settings\yuechaotian>exp userid=test/test@orcl owner=test file=d:\10g.dmp Export: Release 10.2.0.1.0 - Production on 星期三 2月 20 11:16:39 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 已導(dǎo)出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集 服務(wù)器使用 AL32UTF8 字符集 (可能的字符集轉(zhuǎn)換) 即將導(dǎo)出指定的用戶...
…… 導(dǎo)出成功終止, 但出現(xiàn)警告。 C:\Documents and Settings\yuechaotian>
--2.2 使用9i客戶端imp上面所導(dǎo)出的dmp文件到10g:可以連接到10g中,但無法識(shí)別文件
C:\Documents and Settings\yuechaotian>imp userid=test/test@s10g fromuser=test touser=test file=d:\10g.dmp Import: Release 9.2.0.1.0 - Production on 星期三 2月 20 11:20:33 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options IMP-00010: 不是有效的導(dǎo)出文件,標(biāo)題驗(yàn)證失敗
IMP-00000: 未成功終止導(dǎo)入 C:\Documents and Settings\yuechaotian>
規(guī)則3:低版本exp出的dmp文件,高版本可以imp(向下兼容)
-- 3.1 使用9i客戶端exp出9i中的數(shù)據(jù) C:\Documents and Settings\yuechaotian>exp userid=test/test@s9i owner=test file=d:\9i.dmp Export: Release 9.2.0.1.0 - Production on 星期三 2月 20 11:25:04 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
連接到: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production 已導(dǎo)出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集 即將導(dǎo)出指定的用戶...
…… 在沒有警告的情況下成功終止導(dǎo)出。 C:\Documents and Settings\yuechaotian>
-- 3.2 使用10g客戶端imp到10g數(shù)據(jù)庫中
C:\Documents and Settings\yuechaotian>imp userid=test/test@orcl fromuser=test touser=test file=d:\9i.dmp Import: Release 10.2.0.1.0 - Production on 星期三 2月 20 11:28:46 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 經(jīng)由常規(guī)路徑由 EXPORT:V09.02.00 創(chuàng)建的導(dǎo)出文件
已經(jīng)完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的導(dǎo)入 導(dǎo)入服務(wù)器使用 AL32UTF8 字符集 (可能的字符集轉(zhuǎn)換) . . 正在導(dǎo)入表 "AUDIT_ACTIONS"導(dǎo)入了 144 行 …… 成功終止導(dǎo)入, 但出現(xiàn)警告。 C:\Documents and Settings\yuechaotian>
規(guī)則4:從Oracle 低版本的Export數(shù)據(jù)可以Import到Oracle高版本中,但限于Oracle的相鄰版本,如從Oracle 7 到 Oracle 8。對(duì)于兩個(gè)不相鄰版本間進(jìn)行轉(zhuǎn)換,如從Oracle 6 到 Oracle 8,則應(yīng)先將數(shù)據(jù)輸入到中間版本—Oracle 7,再從中間數(shù)據(jù)庫轉(zhuǎn)入更高版本。
--我使用10g的imp功能,可以將由817導(dǎo)出的dmp文件直接導(dǎo)入10g中,這與該規(guī)則的介紹不同。(該規(guī)則出自高道強(qiáng)的《Oracle導(dǎo)入導(dǎo)出工具實(shí)現(xiàn)數(shù)據(jù)庫移植》) C:\Documents and Settings\yuechaotian>imp userid=test/test fromuser=scott touser=test file=d:\tyc.dmp Import: Release 10.2.0.1.0 - Production on 星期三 2月 20 14:03:33 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 經(jīng)由常規(guī)路徑由 EXPORT:V08.01.07 創(chuàng)建的導(dǎo)出文件
警告: 這些對(duì)象由 SCOTT 導(dǎo)出, 而不是當(dāng)前用戶
已經(jīng)完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的導(dǎo)入
導(dǎo)入服務(wù)器使用 AL32UTF8 字符集 (可能的字符集轉(zhuǎn)換) 導(dǎo)出服務(wù)器使用 ZHS16GBK NCHAR 字符集 (可能的 ncharset 轉(zhuǎn)換) . 正在將 SCOTT 的對(duì)象導(dǎo)入到 TEST . . 正在導(dǎo)入表 "ACCOUNT"導(dǎo)入了 5 行 . . 正在導(dǎo)入表 "BONUS"導(dǎo)入了 0 行 . . 正在導(dǎo)入表 "DEPT"導(dǎo)入了 4 行 . . 正在導(dǎo)入表 "EMP"導(dǎo)入了 14 行 . . 正在導(dǎo)入表 "RECEIPT"導(dǎo)入了 1 行 . . 正在導(dǎo)入表 "SALGRADE"導(dǎo)入了 5 行 即將啟用約束條件... 成功終止導(dǎo)入, 沒有出現(xiàn)警告。 C:\Documents and Settings\yuechaotian>
--以上操作,對(duì)于OracleXE的10g版本同樣適用:
C:\Documents and Settings\yuechaotian>imp userid=test/test fromuser=scott touser=test file=d:\tyc.dmp Import: Release 10.2.0.1.0 - Production on 星期三 2月 20 14:15:51 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production 經(jīng)由常規(guī)路徑由 EXPORT:V08.01.07 創(chuàng)建的導(dǎo)出文件
警告: 這些對(duì)象由 SCOTT 導(dǎo)出, 而不是當(dāng)前用戶
已經(jīng)完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的導(dǎo)入
導(dǎo)出服務(wù)器使用 ZHS16GBK NCHAR 字符集 (可能的 ncharset 轉(zhuǎn)換) . 正在將 SCOTT 的對(duì)象導(dǎo)入到 TEST . . 正在導(dǎo)入表 "ACCOUNT"導(dǎo)入了 5 行 . . 正在導(dǎo)入表 "BONUS"導(dǎo)入了 0 行 . . 正在導(dǎo)入表 "DEPT"導(dǎo)入了 4 行 . . 正在導(dǎo)入表 "EMP"導(dǎo)入了 14 行 . . 正在導(dǎo)入表 "RECEIPT"導(dǎo)入了 1 行 . . 正在導(dǎo)入表 "SALGRADE"導(dǎo)入了 5 行 即將啟用約束條件... 成功終止導(dǎo)入, 沒有出現(xiàn)警告。 imp/exp 的導(dǎo)入導(dǎo)出常用:
oracle IMP 命令詳解oracle IMP 命令詳解 原文地址:http://www./bloggermodule/blog_viewblog.do?id=465310 Oracle的導(dǎo)入實(shí)用程序(Import utility)允許從數(shù)據(jù)庫提取數(shù)據(jù),并且將數(shù)據(jù)寫入操作系統(tǒng)文件。imp使用的基本格式:imp[username[/password[@service]]],以下例舉imp常用用法。 1. 獲取幫助
imp help=y 2. 導(dǎo)入一個(gè)完整數(shù)據(jù)庫 imp system/manager file=bible_db log=dible_db full=y ignore=y 3. 導(dǎo)入一個(gè)或一組指定用戶所屬的全部表、索引和其他對(duì)象 imp system/manager file=seapark log=seapark fromuser=seapark imp system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold) 4. 將一個(gè)用戶所屬的數(shù)據(jù)導(dǎo)入另一個(gè)用戶 imp system/manager file=tank log=tank fromuser=seapark touser=seapark_copy imp system/manager file=tank log=tank fromuser=(seapark,amy) touser=(seapark1, amy1) 5. 導(dǎo)入一個(gè)表 imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b) 6. 從多個(gè)文件導(dǎo)入 imp system/manager file=(paycheck_1,paycheck_2,paycheck_3,paycheck_4) log=paycheck, filesize=1G full=y 7. 使用參數(shù)文件 imp system/manager parfile=bible_tables.par bible_tables.par參數(shù)文件: #Import the sample tables used for the Oracle8i Database Administrator's Bible. fromuser=seapark touser=seapark_copy file=seapark log=seapark_import 8. 增量導(dǎo)入 imp system./manager inctype= RECTORE FULL=Y FILE=A 發(fā)表于 @ 2009年05月21日 14:31:00 | 評(píng)論( 0 ) | 編輯| 舉報(bào)| 收藏 舊一篇:關(guān)于Io 異常: The Network Adapter could not establish the connection | 新一篇:社會(huì)生存的75條忠告----勝讀十年書【轉(zhuǎn)】給wangzhuoyan的留言只有注冊(cè)用戶才能發(fā)表評(píng)論!登錄注冊(cè)姓 名:
校驗(yàn)碼: Csdn Blog version 3.1a Copyright © wangzhuoyan 本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/wangzhuoyan/archive/2009/05/21/4206397.aspx
|
|
|