Temporary Tablespace의 복구방법
SVRMGR> startup <------오라클 스타트
ORACLE instance started.
Total System Global Area 137011360 bytes
Fixed Size 73888 bytes
Variable Size 56926208 bytes
Database Buffers 79839232 bytes
Redo Buffers 172032 bytes
Database mounted.
Database opened.
SVRMGR> select tablespace_name,file_name from dba_data_files;
데이타파일의 경로를 확인한다.
TABLESPACE_NAME FILE_NAME
------------------------------ -------------------------------------------------
-------------------------------
TOOLS /home/oracle/oradata/RUSH/tools01.dbf
DRSYS /home/oracle/oradata/RUSH/drsys01.dbf
USERS /home/oracle/oradata/RUSH/users01.dbf
INDX /home/oracle/oradata/RUSH/indx01.dbf
RBS /home/oracle/oradata/RUSH/rbs01.dbf
TEMP /home/oracle/oradata/RUSH/temp01.dbf
SYSTEM /home/oracle/oradata/RUSH/system01.dbf
BACKRUSH /home/oradata/data01.dbf
8 rows selected.
SVRMGR> !ls -la /home/oracle/oradata/RUSH/temp01.dbf
-rw-r----- 1 oracle dba 20979712 11월 18일 12:54 /home/oracle/oradata/RUSH/temp01.dbf
temp01.dbf파일의 크기를 확인한다.
SVRMGR>
SVRMGR> shutdown abort
ORACLE instance shut down.
SVRMGR> !mv /home/oracle/oradata/RUSH/temp01.dbf /tmp
temp01.dbf파일을 tmp디렉토리로 옮겨 fault를 야기시킨다.
SVRMGR> startup;
ORACLE instance started.
Total System Global Area 137011360 bytes
Fixed Size 73888 bytes
Variable Size 56926208 bytes
Database Buffers 79839232 bytes
Redo Buffers 172032 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/home/oracle/oradata/RUSH/temp01.dbf'
SVRMGR> alter database datafile '/home/oracle/oradata/RUSH/temp01.dbf' offline drop;
Statement processed.
temp01.dbf파일을 offline 시킨다고 명령을 준다.
SVRMGR> alter database open;
Statement processed.
정상적으로 데이타베이스의 오픈을 확인한다.
SVRMGR> drop tablespace temp including contents;
Statement processed.
이제 템프 테이블 스페이스를 삭제하구 다시만들자.
SVRMGR> create tablespace temp
2> datafile '/home/oracle/oradata/RUSH/temp01.dbf' size 20M;
Statement processed.
SVRMGR> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR> startup
ORACLE instance started.
Total System Global Area 137011360 bytes
Fixed Size 73888 bytes
Variable Size 56926208 bytes
Database Buffers 79839232 bytes
Redo Buffers 172032 bytes
Database mounted.
Database opened.
SVRMGR>
|