ORACLE 10G expdp/impdp
--兩庫tablespace要一樣
c:>expdp help=y
c:>impdp help=y
SQL> create directory exp_dump as 'd:exp_dump';
SQL> grant read, write on directory exp_dump to ...
If you want to Import all the objects in a dump file then you can type the following command.
$impdp hr/hr DUMPFILE=dpump_dir1:expfull.dmp FULL=y
LOGFILE=dpump_dir2:full_imp.log
The following example loads all tables belonging to hr schema to scott schema
$impdp SYSTEM/password DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp REMAP_SCHEMA=hr:scott
If SCOTT account exist in the database then hr objects will be loaded into scott schema. If scott account does not exist, then Import Utility will create the SCOTT account with an unusable password because, the dump file was exported by the user SYSTEM and imported by the user SYSTEM who has DBA privileges.
You can use remap_tablespace option to import objects of one tablespace to another tablespace by giving the command
$impdp SYSTEM/password DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp REMAP_TABLESPACE=users:sales
The above example loads tables, stored in users tablespace, in the sales tablespace.
Importing objects of only a Particular Schema
If you have the IMP_FULL_DATABASE role, you can use this parameter to perform a schema-mode import by specifying a single schema other than your own or a list of schemas to import. First, the schemas themselves are created (if they do not already exist), including system and role grants, password history, and so on. Then all objects contained within the schemas are imported. Nonprivileged users can specify only their own schemas. In that case, no information about the schema definition is imported, only the objects contained within it.
The following is an example of using the SCHEMAS parameter. You can create the expdat.dmp file used in this example by running the example provided for the Export SCHEMAS parameter.
$impdp hr/hr SCHEMAS=hr,oe DIRECTORY=dpump_dir1 LOGFILE=schemas.log
DUMPFILE=expdat.dmp
The hr and oe schemas are imported from the expdat.dmp file. The log file, schemas.log, is written to dpump_dir1
Importing Only Particular Tables
The following example shows a simple use of the TABLES parameter to import only the employees and jobs tables from the expfull.dmp file. You can create the expfull.dmp dump file used in this example by running the example provided for the Full Database Export in Previous Topic.
$impdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmp TABLES=employees,jobs
This will import only employees and jobs tables from the DUMPFILE.
Similar to the DATA PUMP EXPORT utility the Data Pump Import Jobs can also be suspended, resumed or killed. And, you can attach to an already existing import job from any client machine.
For Example, suppose a DBA starts a importing by typing the following command at one client machine CLNT1 by typing the following command
$impdp scott/tiger@mydb FULL=y DIRECTORY=data_pump_dir
DUMPFILE=full.dmp LOGFILE=myfullexp.log JOB_NAME=myfullJob
After some time, the DBA wants to stop this job temporarily. Then he presses CTRL+C to enter into interactive mode. Then he will get the Import> prompt where he can type interactive commands
Now he wants to stop this export job so he will type the following command
Import> STOP_JOB=IMMEDIATE
Are you sure you wish to stop this job ([y]/n): y
The job is placed in a stopped state and exits the client.
After finishing his other work, the DBA wants to resume the export job and the client machine from where he actually started the job is locked because, the user has locked his/her cabin. So now the DBA will go to another client machine and he reattach to the job by typing the following command
$impdp hr/hr@mydb ATTACH=myfulljob
After the job status is displayed, he can issue the CONTINUE_CLIENT command to resume logging mode and restart the myfulljob job.
Import> CONTINUE_CLIENT
A message is displayed that the job has been reopened, and processing status is output to the client.
Note: After reattaching to the Job a DBA can also kill the job by typing KILL_JOB, if he doesn’t want to continue with the import job.
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9907339/viewspace-1037827/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- expdp&impdp For Oracle 10GOracle 10g
- oracle 10g imp/exp IMPDP/EXPDPOracle 10g
- oracle 10g expdp-impdp解讀Oracle 10g
- oracle expdp and impdpOracle
- oracle expdp/impdp用法Oracle
- ORACLE expdp/impdp詳解Oracle
- Oracle expdp/impdp 使用示例Oracle
- Oracle 10g expdp/impdp的CONTENT選項體驗Oracle 10g
- oracle expdp和impdp使用例子Oracle
- Oracle10g expdp & impdpOracle
- oracle資料庫的impdp,expdpOracle資料庫
- oracle EXPDP/IMPDP 常用命令Oracle
- Oracle 邏輯備份 expdp/impdpOracle
- 10g 資料泵(Data Dump) -- EXPDP & IMPDP [zt]
- impdp/expdp 示例
- oracle匯入匯出之expdp/impdpOracle
- Oracle expdp impdp dump引數介紹Oracle
- Oracle 傳輸表空間-EXPDP/IMPDPOracle
- ORACLE EXPDP IMPDP 中停止和啟動Oracle
- oracle實驗記錄 (expdp/impdp使用)Oracle
- 【EXPDP/IMPDP】使用 EXPDP/IMPDP工具“模糊”匯出和匯入
- oracle實驗記錄 (transport tablespace(EXPDP/IMPDP))Oracle
- Expdp Impdp詳解
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- EXPDP/IMPDP工具的使用
- expdp/impdp 用法詳解
- expdp/impdp操作例項
- expdp, impdp characteristic 特性--索引索引
- Expdp,impdp工具的使用
- 將partition expdp後impdp
- expdp/impdp用法詳解
- expdp/impdp 使用總結
- 10g跨小版本的expdp/impdp表空間遷移(一)
- ORACLE EXPDP IMPDP 的停止和啟動及監控Oracle
- Oracle使用資料泵 (expdp/impdp)實施遷移Oracle
- Oracle的expdp/impdp工具和exp/imp工具比較Oracle
- Oracle expdp/impdp 從高版本 到 低版本 示例Oracle
- 10G資料泵載入命令expdp/impdp的引數說明