read only tablespace recovery

本文详细介绍了Oracle 10g R2数据库中不同场景下的读写与只读备份及恢复过程,包括删除备份、创建表、插入数据、更改表空间状态等操作,并给出了具体步骤来解决恢复过程中遇到的问题。

oracle 10GR2:

incomplete recover:

case1:    read-only    backup    read-only    recover

case2:    read-only    backup    read-write    recover

case3:    read-write    backup   read-only    recover

-----------------------------------------

case 3

-----------------------------------------

1.delete backup

2.create table on tablespace xx

3.insert into table ,commit,record time T1

5.alter system switch logfile

6.insert into table, commit, record time T2

7.alter tablespace xx read only , record time T3

8.other operations

shutdown

rm files of tablespace xx

recover to T3.

then it will return error: restore will skip  read only files,i can not restore read only tablespace, i use restore tablespace xx until time(this must use aux database,so the command not ok,u can not recover one tablespace to a point,because this can cause the scn in files are not the same) but after that,it will return error when recover .

1.re-create control files

2.restore the corrcet version of controlfiles. (before the tablespace is read only)

run {

set until time = T1

restore controlfile to 'new'

}

alter system set control_files='new' scope=spfile;

restart database to mount;

run {

set until time = T3

restore database;

recover database;

alter database open resetlogs;

}

then recover is ok .

and the tablespace is in  "read only" status

***********************************************************************************************

complete recover:

restore skips the read only files;

case1:    read-only    backup    read-only    recover

case2:    read-only    backup    read-write    recover

case3:    read-write    backup   read-only    recover

------------------------------------------

case 3:

------------------------------------------

steps:

1.rman : delete backup;

2.create table and insert data,commit

3.backup

4.alter tablesapce xx read only;

5.rm files of tablespace xx

6.online restore/recover tablespace xx

step 6 will return error like :can not get exclude on file xxx

7.alter database datafile xx offline;

then restore and recover will perform.

if u use restore database ,it will skip read only tablespace;

-----------------------------------

case 1

------------------------------------

1.delete backup

2.alter tablespace xx read only

3.backup

4.rm files of tablespace xx

5.online restore

6.online recover

when i perform. online restore ,it tells me datafile n already restored to xxxx

then :

SQL:shutdown immediate

SQL:startup mount

RMAN:restore /recover tablespace xx;

RMAN:alter database open;

it will be ok .

------------------------------------

case 2

------------------------------------

can online restore;

 

----other command:

RESTORE DATABASE CHECK READONLY;

 

============================================================

the following is the past test;

i got a error:

ORA-00600: internal error code, arguments: [3631], [4], [4230], [1077952513], [], [], [], []

i do not know how this error occured,then i restore the controlfile ,the error disappeared. ??

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12807983/viewspace-695571/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12807983/viewspace-695571/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值