문제

I have a datafile in a recover state:

SQL> select status from v$datafile where file#=201;

STATUS
---------------------
RECOVER

I'm not really sure how it was damaged, looks like something went wrong right after its creation time.

SQL> select creation_change#,creation_time,checkpoint_change#,checkpoint_time,last_change#,last_time
from v$datafile where file#=201;

CREATION_CHANGE# CREATION_TIME       CHECKPOINT_CHANGE# CHECKPOINT_TIME      LAST_CHANGE# LAST_TIME
---------------- ------------------- ------------------ ------------------- ------------- -------------------
    141311481693 29/08/2019 16:54:57       141311481694 29/08/2019 16:54:57  141311481738 29/08/2019 16:55:15

I've checked every table in a tablespace this file belong to and everything seemd OK. First I tried SELECT /*+ FULL(t) */ count(*) from table_name; for every table, then I tried ANALYZE TABLE table_name VALIDATE STRUCTURE;. No errors.

I'm pretty sure there is no option to drop an offline/recover datafile. Or is there?

I have one thought in my mind: create a new tablespace, move all objects there and then recreate the TS with a failed datafile in it. Then move everything back. Is this OK thing to do? Or am I missing something?

Please advice.

도움이 되었습니까?

해결책

I moved all my data to new tablespace and then recreated old one and moved everything back. Everything seems in order, no data loss.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top