表何备份oracle 表空间,ORACLE表空间如何备份与恢复?

表空间备份与恢复主要针对于大型数据库中,某个表空间数据变化非常大,增长速度非常快的情况。表空间的备份实现脚本:

run {

allocate channel d1 type disk;

backup tablespace "TEST","USERS" format ’d:\backup\tb_%d_%s_%p_%t’;

release channel d1;

}

恢复时,如果用户是要恢复被删除的表空间中的表或视图,或者是使用者用drop tablespace正常命令删除了表空间,此时控制文件中记录的数据库结构也跟着做了改变,此时只能用不完全恢复,让数据库恢复到以前的一个时间点或SCN。

先恢复控制文件,再恢复表空间。 www。zxbc。cn 自学编程网

Shutdown abort;

Startup nomount;

run {

Allocate channel d1 type disk;

Restore controlfile from ‘d:\backup\CTL_TEST_0_1_6555’;

Release channel d1 ;

Alter database open; //要为打开状态

set until time "TO_DATE(’08/08/2007 10:50:00’,’MM/DD/YYYY HH24:MI:SS’)";

sql ’alter tablespace TEST, USERS offline immediate’;

allocate channel d1 type disk;

restore tablespace

TEST, USERS;

recover tablespace

TEST, USERS;

release channel d1;

sql ’alter tablespace TEST, USERS online’;

}

注意:After you perform TSPITR on a tablespace, you cannot use backups of that tablespace

from before the TSPITR was completed and the tablespace put back on line。

If you

start using the recovered tablespaces without taking a backup, you are running your

database without a usable backup of those tablespaces。

For this example, the users。

全部

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值