• 검색 결과가 없습니다.

아카이브 불완전 백업  취소 기반을 백업 -

N/A
N/A
Protected

Academic year: 2022

Share "아카이브 불완전 백업  취소 기반을 백업 -"

Copied!
4
0
0

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

전체 글

(1)

아카이브 불완전 백업  취소 기반을 백업

-현재 리두 로그파일 손실 디비는 죽은 상태

해결법 : 현재의 로드파일이 유실되었다. 그러므로 현재의 리두로그파일로 디비를 운영할 수 없기 때문에 resetlog open 으로 디비를 오픈하는 것이다. 이 백업은 파일의 손실이 있을수 있다.

단계 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, 2005, 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 현재의 리두로그 파일 정보 확인 다 다를수 있다.

SQL> startup Database opened.

SQL> select

2 a.member from v$logfile a 3 where group#=

4 (select min(b.group#) 5 from v$log b

6 where b.status ='CURRENT') 7 ;

MEMBER

--- /u01/app/oracle/oradata/orcl/redo01.log

/u01/app/oracle/oradata/orcl/log1b.log

단계 3 문제 발생 현재 로글 파일이 사라졌다.

SQL> host

(2)

[oracle@localhost ~]$ rm -rf /u01/app/oracle/oradata/orcl/redo01.log [oracle@localhost ~]$ rm -rf /u01/app/oracle/oradata/orcl/log1b.log [oracle@localhost ~]$ exit

exit

단계 4 역시 오라클 동작은 된다.

SQL> select 2 count(*)

3 from hr.employees;

COUNT(*) --- 107

단계 5 재시작 후 문제 해결을 위한 정보 획득

SQL> startup;

Database mounted.

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl/log1b.log' ORA-27037: unable to obtain file status

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

ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl/redo01.log' ORA-27037: unable to obtain file status

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

SQL> select * from v$log;  현재 사용중인 시퀸스 정보를 본다.

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

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

CURRENT 264495 09-AUG-07

2 1 6 104857600 2 YES INACTIVE 241925 08-AUG-07

3 1 7 104857600 2 YES INACTIVE 242933 08-AUG-07

(3)

SQL> host

[oracle@localhost ~]$ ls -lrt /oracle/oradata/archive/  현재 아카이브 파일의 수를 본다.

total 5236

-rw-r--- 1 oracle dba 2691584 Aug 8 03:26 arch_2.arc -rw-r--- 1 oracle dba 561664 Aug 8 04:04 arch_3.arc -rw-r--- 1 oracle dba 279552 Aug 8 04:08 arch_4.arc -rw-r--- 1 oracle dba 848384 Aug 8 04:19 arch_5.arc -rw-r--- 1 oracle dba 377856 Aug 8 04:26 arch_6.arc

-rw-r--- 1 oracle dba 559104 Aug 9 04:55 arch_7.arc  가장 마지막이 7번째이다.

[oracle@localhost ~]$ ls /oracle/oradata/archive/

arch_2.arc arch_3.arc arch_4.arc arch_5.arc arch_6.arc arch_7.arc

단계 6 모든 데이터 파일을 복구함 실행

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

[oracle@localhost ~]$ exit exit

단계 7 취소 기반 복구 실행

SQL> select 2 status

3 from v$instance;

STATUS

--- MOUNTED

 한방에 되는 사람은 작업이 없어서 그런다. 먼가 물어보는 사람은 기억해라 아카이브 파일이 생성된 시간을 기준으로 각 아카이브 파일을 순서를 확인한수 즉 현 예제는 2~8이 있으니 그 사이의 번호를 물어볼 때 cancel 를 입력하면 된다.

SQL> recover database until cancel;

Media recovery complete.

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

(4)

SQL> alter database open resetlogs;

단계 8 현 상태 확인 정상이다.

SQL> select 2 count(*)

3 from hr.employees;

COUNT(*) --- 107

단계 8 그렇다 실무에서는 바로 이 시점이 다시 온라인 백업이나 전체 파일 백업을 때려야하는 시점이다.

참조

관련 문서

Other sources: WTO Secretariat for quarterly merchandise trade volume, TDM Trade Data Monitor database for electronic components and agricultural raw materials, Institute

Despite the obvious strengths of this study, such as the use of a nationally recognized cancer database, SEER, which has collected and published critical cancer statistics

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

There was a significant interaction between protein source and enzyme for carcass value index (p=0.04), estimated lean yield (p=0.05) and fat depth over the loin

For analytical modeling of two-story two-span frames, element models for beams, columns, and beam-column joints must be determined. However, each is a part of internal or

The transmitted irradiance for Fabry-Perot interferometer or etalon is given by. Use

Scale and plane the exposed root 1 surface to remove plaque, calculus, root surface irregularities and, if judged appropriate, to reduce prominence.. Extensive root

(2) Are redeemable or convertible as specified in the articles of incorporation (i) at the option of the corporation, the shareholder, or another person or upon the occurrence