Heim  >  Artikel  >  Datenbank  >  Oracle 备份、恢复单表或多表数据步骤

Oracle 备份、恢复单表或多表数据步骤

WBOY
WBOYOriginal
2016-06-07 17:27:101528Durchsuche

Oracle 备份、恢复单表或多表数据步骤,适用于 Oracle 8、9、10。

Oracle 备份、恢复单表或多表数据步骤,适用于 Oracle 8、9、10。

*备份单表或多表数据:

exp user/password@server file=filefullpathname log=logfullpathname tables=(tablespacename.table1,tablespacename.table2,...)

例如,作者要导出用户名为 sybj,密码为 sybj,sid 为 lyzz,表空间 sybj 下表 table1、table2 中的数据,win 下 CMD 命令如下:

F:/oralce/ora92/bin>exp sybj/sybj@lyzz file=G:/tmps/test009.tmp log=G:/tmps/test009.log tables=(sybj.table1,sybj.table2)

备份文件 test009.tmp 将会在目录 G:/tmps/ 下生成。

*单表或多表数据恢复:

如果被恢复的表已经存在,应该先将其删除,不然报“IMP-0015”错误,,导入失败。单表或多表数据恢复命令如下:

imp user/password@server file=filefullpathname log=logfullpathname full=y

仍以上面的例子,将 table1、table2 数据恢复,win 下 CMD 命令如下:

F:/oralce/ora92/bin>imp sybj/sybj@lyzz file=G:/tmps/test009.tmp log=G:/tmps/test009imp.log full=y

linux

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn