* 열린백업 수행 중에는 셧다운 이미디어트, 셧다운 노말을 수행 할 수 없음 *
* 엔드백업 찍히기 전에 디비가 강제종료 되면, 해당 파일에 문제가 있다고 에러가 뜨고 복구를 해야만 함 *

* 아카이브모드에서만 수행가능 *

 

** 요약 **

1. 테이블스페이스및데이터파일확인

2. 비긴백업

3. 데이터파일및컨트롤파일백업

4. 엔드백업

 

 

1. 데이터파일, 기타파일(파라미터파일, 패스워드파일) 조회.

SQL> select tablespace_name, file_name from dba_data_files;

TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
SYSTEM                         /oradata/system01.dbf
SYSAUX                         /oradata/sysaux01.dbf
UNDOTBS1                       /oradata/undotbs01.dbf
USERS                          /oradata/users01.dbf


SQL> SQL> select tablespace_name, file_name from dba_temp_files;

TABLESPACE_NAME                FILE_NAME
------------------------------ ------------------------------
TEMP                           /oradata/temp01.dbf


SQL> show parameter pfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /oracle/product/11.2.0/dbhome_1/
                                                 dbs/spfileARK11G.ora
                                                 
SQL> create pfile from spfile;

File created.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

/home/oracle>cd $ORACLE_HOME/dbs

/oracle/product/11.2.0/dbhome_1/dbs>ls -rlt orapw*
-rw-r----- 1 oracle dba 1536 Aug 24 15:50 orapwARK11G

/oracle/product/11.2.0/dbhome_1/dbs>ls -rlt *.ora
-rw-r----- 1 oracle dba 2560 Oct  2 16:16 spfileARK11G.ora
-rw-r--r-- 1 oracle dba  871 Oct  2 17:42 initARK11G.ora

 

 

2. 열린 백업(핫 백업/온라인 백업) 수행. (/oracle_hotbackup)

/oracle/product/11.2.0/dbhome_1/dbs>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 5 13:34:14 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter database begin backup;

Database altered.

SQL> alter database backup controlfile to '/oracle_hotbackup/control01.ctl';

Database altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

/home/oracle>cd /oradata

/oradata>ls -rlt
total 1717212
drwx------ 2 oracle dba     16384 Aug 23 07:44 lost+found
-rw-r----- 1 oracle dba  20979712 Oct 15 12:02 temp01.dbf
-rw-r--r-- 1 oracle dba  52429312 Dec 21 13:58 redo02.log
-rw-r----- 1 oracle dba  52429312 Dec 21 13:58 redo01.log
-rw-r----- 1 oracle dba   5251072 Dec 21 13:59 users01.dbf
-rw-r----- 1 oracle dba 209723392 Dec 21 13:59 undotbs01.dbf
-rw-r----- 1 oracle dba 734011392 Dec 21 13:59 system01.dbf
-rw-r----- 1 oracle dba 629153792 Dec 21 13:59 sysaux01.dbf
-rw-r----- 1 oracle dba  52429312 Dec 21 13:59 redo03.log
-rw-r--r-- 1 oracle dba   9748480 Dec 21 13:59 control02.ctl
-rw-r--r-- 1 oracle dba   9748480 Dec 21 13:59 control01.ctl

/oradata>cp -av *.dbf /oracle_hotbackup/
`sysaux01.dbf' -> `/oracle_hotbackup/sysaux01.dbf'
`system01.dbf' -> `/oracle_hotbackup/system01.dbf'
`temp01.dbf' -> `/oracle_hotbackup/temp01.dbf'
`undotbs01.dbf' -> `/oracle_hotbackup/undotbs01.dbf'
`users01.dbf' -> `/oracle_hotbackup/users01.dbf'

/oradata>cd $ORACLE_HOME/dbs

/oracle/product/11.2.0/dbhome_1/dbs>ls -rlt
total 24
-rw-r--r-- 1 oracle dba 2851 May 15  2009 init.ora
-rw-r----- 1 oracle dba 1536 Aug 24 15:50 orapwARK11G
-rw-r----- 1 oracle dba   24 Aug 24 15:50 lkARK11G
-rw-r--r-- 1 oracle dba  835 Aug 30 11:29 initARK11G.ora
-rw-rw---- 1 oracle dba 1544 Dec 21 13:58 hc_ARK11G.dat
-rw-r----- 1 oracle dba 2560 Dec 21 14:03 spfileARK11G.ora

/oracle/product/11.2.0/dbhome_1/dbs>cp -av initARK11G.ora orapwARK11G /oracle_hotbackup/
`initARK11G.ora' -> `/oracle_hotbackup/initARK11G.ora'
`orapwARK11G' -> `/oracle_hotbackup/orapwARK11G'

/oracle/product/11.2.0/dbhome_1/dbs>ls -rlt /oracle_hotbackup 
total 1553884
-rw-r----- 1 oracle dba      1536 Aug 24 15:50 orapwARK11G
-rw-r--r-- 1 oracle dba       835 Aug 30 11:29 initARK11G.ora
-rw-r----- 1 oracle dba  20979712 Oct 15 12:02 temp01.dbf
-rw-r----- 1 oracle dba   5251072 Dec 21 14:06 users01.dbf
-rw-r----- 1 oracle dba 209723392 Dec 21 14:06 undotbs01.dbf
-rw-r----- 1 oracle dba 734011392 Dec 21 14:06 system01.dbf
-rw-r----- 1 oracle dba 629153792 Dec 21 14:06 sysaux01.dbf
-rw-r----- 1 oracle dba   9748480 Dec 21 14:06 control01.ctl

/oradata>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 21 14:01:26 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter database end backup;

Database altered.

SQL> select * from v$backup;

     FILE# STATUS                CHANGE# TIME
---------- ------------------ ---------- ------------
         1 NOT ACTIVE             523461 21-DEC-15
         2 NOT ACTIVE             523461 21-DEC-15
         3 NOT ACTIVE             523461 21-DEC-15
         4 NOT ACTIVE             523461 21-DEC-15

'오라클백업과복구 > Oracle Backup' 카테고리의 다른 글

닫힌 백업(콜드 백업) 수행하기  (0) 2015.10.05
백업대상 확인하기  (0) 2015.10.05
Password File 관리하기  (0) 2015.10.05
,