프린트 하기

OS환경 : Oracle Linux 6.8 (64bit)

 

DB 환경 : Oracle Database 11.2.0.4

 

방법 : 오라클 11g R2 엔진 백업 복구 테스트

서버1에는 오라클 11gR2가 설치되어있음

서버2에는 OS만 설치되어있는 상태

서버1에서 엔진 및 데이터 백업 후 

서버1이 불가피하게 종료되거나 사용불가 상태가 되었을 때 서버2에서 복구하는 테스트

 

 

서버1

테스트 데이터 생성

 

1
2
3
4
5
6
7
8
9
SQL> create table imsi as select * from dba_objects;
 
Table created.
 
SQL> select count(*from imsi;
 
  COUNT(*)
----------
     86268
 

 

 

 

현재 서버1 DB open 상태

 

1
2
3
4
5
6
7
8
9
SQL> select status from v$instance;
 
STATUS
------------
OPEN
 
$ ps -ef | grep pmon
oracle    6304     1  0 00:22 ?        00:00:00 ora_pmon_orcl
oracle    6465  6410  0 00:25 pts/1    00:00:00 grep pmon
 

 

 

 

서버1 파일시스템 용량 확인

1
2
3
4
5
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       9.5G  5.1G  4.0G  57/
tmpfs           2.0G  310M  1.7G  16/dev/shm
/dev/sda3        60G  8.3G   49G  15/app

 

 

ORACLE_HOME으로 이동 후 엔진 확인

1
2
3
4
5
6
7
8
9
10
$ cd $ORACLE_HOME
$ pwd
/app/oracle/product/11.2.0/db_1
$ ls
apex         clone   cv           dv       install        jdev  md       odbc           oraInst.loc  plsql     scheduler     suptools         utl
assistants   config  dbs          emcli    instantclient  jdk   mesg     olap           ord          precomp   slax          sysman           wwg
bin          crs     dc_ocm       EMStage  inventory      jlib  mgw      OPatch         oui          racg      sqldeveloper  timingframework  xdk
ccr          csmig   deinstall    has      j2ee           ldap  network  opmn           owb          rdbms     sqlj          ucp
cdata        css     demo         hs       javavm         lib   nls      oracle50_orcl  owm          relnotes  sqlplus       uix
cfgtoollogs  ctx     diagnostics  ide      jdbc           log   oc4j     oracore        perl         root.sh   srvm          usm

 

 

tar 로 압축 및 확인

1
2
3
$ tar -cvf ora_home_20201127.tar *
$ ls -al ora_home_20201127.tar 
-rw-r--r--. 1 oracle oinstall 4425349120 Nov 28 00:28 ora_home_20201127.tar

 

 

데이터 백업을 위해 rman 경로 생성

1
$ mkdir -/app/oracle/rman

 

 

rman 환경 설정 및 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ rman target /
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/app/oracle/rman/db_ctl_%F';
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/app/oracle/rman/%d_%U_%T.bk';
 
RMAN> show all;      
 
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/app/oracle/rman/db_ctl_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/app/oracle/rman/%d_%U_%T.bk';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f'; # default

 

 

rman 백업

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
RMAN> backup database plus archivelog;
 
 
Starting backup at 28-NOV-20
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=8 RECID=1 STAMP=1057624724
channel ORA_DISK_1: starting piece 1 at 28-NOV-20
channel ORA_DISK_1: finished piece 1 at 28-NOV-20
piece handle=/app/oracle/rman/ORCL_04vgk4kk_1_1_20201128.bk tag=TAG20201128T003844 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-NOV-20
 
Starting backup at 28-NOV-20
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00003 name=/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-NOV-20
channel ORA_DISK_1: finished piece 1 at 28-NOV-20
piece handle=/app/oracle/rman/ORCL_05vgk4kl_1_1_20201128.bk tag=TAG20201128T003845 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 28-NOV-20
 
Starting backup at 28-NOV-20
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=2 STAMP=1057624732
channel ORA_DISK_1: starting piece 1 at 28-NOV-20
channel ORA_DISK_1: finished piece 1 at 28-NOV-20
piece handle=/app/oracle/rman/ORCL_06vgk4ks_1_1_20201128.bk tag=TAG20201128T003852 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-NOV-20
 
Starting Control File and SPFILE Autobackup at 28-NOV-20
piece handle=/app/oracle/rman/db_ctl_c-1448972421-20201128-01 comment=NONE
Finished Control File and SPFILE Autobackup at 28-NOV-20

 

 

rman으로 백업된 파일 확인

1
2
3
4
5
6
7
8
9
$ cd /app/oracle/rman/
$ ls -al
total 1085072
drwxr-xr-x.  2 oracle oinstall       4096 Nov 28 00:38 .
drwxr-xr-x. 12 oracle oinstall       4096 Nov 28 00:36 ..
-rw-r-----.  1 oracle oinstall    9830400 Nov 28 00:38 db_ctl_c-1448972421-20201128-01
-rw-r-----.  1 oracle oinstall    2318336 Nov 28 00:38 ORCL_04vgk4kk_1_1_20201128.bk
-rw-r-----.  1 oracle oinstall 1098948608 Nov 28 00:38 ORCL_05vgk4kl_1_1_20201128.bk
-rw-r-----.  1 oracle oinstall       3072 Nov 28 00:38 ORCL_06vgk4ks_1_1_20201128.bk

 

 

오라클 엔진 tar 백업 파일 및 rman 백업파일을 다른경로에 복사(백업서버 및 테스트환경에선 로컬 PC)

이후 서버1이 종료되었다고 가정함

 

 

서버2

OS만 설치되어 있는 상태

오라클 구동가능하도록 패키지 및 파라미터 설정

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# yum install oracle-rdbms-server-11gR2-preinstall
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
public_ol6_UEKR4                                                                                                                      | 2.5 kB     00:00     
public_ol6_UEKR4/primary_db                                                                                                           | 4.0 MB     00:00     
public_ol6_latest                                                                                                                     | 2.7 kB     00:00     
public_ol6_latest/primary_db                                                                                                          |  20 MB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-15.el6 will be installed
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package ksh.x86_64 0:20120801-38.el6_10 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=============================================================================================================================================================
 Package                                               Arch                    Version                              Repository                          Size
=============================================================================================================================================================
Installing:
 oracle-rdbms-server-11gR2-preinstall                  x86_64                  1.0-15.el6                           public_ol6_latest                   21 k
Installing for dependencies:
 compat-libcap1                                        x86_64                  1.10-1                               public_ol6_latest                   17 k
 compat-libstdc++-33                                   x86_64                  3.2.3-69.el6                         public_ol6_latest                  183 k
 ksh                                                   x86_64                  20120801-38.el6_10                   public_ol6_latest                  761 k
 libaio-devel                                          x86_64                  0.3.107-10.el6                       public_ol6_latest                   13 k
 
Transaction Summary
=============================================================================================================================================================
Install       5 Package(s)
 
Total download size: 995 k
Installed size: 2.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): compat-libcap1-1.10-1.x86_64.rpm                                                                                               |  17 kB     00:00     
(2/5): compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm                                                                                    | 183 kB     00:00     
(3/5): ksh-20120801-38.el6_10.x86_64.rpm                                                                                              | 761 kB     00:00     
(4/5): libaio-devel-0.3.107-10.el6.x86_64.rpm                                                                                         |  13 kB     00:00     
(5/5): oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64.rpm                                                                     |  21 kB     00:00     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                         11 MB/| 995 kB     00:00     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Importing GPG key 0xEC551F03:
 Userid : Oracle OSS group (Open Source Software group) <build@oss.oracle.com>
 Package: 6:oraclelinux-release-6Server-8.0.3.x86_64 (@anaconda-OracleLinuxServer-201605181719.x86_64/6.8)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libaio-devel-0.3.107-10.el6.x86_64                                                                                                        1/5 
  Installing : ksh-20120801-38.el6_10.x86_64                                                                                                             2/5 
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                   3/5 
  Installing : compat-libcap1-1.10-1.x86_64                                                                                                              4/5 
  Installing : oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64                                                                                    5/5 
  Verifying  : compat-libcap1-1.10-1.x86_64                                                                                                              1/5 
  Verifying  : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                   2/5 
  Verifying  : ksh-20120801-38.el6_10.x86_64                                                                                                             3/5 
  Verifying  : libaio-devel-0.3.107-10.el6.x86_64                                                                                                        4/5 
  Verifying  : oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64                                                                                    5/5 
 
Installed:
  oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-15.el6                                                                                                   
 
Dependency Installed:
  compat-libcap1.x86_64 0:1.10-1    compat-libstdc++-33.x86_64 0:3.2.3-69.el6    ksh.x86_64 0:20120801-38.el6_10    libaio-devel.x86_64 0:0.3.107-10.el6   
 
Complete!

 

 

oracle 유저 패스워드 설정

1
2
3
4
5
6
7
# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.

 

 

oracle 유저 그룹 dba로 변경

1
# usermod -g dba -G dba oracle

 

 

필수 경로 생성 및 권한부여

1
2
3
4
5
# mkdir -/app/oracle/product/11.2.0/db_1
# mkdir -/app/oracle/arch
# mkdir -/app/oracle/oradata/orcl/
# chown -R oracle:dba /app
# chmod -775 /app

 

 

오라클 계정 접속 후 .bash_profile 수정

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# su - oracle
$ vi .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
 
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORA_INVENTORY=/app/oraInventory
export ORACLE_SID=orcl
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
 
export DISPLAY=192.168.137.1:0.0

 

 

oracle 엔진tar 압축 파일 및 rman 백업 폴더 서버1에서 서버2로 전송

 

 

rman 폴더 권한 재부여

1
2
3
# cd /app/oracle
# chown -R oracle:dba rman/
# chmod -740 rman/

 

 

오라클 엔진 압축파일 확인 및 압축 해제

1
2
3
4
5
6
$ cd $ORACLE_HOME
$ pwd
/app/oracle/product/11.2.0/db_1
$ ls
ora_home_20201127.tar
$ tar -xvf ora_home_20201127.tar 

 

 

압축 해제 확인

1
2
3
4
5
6
7
$ ls
apex         clone   cv           dv       install        jdev  md       odbc           ora_home_20201127.tar  perl      root.sh       srvm             usm
assistants   config  dbs          emcli    instantclient  jdk   mesg     olap           oraInst.loc            plsql     scheduler     suptools         utl
bin          crs     dc_ocm       EMStage  inventory      jlib  mgw      OPatch         ord                    precomp   slax          sysman           wwg
ccr          csmig   deinstall    has      j2ee           ldap  network  opmn           oui                    racg      sqldeveloper  timingframework  xdk
cdata        css     demo         hs       javavm         lib   nls      oracle50_orcl  owb                    rdbms     sqlj          ucp
cfgtoollogs  ctx     diagnostics  ide      jdbc           log   oc4j     oracore        owm                    relnotes  sqlplus       uix

정상적으로 압축 해제됨

(tar 로 묶었기 때문에 파일 간 심볼릭 링크도 정상적으로 맺어져있음)

 

 

sqlplus 접속 후 db nomount 기동

1
2
3
4
5
6
$ sqlplus / as sysdba
 
SQL> startup nomount;
ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory

db_recovery_file_dest 와 audfit 경로가 없어서 기동되지 않음

 

 

ORACLE_HOME/dbs 로 이동 후 해당 파라미터 파일로 해당 경로 확인

1
2
3
4
5
6
7
$ cat $ORACLE_HOME/dbs
$ ls
hc_orcl.dat  init.ora  initorcl.ora  lkORCL  orapworcl  spfileorcl.ora
 
$ cat initorcl.ora | grep -e db_recovery_file_dest= -e audit_file_dest
*.audit_file_dest='/app/oracle/admin/orcl/adump'
*.db_recovery_file_dest='/app/oracle/fast_recovery_area'

 

 

각각 경로 생성

1
2
$ mkdir -/app/oracle/fast_recovery_area/orcl
$ mkdir -/app/oracle/admin/orcl/adump

 

 

다시 nomount 로 기동

1
2
3
4
5
6
7
8
SQL> startup nomount;
ORACLE instance started.
 
Total System Global Area 1653518336 bytes
Fixed Size            2253784 bytes
Variable Size         1006636072 bytes
Database Buffers      637534208 bytes
Redo Buffers            7094272 bytes

 

 

sqlplus 종료 후 rman 경로 파일 확인

1
2
3
4
5
6
7
8
$ ls -al /app/oracle/rman/
total 1085072
drwxr----- 2 oracle dba       4096 Nov 28 01:19 .
drwxrwxr-8 oracle dba       4096 Nov 28 01:32 ..
-rwxr----- 1 oracle dba    9830400 Nov 28 01:19 db_ctl_c-1448972421-20201128-01
-rwxr----- 1 oracle dba    2318336 Nov 28 01:19 ORCL_04vgk4kk_1_1_20201128.bk
-rwxr----- 1 oracle dba 1098948608 Nov 28 01:19 ORCL_05vgk4kl_1_1_20201128.bk
-rwxr----- 1 oracle dba       3072 Nov 28 01:19 ORCL_06vgk4ks_1_1_20201128.bk

 

 

rman 접속 후 컨트롤파일 restore

1
2
3
4
5
6
7
8
9
10
11
12
13
$ rman target /
RMAN> restore controlfile from '/app/oracle/rman/db_ctl_c-1448972421-20201128-01';
 
Starting restore at 28-NOV-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
 
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/app/oracle/oradata/orcl/control01.ctl
output file name=/app/oracle/fast_recovery_area/orcl/control02.ctl
Finished restore at 28-NOV-20

 

 

db mount 상태로 변경

1
2
3
4
RMAN> sql 'alter database mount';
 
sql statement: alter database mount
released channel: ORA_DISK_1

 

 

데이터 restore

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
RMAN> restore database;
 
Starting restore at 28-NOV-20
Starting implicit crosscheck backup at 28-NOV-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 28-NOV-20
 
Starting implicit crosscheck copy at 28-NOV-20
using channel ORA_DISK_1
Finished implicit crosscheck copy at 28-NOV-20
 
searching for all files in the recovery area
cataloging files...
no files cataloged
 
using channel ORA_DISK_1
 
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /app/oracle/rman/ORCL_05vgk4kl_1_1_20201128.bk
channel ORA_DISK_1: piece handle=/app/oracle/rman/ORCL_05vgk4kl_1_1_20201128.bk tag=TAG20201128T003845
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 28-NOV-20

 

 

아카이브로그 restore

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
RMAN> restore archivelog all;
 
Starting restore at 28-NOV-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
 
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_DISK_1: reading from backup piece /app/oracle/rman/ORCL_04vgk4kk_1_1_20201128.bk
channel ORA_DISK_1: piece handle=/app/oracle/rman/ORCL_04vgk4kk_1_1_20201128.bk tag=TAG20201128T003844
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=9
channel ORA_DISK_1: reading from backup piece /app/oracle/rman/ORCL_06vgk4ks_1_1_20201128.bk
channel ORA_DISK_1: piece handle=/app/oracle/rman/ORCL_06vgk4ks_1_1_20201128.bk tag=TAG20201128T003852
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 28-NOV-20

 

 

rman 종료 후 sqlplus 접속 후 recover 실행

운영 상태의 데이터 백업 후 restore 한 상황이기에 추가 아카이브가 부족함

until cancle 명령으로 recover 시도

1
2
3
4
5
6
7
8
9
10
SQL> recover database using backup controlfile until cancel;
ORA-00279change 1035485 generated at 11/28/2020 00:38:52 needed for thread 1
ORA-00289: suggestion :
/app/oracle/fast_recovery_area/ORCL/archivelog/2020_11_28/o1_mf_1_10_%u_.arc
ORA-00280change 1035485 for thread 1 is in sequence #10
 
 
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel <- cancel 입력
Media recovery cancelled.

Specify log: 가 나오면 cancel 입력

 

 

db를 resetlogs로 open

1
2
3
SQL> alter database open resetlogs;
 
Database altered.

 

 

db 상태 및 테스트 데이터 확인

1
2
3
4
5
6
7
8
9
10
11
SQL> select status from v$instance;
 
STATUS
------------
OPEN
 
SQL> select count(*from imsi;
 
  COUNT(*)
----------
     86268

정상

 

 

*엔진만 손상되어서 같은 서버에 엔진을 복구하는 경우에는 상관없지만

위와 같이 다른 서버에 복구하는 경우 

추후 패치 시 기존 패치내역을 확인하는 용도로 /etc/oraInst.loc, oraInventory 경로를 이용하기때문에

아래 경로도 복구 후 기존 서버에서 복사해서 넣어줘야함

1
2
3
/etc/oraInst.loc
/etc/oratab
/app/oraInventory/

 

 

 

참조 : https://positivemh.tistory.com/567

https://positivemh.tistory.com/510

565017.1