设为首页 加入收藏

TOP

Oracle expdp/impdp用法
2014-11-24 07:36:44 来源: 作者: 【 】 浏览:0
Tags:Oracle expdp/impdp 用法

1. Go to the oracle server AMX currently used, execute

[oracle@lnxas4-ce2 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 12 07:18:47 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> connect /as sysdba

Connected.

SQL> create or replace directory bakdir as /home/oracle/bak;

Directory created.

SQL> grant read,write on directory bakdir to qsh05;

Grant succeeded.

SQL> exit

/home/oracle/bak is where to save database dump file, and ‘qsh05’ is database username.

2. Make sure /home/oracle/bak is created, then execute

expdp qsh05/qsh05 dumpfile=qsh05.dmp directory=bakdir include=table

‘qsh05/qsh05’ is database username/password, and ‘dumpfile’ is the file name of database dump file, and ‘directory’ is the directory name created in step 1, because only need export table, so add ‘include=table’.

3. If the export is successful, the end of log looks like following,

Dump file set for QSH05.SYS_EXPORT_SCHEMA_01 is:

/home/oracle/bak/qsh05.dmp

Job "QSH05"."SYS_EXPORT_SCHEMA_01" successfully completed at 07:25:30

and go to /home/oracle/bak, there are two files, ‘qsh05.dmp’ and ‘export.log’.

4. Go to the ORACLE server where the AMX wanted to migrate, and create a new user/password in database.

5. Create a new dir, and create a new directory mapping to this dir as step 1.

6. Copy dump file to the dir created in step 5, then execute

impdp new_user/new_pass remap_schema=qsh05:new_user dumpfile=qsh05.dmp directory=new_directory include=table

7. If the import is successful, the end of log looks like following,

Job "QSH07"."SYS_IMPORT_FULL_01" successfully completed at 17:46:55

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Buffer Cache(缓冲区缓存)篇:k.. 下一篇oracle log buffer内部机制以及常..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C++ Lambda表达式保 (2025-12-26 05:49:45)
·C++ Lambda表达式的 (2025-12-26 05:49:42)
·深入浅出 C++ Lambda (2025-12-26 05:49:40)
·C语言指针从入门到基 (2025-12-26 05:21:36)
·【C语言指针初阶】C (2025-12-26 05:21:33)