| |
关于Oracle的逻辑备份,应用exp/imp和expdp/impdp的一些差别。

常用命令操作
A: exp/imp的使用 (服务器端和客户端都可以执行。并且备份文件可以在客户端产生。)

exp user/password@servicename file=dump.dmp
imp user/password@servicename fromuser=fuser touser=tuser file=dump.dmp


2: expdp/impdp的使用 (服务器端和客户端都可以执行。备份文件只能存在服务器里面。)

I:在使用expdp导出时在Oracle需要定义目录变量,在导出的时候需要制定这个变量。如果可以,你可以为每个用户都建立一个单独的备份目录。
SQL>create directory dmpdir_user1 as '/home/oracle/backup';
SQL>grant read,write on directory dmpdir_user1 to user1;
对了,操作系统内必须创建这个目录。在SQL命令行下,并不会产生这个目录的。
[oracle@kook ~]$ mkdir backup
如果你没有制定这个目录的话,默认exp导出存放的目录是$HOME/rdbms/log里面。至少我的是这样。很奇怪,为什么在这里。

II:执行导出导入命令
expdp user1/password@servicename schemas=user1 directory=dmpdir_user1 dumpfile=user1.dmp
impdp user2/password@servicename directory=dmpdir_user1 dumpfile=user1.dmp remap_schema=user1:user2 remap_tablespace=user1ts:user2ts
使用expdp/impdp最大的好处可以让我转换表空间。而exp/imp这个是不支持的。处理起来非常麻烦。


就是这样了。没有什么东西。四个命令的帮助参数可以通过command help=y来进行查看。

本文链接:http://www.52zhe.cn/read.php/150.htm
本文作者:kook(若就博客内所涉及的技术问题交流,请用下面的MSN或Gmail联系我)
联系方式:(MSN:kook#live.com) (Google talk:kookliu)
没有版权:GNU,转载时请注明“转载人”欠本人一顿饭,来日见面之时兑现!谢谢合作!
by kook | 分类: Oracle | 评论(0) | 引用(0) | 阅读(1743)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]