[관리] 테이블 스페이스가 삭제되거나 손상시 대처법

##################################################

테이블 스페이스가 삭제되거나 손상시 대처법

에러 상황

/oracle/oradata/ocp 안의 user01.dbf 파일이 손상되거나 지워진 경우

##################################################

—————————————

1. startup mount 까지만 startup

—————————————

SQL> startup mount

ORACLE instance started.

Total System Global Area  235999352 bytes

Fixed Size                   450680 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

————————–

2. 매핑 정보를 확인..

————————–

SQL> ed

Wrote file afiedt.buf

  1  select ts.name, df.name

  2  from v$tablespace ts, v$datafile df

  3* where ts.TS# = df.TS#

SQL>

SQL>

SQL> col NAME format a35

SQL> /

NAME                                NAME

———————————– ———————————–

SYSTEM                              /oracle/oradata/ocp/system01.dbf

UNDOTBS1                            /oracle/oradata/ocp/undotbs01.dbf

CWMLITE                             /oracle/oradata/ocp/cwmlite01.dbf

DRSYS                               /oracle/oradata/ocp/drsys01.dbf

EXAMPLE                             /oracle/oradata/ocp/example01.dbf

INDX                                /oracle/oradata/ocp/indx01.dbf

ODM                                 /oracle/oradata/ocp/odm01.dbf

TOOLS                               /oracle/oradata/ocp/tools01.dbf

USERS                               /oracle/oradata/ocp/users01.dbf

XDB                                 /oracle/oradata/ocp/xdb01.dbf

10 rows selected.

———————————-

3. 마운트 정보 해제

———————————-

SQL> alter database datafile ‘/oracle/oradata/ocp/users01.dbf’ offline drop

Database altered.

——————————-

4. database를 open한다.

——————————-

SQL> alter database open;

Database altered.

————————–

5. 테이블 지우기

————————–

SQL> drop tablespace users;

Tablespace dropped.

——————————–

6. shutdown 한다.

——————————–

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

———————————-

7. 다시 startup하면 끄읏~

———————————-

SQL> startup

ORACLE instance started.

Total System Global Area  235999352 bytes

Fixed Size                   450680 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

Database mounted.

Database opened.

SQL>

————————————————————————————-

oracle s/w에서 tablespace를 삭제후 os상의

datafile를 지워주는 것이 원칙(순서)이다.

– 그 외의 경우 startup시 에러가 발생한다.

그럼 위와 같이 대처하면 된다.

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

2 Responses

  1. 2022년 6월 20일

    1secrete

  2. 2023년 1월 27일

    3detest

페이스북/트위트/구글 계정으로 댓글 가능합니다.