資料庫總結 exp,imp

2021-05-21 20:35:03 字數 2632 閱讀 8716

emp 和 imp的使用

exp

username/username@dbase

file=d:/tmp127.dmp tables=(tmp127) query=/" where rownum < 10 /"

imp

username/username@dbase

file=d:/tmp127.dmp tables=(tmp127)

d:/>exp

username/username@dbase

file=d:/tmp127.dmp tables=(tmp127)

export: release 10.2.0.1.0 - production on 星期一 12月 7 15:57:35 2009

連線到: oracle database 10g enterprise edition release 10.2.0.3.0 - 64bit produc

tion

with the partitioning, olap and data mining options

已匯出 zhs16gbk 字符集和 al16utf16 nchar 字符集

即將匯出指定的表通過常規路徑...

. . 正在匯出表                          tmp127匯出了          11 行

成功終止匯出, 沒有出現警告。

d:/>imp

username/username@dbase

file=d:/tmp127.dmp tables=(temp127)

import: release 10.2.0.1.0 - production on 星期一 12月 7 15:59:11 2009

連線到: oracle database 10g enterprise edition release 10.2.0.3.0 - 64bit produc

tion

with the partitioning, olap and data mining options

經由常規路徑由 export:v10.02.01 建立的匯出檔案

已經完成 zhs16gbk 字符集和 al16utf16 nchar 字符集中的匯入

. 正在將 username 的物件匯入到 username

imp-00033: 警告: 在匯出檔案中未找到表 "temp127"

成功終止匯入, 但出現警告。

d:/>imp

username/username@dbase

file=d:/tmp127.dmp tables=(tmp127)

import: release 10.2.0.1.0 - production on 星期一 12月 7 15:59:49 2009

連線到: oracle database 10g enterprise edition release 10.2.0.3.0 - 64bit produc

tion

with the partitioning, olap and data mining options

經由常規路徑由 export:v10.02.01 建立的匯出檔案

已經完成 zhs16gbk 字符集和 al16utf16 nchar 字符集中的匯入

. 正在將 username 的物件匯入到 username

. 正在將 username 的物件匯入到 username

. . 正在匯入表                        "tmp127"匯入了          11 行

成功終止匯入, 沒有出現警告。

d:/>

**********

在匯入匯出命令中加上feedback=1000可以讓過程顯示乙個不斷增多的「...」,以改變以往的閃爍的游標

new:

exp/imp已經很好用了,但是唯一的確定是速度太慢,如果1張表的資料有個百千萬的,常常匯入匯出就長時間停在這個表這,但是從oracle 10g開始提供了稱為資料幫浦新的工具expdp/impdp,它為oracle資料提供高速並行及大資料的遷移。

imp/exp可以在客戶端呼叫,但是expdp/impdp只能在服務端,因為在使用expdp/impdp以前需要在資料庫中建立乙個directory

create directory dump_test as '/u01/oracle10g';

grant read, write on directory dump_test to piner

然後就可以開始匯入匯出

expdp piner/piner directory=dump_test dumpfile=user.dmp  匯出使用者的資料

expdp piner/piner directory=dump_test dumpfile=table.dmp tables=test1,test2 匯出表資料

impdp piner/piner directory=dump_test dumpfile=user.dmp 匯入該使用者資料

impdp piner/piner directory=dump_test dumpfile=table.dmp  匯出表資料

exp imp資料庫遷移

源系統 雙機熱備 windows 2003 64位 oracle 10.2.0.1 目標系統 rac aix7.1 oracle 11.2.0.1 1 鎖定使用者 2 停止服務後再開啟 目的切斷所有使用者連線 shutdown 開啟服務 startup 4 exp 全庫匯出資料 5 目標庫執行建立表...

oracle 資料庫的exp imp

oracle 資料庫匯出匯入 匯出資料庫 c documents and settings administrator exp username password ip oracleinstance file d dmp owner usename buffer 640000 匯入資料庫 先要建立表...

使用exp imp遷移oracle資料庫

參考部落格 exp imp使用詳解 1.根據使用者匯出匯入 匯出 只匯出某個使用者的資料 exp test test orcl owner coop file data oradata data dbbak data coop exp data 2018.2.23.dmp log data orad...