• 검색 결과가 없습니다.

사용자 테이블스페이스를 구성하는 datafile 유실 디스크가 유실

N/A
N/A
Protected

Academic year: 2022

Share "사용자 테이블스페이스를 구성하는 datafile 유실 디스크가 유실 "

Copied!
5
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

아카이브 완전 복구

사용자 테이블스페이스를 구성하는 datafile 유실 디스크가 유실

단계 1 정상적인 업부 수행

[oracle@localhost ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 8 04:36:02 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning and Oracle Data Mining options

JServer Release 10.2.0.1.0 - Production

단계2 이스크 유실 여기서 디스크유실이란 하드에러 즉 유저스페이스파일이 있는 하드 에러

SQL> host

[oracle@localhost ~]$ rm -rf /u01/app/oracle/oradata/orcl/users01.dbf [oracle@localhost ~]$ exit

exit

단계 3 문제 상황 파악

SQL> shutdown abort;

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Database mounted.

ORA-01157: cannot identify/lock data file 9 - see DBWR trace file ORA-01110: data file 9: '/u01/app/oracle/oradata/orcl/users01.dbf'

단계 3 평상시 라면 그냥 복원하면 돈다. 문제는 지금 유저 테이블스페이스가 있는 디스크가 나간거다 그래서 복사를 할 수 없다. 그래서 다른 지점 즉 다른 마운트 지점에 백업 복을 복사해 된것이다.

SQL> host

[oracle@localhost ~]$ mkdir /oracle/oradata/crash/

[oracle@localhost ~]$

[oracle@localhost ~]$ cp /oracle/oradata/onbackup/users01.dbf /oracle/oradata/crash/

[oracle@localhost ~]$ exit exit

SQL>

(2)

단계 4 테이블 스페이스 상태 확인

SQL> select 2 d.file#

3 ,d.name 4 ,d.status 5 ,h.status

6 from v$datafile d, v$datafile_header h 7 where d.file# = h.file#

8 ; 9

/u01/app/oracle/oradata/orcl/users01.dbf ONLINE ONLINE

11 rows selected.

SQL> save dh.sql Created file

단계 5 일단 문제 있는 유저테이블 스페이스를 오프 라인 시키고 디비를 정상 작동시킨다.

SQL> alter database datafile '/u01/app/oracle/oradata/orcl/users01.dbf' offline;

Database altered.

SQL> @dh 9

/u01/app/oracle/oradata/orcl/users01.dbf RECOVER OFFLINE

11 rows selected.

SQL> alter database open;

Database altered.

단계 6 참 웃긴 것이 다시 커져있다. 왜일까?

SQL> select

2 tablespace_name 3 ,status

4 from dba_tablespaces;

TABLESPACE_NAME STATUS

(3)

--- --- SYSTEM ONLINE

UNDOTBS1 ONLINE TEMP ONLINE CWMLITE ONLINE DRSYS ONLINE EXAMPLE ONLINE INDX ONLINE ODM ONLINE TOOLS ONLINE USERS ONLINE XDB ONLINE QUERY_DATA READ ONLY

12 rows selected.

SQL> save dt.sql;

Created file dt.sql SQL>

단계 7 다시 오프라인 시키고 복구작업 수행

SQL> alter tablespace users offline immediate;

Tablespace altered.

 이것이 핵심인디 그렇다 테이블스페이스의 위치를 재입력한것이다.

SQL> alter tablespace users

2 rename datafile '/u01/app/oracle/oradata/orcl/users01.dbf' 3 to '/oracle/oradata/crash/users01.dbf'

4 /

Tablespace altered.

SQL> recover tablespace users;  그렇다 변경사항을 복구하야한다..

ORA-00279: change 239781 generated at 08/08/2007 04:07:09 needed for thread 1 ORA-00289: suggestion : /oracle/oradata/archive/arch_4.arc

ORA-00280: change 239781 for thread 1 is in sequence #4

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

auto

ORA-00279: change 240025 generated at 08/08/2007 04:08:42 needed for thread 1

(4)

ORA-00289: suggestion : /oracle/oradata/archive/arch_5.arc ORA-00280: change 240025 for thread 1 is in sequence #5

ORA-00278: log file '/oracle/oradata/archive/arch_4.arc' no longer needed for this recovery

Log applied.

Media recovery complete.

SQL>

단계 8 더 복구할 파일이 있는지 확인한다.

SQL> select * from v$recover_file;

no rows selected

SQL>

단계 9 테이블 스페이스를 온라인 시킨다. 복구하건지 작동시킨 것이 아니다.

SQL> @dt

TABLESPACE_NAME STATUS

--- --- DRSYS ONLINE

EXAMPLE ONLINE INDX ONLINE ODM ONLINE TOOLS ONLINE USERS OFFLINE XDB ONLINE 12 rows selected.

SQL> alter tablespace users online;

Tablespace altered.

단계 10 최종 상태 확인 및 점검

QL> @dt

TABLESPACE_NAME STATUS

--- --- SYSTEM ONLINE

UNDOTBS1 ONLINE TEMP ONLINE CWMLITE ONLINE

(5)

DRSYS ONLINE EXAMPLE ONLINE INDX ONLINE ODM ONLINE TOOLS ONLINE USERS ONLINE XDB ONLINE 12 rows selected.

참조

관련 문서

To identify the diagnostic potential of miRNAs in prostate cancer, we downloaded the miRNA expression profile of prostate cancer from the GEO database and analysed

COVID-19 International Collaborative Research by the Health Insurance Review and Assessment Service Using Its Nationwide Real-world Data: Database, Outcomes,

The wheat samples used in this study were sourced over different locations, years and growing conditions to create a wheat sample database with wide ranging chemical

Source: OECD, System of National Accounts database; Datastream; Markit Economics Limited; OECD Economic Outlook 87 database; and OECD Indicator

The trends observed from the results of both survivability and serviceability conditions may be explained by the fol- lowing points: a) wake-induced effects may be relevant in

56726 Unsigned Unsigned Unsigned 24 Unsigned Unsigned Unsigned Unsigned Unsigned 56727 Unsigned Unsigned Unsigned 24 Unsigned Unsigned Unsigned Unsigned Unsigned 56728

▪ 클래스 MyContainer&lt;E&gt;는 원소로 일반화 유형을 지원하는 클래스로 정의. • E는 MyContainer를 구성하는

개발의 디자인 및 분석 단계에서, MDA (Model Driven Architecture) 는 개념적인 모델을 코드로 자동 변형시켜주고, 구축 단계에 서는, Oracle Forms Developer 와 Oracle JDeveloper