明月松间照 清泉石上流


                                        ——— 兵临城下   猫科动物
posts - 70, comments - 137, trackbacks - 0, articles - 23
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

oracle命令:exp、imp

Posted on 2008-05-09 15:26 兵临城下 阅读(404) 评论(0)  编辑  收藏 所属分类: J2SE
今天使用orcle的备份和恢复命令:

备份数据
1、获取帮助:
    exp help=y
2. 导出一个完整数据库
     exp user/pwd@instance file=path full=y
    示例:exp system/system@xc file = c:/hehe fill =y
3 、导出一个或一组指定用户所属的全部表、索引和其他对象
    exp system/manager file=seapark log=seapark owner=seapark exp system/manager file=seapark log=seapark owner=(seapark,amy,amyc,harold)
    示例:exp system/system@xc file=c:/hehe owner=uep
4、导出一个或多个指定表
    exp system/manager file=tank log=tank tables=(seapark.tank,amy.artist)
    示例:exp system/system@xc file=c:/heh tables=(ueppm.ne_table)


恢复数据

1. 获取帮助

 imp help=y

2. 导入一个完整数据库

 imp system/manager file=bible_db log=dible_db full=y ignore=y

3. 导入一个或一组指定用户所属的全部表、索引和其他对象

 imp system/manager file=seapark log=seapark fromuser=seapark 
imp
system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold)

4. 将一个用户所属的数据导入另一个用户

 imp system/manager file=tank log=tank fromuser=seapark touser=seapark_copy
 imp system/manager file=tank log=tank fromuser=(seapark,amy) touser=(seapark1, amy1)

5. 导入一个表

 imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b)



只有注册用户登录后才能发表评论。


网站导航: