ITPub博客

首页 > Linux操作系统 > Linux操作系统 > read only tablespace recovery

read only tablespace recovery

原创 Linux操作系统 作者:dla001 时间:2011-05-17 14:09:32 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-04-28

  • 博文量
    40
  • 访问量
    49049