1. 它是操作系統(tǒng)下一個(gè)可執(zhí)行的文件 存放目錄/ORACLE_HOME/bin
?? exp導(dǎo)出工具將數(shù)據(jù)庫中數(shù)據(jù)備份壓縮成一個(gè)二進(jìn)制系統(tǒng)文件.可以在不同OS間遷移
??
?? 它有三種模式:
?????? a.? 用戶模式: 導(dǎo)出用戶所有對(duì)象以及對(duì)象中的數(shù)據(jù);
?????? b.? 表模式: 導(dǎo)出用戶所有表或者指定的表;
?????? c.? 整個(gè)數(shù)據(jù)庫: 導(dǎo)出數(shù)據(jù)庫中所有對(duì)象。
$exp test/test123@appdb
Enter array fetch buffer size: 4096 > 回車
Export file: expdat.dmp > m.dmp? 生成導(dǎo)出的文件名
(1)E(ntire database), (2)U(sers), or (3)T(ables): (2)U > 3
Export table data (yes/no): yes > 回車
Compress extents (yes/no): yes > 回車
Export done in ZHS16GBK character set and ZHS16GBK NCHAR character set
About to export specified tables via Conventional Path ...
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > cmamenu? 要導(dǎo)出的表名
. . exporting table??????????????????????? CMAMENU?????? 4336 rows exported
Table(T) or Partition(T:P) to be exported: (RETURN to quit) >要導(dǎo)出的表名n
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > 回車
Export terminated successfully without warnings.
1. 它是操作系統(tǒng)下一個(gè)可執(zhí)行的文件 存放目錄/ORACLE_HOME/bin
imp導(dǎo)入工具將EXP形成的二進(jìn)制系統(tǒng)文件導(dǎo)入到數(shù)據(jù)庫中.
?? 它有三種模式:
?????? a.? 用戶模式: 導(dǎo)出用戶所有對(duì)象以及對(duì)象中的數(shù)據(jù);
?????? b.? 表模式: 導(dǎo)出用戶所有表或者指定的表;
?????? c.? 整個(gè)數(shù)據(jù)庫: 導(dǎo)出數(shù)據(jù)庫中所有對(duì)象。
??????
?? 只有擁有IMP_FULL_DATABASE和DBA權(quán)限的用戶才能做整個(gè)數(shù)據(jù)庫導(dǎo)入
??
?? imp步驟:
?? (1) create table? (2) insert data? (3) create index (4) create triggers,constraints
2.導(dǎo)入工具imp交互式命令行方式的例子
$ imp
Import: Release 8.1.6.0.0 - Production on 星期五 12月 7 17:01:08 2001
(c) Copyright 1999 Oracle Corporation.? All rights reserved.
用戶名:? test
口令:****
連接到: Oracle8i Enterprise Edition Release 8.1.6.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
導(dǎo)入文件: expdat.dmp> /tmp/m.dmp
輸入插入緩沖區(qū)大小(最小為 8192 ) 30720>
經(jīng)由常規(guī)路徑導(dǎo)出由EXPORT:V08.01.06創(chuàng)建的文件
警告: 此對(duì)象由 TEST 導(dǎo)出, 而不是當(dāng)前用戶
已經(jīng)完成ZHS16GBK字符集和ZHS16GBK NCHAR 字符集中的導(dǎo)入
只列出導(dǎo)入文件的內(nèi)容(yes/no):no>
由于對(duì)象已存在, 忽略創(chuàng)建錯(cuò)誤(yes/no):no> yes
導(dǎo)入權(quán)限(yes/no):yes>
導(dǎo)入表數(shù)據(jù)(yes/no):yes>
導(dǎo)入整個(gè)導(dǎo)出文件(yes/no):no> yes
. 正在將TEST的對(duì)象導(dǎo)入到 SCOTT
. . 正在導(dǎo)入表?????????????????????? "CMAMENU"?????? 4336行被導(dǎo)入
成功終止導(dǎo)入,但出現(xiàn)警告。
imp userid=system/password fromuser=olddbuser touser=newdbuser
?? exp導(dǎo)出工具將數(shù)據(jù)庫中數(shù)據(jù)備份壓縮成一個(gè)二進(jìn)制系統(tǒng)文件.可以在不同OS間遷移
??
?? 它有三種模式:
?????? a.? 用戶模式: 導(dǎo)出用戶所有對(duì)象以及對(duì)象中的數(shù)據(jù);
?????? b.? 表模式: 導(dǎo)出用戶所有表或者指定的表;
?????? c.? 整個(gè)數(shù)據(jù)庫: 導(dǎo)出數(shù)據(jù)庫中所有對(duì)象。
$exp test/test123@appdb
Enter array fetch buffer size: 4096 > 回車
Export file: expdat.dmp > m.dmp? 生成導(dǎo)出的文件名
(1)E(ntire database), (2)U(sers), or (3)T(ables): (2)U > 3
Export table data (yes/no): yes > 回車
Compress extents (yes/no): yes > 回車
Export done in ZHS16GBK character set and ZHS16GBK NCHAR character set
About to export specified tables via Conventional Path ...
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > cmamenu? 要導(dǎo)出的表名
. . exporting table??????????????????????? CMAMENU?????? 4336 rows exported
Table(T) or Partition(T:P) to be exported: (RETURN to quit) >要導(dǎo)出的表名n
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > 回車
Export terminated successfully without warnings.
1. 它是操作系統(tǒng)下一個(gè)可執(zhí)行的文件 存放目錄/ORACLE_HOME/bin
imp導(dǎo)入工具將EXP形成的二進(jìn)制系統(tǒng)文件導(dǎo)入到數(shù)據(jù)庫中.
?? 它有三種模式:
?????? a.? 用戶模式: 導(dǎo)出用戶所有對(duì)象以及對(duì)象中的數(shù)據(jù);
?????? b.? 表模式: 導(dǎo)出用戶所有表或者指定的表;
?????? c.? 整個(gè)數(shù)據(jù)庫: 導(dǎo)出數(shù)據(jù)庫中所有對(duì)象。
??????
?? 只有擁有IMP_FULL_DATABASE和DBA權(quán)限的用戶才能做整個(gè)數(shù)據(jù)庫導(dǎo)入
??
?? imp步驟:
?? (1) create table? (2) insert data? (3) create index (4) create triggers,constraints
2.導(dǎo)入工具imp交互式命令行方式的例子
$ imp
Import: Release 8.1.6.0.0 - Production on 星期五 12月 7 17:01:08 2001
(c) Copyright 1999 Oracle Corporation.? All rights reserved.
用戶名:? test
口令:****
連接到: Oracle8i Enterprise Edition Release 8.1.6.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
導(dǎo)入文件: expdat.dmp> /tmp/m.dmp
輸入插入緩沖區(qū)大小(最小為 8192 ) 30720>
經(jīng)由常規(guī)路徑導(dǎo)出由EXPORT:V08.01.06創(chuàng)建的文件
警告: 此對(duì)象由 TEST 導(dǎo)出, 而不是當(dāng)前用戶
已經(jīng)完成ZHS16GBK字符集和ZHS16GBK NCHAR 字符集中的導(dǎo)入
只列出導(dǎo)入文件的內(nèi)容(yes/no):no>
由于對(duì)象已存在, 忽略創(chuàng)建錯(cuò)誤(yes/no):no> yes
導(dǎo)入權(quán)限(yes/no):yes>
導(dǎo)入表數(shù)據(jù)(yes/no):yes>
導(dǎo)入整個(gè)導(dǎo)出文件(yes/no):no> yes
. 正在將TEST的對(duì)象導(dǎo)入到 SCOTT
. . 正在導(dǎo)入表?????????????????????? "CMAMENU"?????? 4336行被導(dǎo)入
成功終止導(dǎo)入,但出現(xiàn)警告。
imp userid=system/password fromuser=olddbuser touser=newdbuser