• 검색 결과가 없습니다.

아카이브

N/A
N/A
Protected

Academic year: 2022

Share "아카이브"

Copied!
4
0
0

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

전체 글

(1)

아카이브 불완전 백업  컨트롤 파일을 이용한 복구 Drop 된 테이블 스페이스를 복원

- 관리자가 테이블 스페이스를 삭제했다. 하지만 테이블 스페이스 삭제 정보는 alret log 에 남는다. 그러므로 이것을 이용해서 시간 기반 백업을 할 수 있다.

- 현재 리두 로그 파일에는 사용자 테이블 스페이스의 대한 정보가 없으므로 백업의 컨트롤 파일을 사용할수 없다. 그래서 바로 직전 백업 컨트롤 파일을 사용한다.

단계 1 정상 종료 후 전체 백업 불완전 백업은 전체 백업본이 생명이다.

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

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 9 04:55:01 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup Database opened.

SQL> shutdown;

ORACLE instance shut down.

SQL>

[oracle@localhost ~]$ rm -rf /oracle/oradata/backup/*

[oracle@localhost ~]$ rm -rf /oracle/oradata/onbackup/*

[oracle@localhost ~]$ cp /u01/app/oracle/oradata/orcl/* /oracle/oradata/backup/

단계 2 정상적인 업무 중 컨트롤 파일 백업

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

SQL> startup Database opened.

SQL> r

1 alter database backup

2* controlfile to '/oracle/oradata/onbackup/bak_control.bak' reuse

Database altered.

단계 3 유저 스페이스 삭제

(2)

SQL> drop tablespace users including contents and datafiles cascade constraints;

Tablespace dropped.

단계 3 백업 정보 확인

SQL> show parameter background_dump_dest  경고 파일 위치 확인

NAME TYPE

--- --- VALUE

---

background_dump_dest string /u01/app/oracle/admin/orcl/bdump

SQL>

SQL> host

[oracle@localhost ~]$ vi /u01/app/oracle/admin/orcl/bdump/alert_orcl.log  경고파일에서 삭제시간 확인

drop tablespace users including contents and datafiles cascade constraints Thu Aug 9 05:08:12 2007

Deleted file /u01/app/oracle/oradata/orcl/users01.dbf

Completed: drop tablespace users including contents and dataf

SQL> select * from v$controlfile;  컨트롤 파일 위치 확인

STATUS

--- NAME

--- /u01/app/oracle/oradata/orcl/control01.ctl

/u01/app/oracle/oradata/orcl/control02.ctl /u01/app/oracle/oradata/orcl/control03.ctl

단계 4 불완전 백업 시작 컨트롤 파일 복사와 데이터 파일 복사

살무에서는 항상 여기에서 전백업과 현재 상태를 다 백업해야 한다. 그래야 문제 발생시 이 상태로 돌아갈수 있다………

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

(3)

SQL> host

[oracle@localhost ~]$ cp /oracle/oradata/onbackup/bak_control.bak /u01/app/oracle/oradata/orcl/control01.ctl [oracle@localhost ~]$ cp /oracle/oradata/onbackup/bak_control.bak /u01/app/oracle/oradata/orcl/control02.ctl [oracle@localhost ~]$ cp /oracle/oradata/onbackup/bak_control.bak /u01/app/oracle/oradata/orcl/control03.ctl [oracle@localhost ~]$ cp /oracle/oradata/backup/*.dbf /u01/app/oracle/oradata/orcl/

[oracle@localhost ~]$ exit exit

SQL> startup mount Database mounted.

단계 5 복구 작업 실행 및 문제 점 해결

SQL> recover database until time '2007-8-9:05:07:00' using backup controlfile;  시간은 삭제 전시간으로 ORA-00279: change 264621 generated at 08/09/2007 04:55:30 needed for thread 1

ORA-00289: suggestion : /oracle/oradata/archive/arch_8.arc ORA-00280: change 264621 for thread 1 is in sequence #8 Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

auto

ORA-00308: cannot open archived log '/oracle/oradata/archive/arch_8.arc' ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory Additional information: 3

ORA-00308: cannot open archived log '/oracle/oradata/archive/arch_8.arc' ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory Additional information: 3

SQL> alter database open resetlogs;  그렇다 이후이에는 반드시 백업을 해야 한다. 전 백업은 못쓴다.

Database altered.

SQL>

SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARCHIV --- --- --- --- --- --- STATUS FIRST_CHANGE# FIRST_TIM

--- --- --- 1 1 1 104857600 2 NO

CURRENT 264622 09-AUG-07

(4)

2 1 0 104857600 2 YES UNUSED 0

3 1 0 104857600 2 YES UNUSED 0

SQL> r - 먼가 이상하다. 아이고 임시테이블 스페이스가 문제 있다. 그렇다 임시테이블 스페이스는 백업의 대상이 아니다. 다시 만들어야 한다.

1 select 2 name 3 ,status

4* from v$tempfile

no rows selected

SQL> create temporary tablespace temp2

2 tempfile '/u01/app/oracle/oradata/orcl/temp2.dbf' size 10M;

Tablespace created.

SQL> alter database default temporary tablespace temp2;

Database altered.

SQL> drop tablespace temp including contents and datafiles;

Tablespace dropped.

SQL> select * from v$tempfile;

FILE# CREATION_CHANGE# CREATION_ TS# RFILE# STATUS

--- --- --- --- --- --- ENABLED BYTES BLOCKS CREATE_BYTES BLOCK_SIZE

--- --- --- --- --- NAME

--- 1 0 13 1 ONLINE

READ WRITE 10485760 1280 10485760 8192 /u01/app/oracle/oradata/orcl/temp2.dbf

참조

관련 문서

The gas holdup has been obtained from the pressure drop profiles by means of static pressure drop method, and the axial dispersion coefficient of liquid phase and

In this paper, we proposed error monitoring method of projecting disc in archive data storage using camera.. Proposed algorithm is evaluated by experiments

Pressure drop, standard deviation of pressure drop fluctuations and solid conveying rate were measured to determine the critical velocity.. Critical velocity increased

증기 확산법을 이용한 결정화 방법에는 Sitting Drop Crystallization, Sandwich Drop Crystallization, Free Interface Diffusion, Batch, MicroBatch Under Oil,

The latest trending music list and hash tag-based data reflecting the opinions of social media users can be used to help users select the music they want. However,

Therefore Cohen-Macaulay modules in dimension &gt; s for s = −1, 0, 1 are, respectively, Cohen-Macaulay modules, f-modules defined in [9] and generalized f-modules

A novel sample pretreatment technique, headspace hanging drop liquid phase microextraction (HS-LPME) was studied and applied to the determination of flavors from solid clove

With the adequate surgical treatment following systemic antibiotic and corticosteroid for periapical abscess, and topical antibiotics / corticosteroid combination drop