작성자

이문상

최초 작성일

2014-07-04

최종 수정일

2014-07-06

Version

1.0

Copyright 2014. Techdata㈜ all rights reserved.

 

일시

작업내용

07/04

Duplicating Test

   
   

 

Version

수정 일자

작성자

주요 내용

0.1

2014-07-04

이문상

문서 최초 작성

1.0

2014-07-06

이문상

오타 수정

       
       

 

목 차

1.    사전 준비    3

A.    테스트 환경    3

B.    테스트 방법    3

2.    테스트    3

A.    원본 DB    3

i.    DB 실행 및 아카이브 모드 확인    3

ii.    RMAN 접속 및 Configure 확인    4

iii.    RMAN Configure 변경    5

iv.    Full backup(dbf, archive, spfile, controlfile)    6

v.    현재 시점 확인.    10

vi.    로그스위치 및 체크포인트    11

vii.    백업 파일 공유를 위한 nfs 설정    12

viii.    백업 파일 권한 변경    12

B.    복제 DB    14

i.    listener.ora 및 tnsnames.ora 변경    14

ii.    Listener start    15

iii.    initCLON.ora 복사 및 변경    16

iv.    Startup CLON database as NOMOUNT    17

v.    Connect RMAN and DB cloning    17

vi.    아카이브 백업    18

vii.    connect auxiliary sys/oracle    20

viii.    RUN 실행    21

ix.    RUN 실행 화면    21

x.    Check CLON database    32

  1. 사전 준비
    1. 테스트 환경

OS Version

Oracle Linux 5

DB Version

11.2.0.3

 

  1. 테스트 방법

Oracle Exadata 사용자를 위한 RMAN HoL_v1.1 문서의 6.2(119p ~ 138p)

 

원본 DB: 전체 백업 실행

복제 DB: 원본 DB의 RMAN으로 접속, 백업 된 파일로 복구

 

  1. 테스트
    1. 원본 DB
      1. DB 실행 및 아카이브 모드 확인

[oracle1@oracle11g ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 3 14:47:39 2014

 

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

 

Connected to an idle instance.

 

SQL>

SQL>

SQL> startup

ORACLE instance started.

 

Total System Global Area 146472960 bytes

Fixed Size 1335080 bytes

Variable Size 92274904 bytes

Database Buffers 50331648 bytes

Redo Buffers 2531328 bytes

Database mounted.

Database opened.

SQL> archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 53

Next log sequence to archive 55

Current log sequence 55

SQL> show parameter recovery

 

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

db_recovery_file_dest string /u01/app/oracle1/flash_recovery_area

db_recovery_file_dest_size big integer 3852M

recovery_parallelism integer 0

SQL> exit

 

  1. RMAN 접속 및 Configure 확인

[oracle1@oracle11g rman_backup]$ rman target /

 

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 3 14:52:07 2014

 

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

 

connected to target database: ORCL (DBID=1367558153)

 

configure 확인

 

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 OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

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 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 '/u01/app/oracle1/product/11.2.0/db_1/dbs/snapcf_orcl.f'; # default

 

  1. RMAN Configure 변경

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rman_backup/%U_%T.rman';

 

new RMAN configuration parameters:

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rman_backup/%U_%T.rman';

new RMAN configuration parameters are successfully stored

 

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP on ;

 

new RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters are successfully stored

 

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/rman_backup/snapcf_orcl.f';

 

new RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/rman_backup/snapcf_orcl.f';

new RMAN configuration parameters are successfully stored

 

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rman_backup/%F' ;

 

new RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rman_backup/%F';

new RMAN configuration parameters are successfully stored

 

RMAN> show all ;

 

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 '/rman_backup/%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 '/rman_backup/%U_%T.rman';

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 '/rman_backup/snapcf_orcl.f';

 

 

  1. Full backup(dbf, archive, spfile, controlfile)

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Starting backup at 03-JUL-14

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=41 device type=DISK

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=168 RECID=3 STAMP=849462793

input archived log thread=1 sequence=169 RECID=1 STAMP=849462774

input archived log thread=1 sequence=170 RECID=2 STAMP=849462780

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/0kpcfqsm_1_1_20140703.rman tag=TAG20140703T161933 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16

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=1 RECID=4 STAMP=849463640

input archived log thread=1 sequence=2 RECID=5 STAMP=849463645

input archived log thread=1 sequence=3 RECID=6 STAMP=849463662

input archived log thread=1 sequence=4 RECID=7 STAMP=849463678

input archived log thread=1 sequence=5 RECID=8 STAMP=849463838

input archived log thread=1 sequence=6 RECID=9 STAMP=849463842

input archived log thread=1 sequence=8 RECID=11 STAMP=849463944

input archived log thread=1 sequence=9 RECID=12 STAMP=849463949

input archived log thread=1 sequence=10 RECID=13 STAMP=849464015

input archived log thread=1 sequence=12 RECID=15 STAMP=849464132

input archived log thread=1 sequence=13 RECID=16 STAMP=849464141

input archived log thread=1 sequence=14 RECID=17 STAMP=849464179

input archived log thread=1 sequence=15 RECID=18 STAMP=849466798

input archived log thread=1 sequence=16 RECID=19 STAMP=849466800

input archived log thread=1 sequence=17 RECID=20 STAMP=849466811

input archived log thread=1 sequence=18 RECID=21 STAMP=849466817

input archived log thread=1 sequence=19 RECID=22 STAMP=849466822

input archived log thread=1 sequence=20 RECID=23 STAMP=849466830

input archived log thread=1 sequence=21 RECID=24 STAMP=849466832

input archived log thread=1 sequence=22 RECID=25 STAMP=849466839

input archived log thread=1 sequence=23 RECID=26 STAMP=849466844

input archived log thread=1 sequence=24 RECID=27 STAMP=849466846

input archived log thread=1 sequence=25 RECID=28 STAMP=849468554

input archived log thread=1 sequence=26 RECID=29 STAMP=849528036

input archived log thread=1 sequence=27 RECID=30 STAMP=849600642

input archived log thread=1 sequence=28 RECID=31 STAMP=849652334

input archived log thread=1 sequence=29 RECID=32 STAMP=849738797

input archived log thread=1 sequence=30 RECID=33 STAMP=849808871

input archived log thread=1 sequence=31 RECID=34 STAMP=849852097

input archived log thread=1 sequence=32 RECID=35 STAMP=849911802

input archived log thread=1 sequence=33 RECID=36 STAMP=850003296

input archived log thread=1 sequence=34 RECID=37 STAMP=850036113

input archived log thread=1 sequence=35 RECID=38 STAMP=850122574

input archived log thread=1 sequence=36 RECID=39 STAMP=850166428

input archived log thread=1 sequence=37 RECID=40 STAMP=850212050

input archived log thread=1 sequence=38 RECID=41 STAMP=850295568

input archived log thread=1 sequence=39 RECID=42 STAMP=850370465

input archived log thread=1 sequence=40 RECID=43 STAMP=850413633

input archived log thread=1 sequence=41 RECID=44 STAMP=850468539

input archived log thread=1 sequence=42 RECID=45 STAMP=850555022

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/0lpcfqt6_1_1_20140703.rman tag=TAG20140703T161933 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25

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=43 RECID=46 STAMP=850625627

input archived log thread=1 sequence=44 RECID=47 STAMP=850666536

input archived log thread=1 sequence=45 RECID=48 STAMP=850728005

input archived log thread=1 sequence=46 RECID=49 STAMP=850814528

input archived log thread=1 sequence=47 RECID=50 STAMP=850878058

input archived log thread=1 sequence=48 RECID=51 STAMP=850918270

input archived log thread=1 sequence=49 RECID=52 STAMP=850987484

input archived log thread=1 sequence=50 RECID=53 STAMP=851073966

input archived log thread=1 sequence=51 RECID=54 STAMP=851122845

input archived log thread=1 sequence=52 RECID=55 STAMP=851162445

input archived log thread=1 sequence=53 RECID=56 STAMP=851169047

input archived log thread=1 sequence=54 RECID=57 STAMP=851957339

input archived log thread=1 sequence=55 RECID=58 STAMP=851957804

input archived log thread=1 sequence=56 RECID=59 STAMP=851958115

input archived log thread=1 sequence=57 RECID=60 STAMP=851958279

input archived log thread=1 sequence=58 RECID=61 STAMP=851958295

input archived log thread=1 sequence=59 RECID=62 STAMP=851958303

input archived log thread=1 sequence=60 RECID=63 STAMP=851959257

input archived log thread=1 sequence=61 RECID=64 STAMP=851959302

input archived log thread=1 sequence=62 RECID=65 STAMP=851959356

input archived log thread=1 sequence=63 RECID=66 STAMP=851959396

input archived log thread=1 sequence=64 RECID=67 STAMP=851959847

input archived log thread=1 sequence=65 RECID=68 STAMP=851960783

input archived log thread=1 sequence=66 RECID=69 STAMP=851961512

input archived log thread=1 sequence=67 RECID=70 STAMP=851961879

input archived log thread=1 sequence=68 RECID=71 STAMP=851962765

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/0mpcfqvt_1_1_20140703.rman tag=TAG20140703T161933 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:16

Finished backup at 03-JUL-14

 

Starting backup at 03-JUL-14

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=00006 name=/u01/app/oracle1/oradata/orcl/system02.dbf

input datafile file number=00001 name=/u01/app/oracle1/oradata/orcl/system01.dbf

input datafile file number=00002 name=/u01/app/oracle1/oradata/orcl/sysaux01.dbf

input datafile file number=00003 name=/u01/app/oracle1/oradata/orcl/undotbs01.dbf

input datafile file number=00005 name=/u01/app/oracle1/oradata/orcl/example01.dbf

input datafile file number=00004 name=/u01/app/oracle1/oradata/orcl/users01.dbf

input datafile file number=00008 name=/u01/app/oracle1/oradata/orcl/test02.dbf

input datafile file number=00007 name=/u01/app/oracle1/oradata/orcl/test01.dbf

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/0npcfr2c_1_1_20140703.rman tag=TAG20140703T162235 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:45

Finished backup at 03-JUL-14

 

Starting backup at 03-JUL-14

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=69 RECID=72 STAMP=851963129

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/0opcfr7t_1_1_20140703.rman tag=TAG20140703T162531 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

Finished backup at 03-JUL-14

 

Starting Control File and SPFILE Autobackup at 03-JUL-14

piece handle=/rman_backup/c-1367558153-20140703-05 comment=NONE

Finished Control File and SPFILE Autobackup at 03-JUL-14

 

RMAN> BACKUP CURRENT CONTROLFILE;

 

Starting backup at 03-JUL-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/0qpcfr8p_1_1_20140703.rman tag=TAG20140703T162600 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

Finished backup at 03-JUL-14

 

Starting Control File and SPFILE Autobackup at 03-JUL-14

piece handle=/rman_backup/c-1367558153-20140703-06 comment=NONE

Finished Control File and SPFILE Autobackup at 03-JUL-14

 

RMAN> exit

 

  1. 현재 시점 확인.

[oracle1@oracle11g rman_backup]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 3 16:28:46 2014

 

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

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD:HH24:MI:SS') CUR_TIME FROM DUAL ;

 

CUR_TIME

-------------------

2014-07-03:16:28:52

 

  1. 로그스위치 및 체크포인트

[oracle1@oracle11g rman_backup]$ rman target /

 

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 3 16:29:00 2014

 

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

 

connected to target database: ORCL (DBID=1367558153)

 

RMAN> SQL 'ALTER SYSTEM SWITCH LOGFILE';

 

using target database control file instead of recovery catalog

sql statement: ALTER SYSTEM SWITCH LOGFILE

 

RMAN> SQL 'ALTER SYSTEM SWITCH LOGFILE';

 

sql statement: ALTER SYSTEM SWITCH LOGFILE

 

RMAN> SQL 'ALTER SYSTEM SWITCH LOGFILE';

 

sql statement: ALTER SYSTEM SWITCH LOGFILE

 

RMAN> SQL 'ALTER SYSTEM CHECKPOINT' ;

 

sql statement: ALTER SYSTEM CHECKPOINT

 

RMAN> exit

 

  1. 백업 파일 공유를 위한 nfs 설정

[oracle1@oracle11g rman_backup]$ cat /etc/exports

 

[root@oracle11g ~]# vi /etc/exports

/rman_backup 192.168.56.103(rw)

 

[root@oracle11g ~]# service nfs stop

NFS 데몬 종료 중: [실패]

NFS mountd를 종료 중입니다: [실패]

NFS 쿼터를 종료 중: [실패]

Shutting down RPC idmapd: [실패]

[root@oracle11g ~]# service nfs start

NFS 서비스를 시작하고 있습니다: [ OK ]

NFS 쿼터를 시작하고 있습니다: [ OK ]

NFS mountd를 시작중 입니다. [ OK ]

NFS 데몬을 시작함: [ OK ]

RPC idmapd를 시작 중: [ OK ]

[root@oracle11g ~]# service nfs status

rpc.svcgssd가 정지되었습니다

rpc.mountd (pid 6316)를 실행하고 있습니다..

nfsd (pid 6331 6330 6329 6328 6327 6326 6325 6324)를 실행하고 있습니다..

rpc.rquotad (pid 6312)를 실행하고 있습니다..

 

  1. 백업 파일 권한 변경

[root@oracle11g ~]# cd /rman_backup/

[root@oracle11g rman_backup]# ls -al

합계 4664200

drwxr-xr-x 3 oracle1 dba 4096 2014-07-03 16:35 .

dr-xr-xr-x. 32 root root 4096 2014-07-03 13:32 ..

-rw-r----- 1 oracle1 oinstall 96664576 2014-07-03 14:56 01pcfm1h_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 96664576 2014-07-03 15:31 08pcfo1e_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 96664576 2014-07-03 15:58 0epcfplb_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 96664576 2014-07-03 16:19 0kpcfqsm_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 790096896 2014-07-03 16:21 0lpcfqt6_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 658614272 2014-07-03 16:22 0mpcfqvt_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 1338122240 2014-07-03 16:25 0npcfr2c_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 151040 2014-07-03 16:25 0opcfr7t_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 10420224 2014-07-03 16:26 0qpcfr8p_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 96664576 2014-07-03 16:32 0spcfrk3_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 790096896 2014-07-03 16:33 0tpcfrkj_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 658778112 2014-07-03 16:35 0upcfrnk_1_1_20140703.rman

-rw-r----- 1 oracle1 oinstall 10452992 2014-07-03 16:25 c-1367558153-20140703-05

-rw-r----- 1 oracle1 oinstall 10452992 2014-07-03 16:26 c-1367558153-20140703-06

-rw-r----- 1 oracle1 oinstall 10452992 2014-07-03 16:35 c-1367558153-20140703-07

drwx------ 2 oracle1 dba 16384 2014-07-03 13:31 lost+found

-rw-r----- 1 oracle1 oinstall 10371072 2014-07-03 16:35 snapcf_orcl.f

 

[root@oracle11g rman_backup]# chmod 777 *

 

[root@oracle11g rman_backup]# ls -al

합계 4664200

drwxr-xr-x 3 oracle1 dba 4096 2014-07-03 16:35 .

dr-xr-xr-x. 32 root root 4096 2014-07-03 13:32 ..

-rwxrwxrwx 1 oracle1 oinstall 96664576 2014-07-03 14:56 01pcfm1h_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 96664576 2014-07-03 15:31 08pcfo1e_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 96664576 2014-07-03 15:58 0epcfplb_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 96664576 2014-07-03 16:19 0kpcfqsm_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 790096896 2014-07-03 16:21 0lpcfqt6_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 658614272 2014-07-03 16:22 0mpcfqvt_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 1338122240 2014-07-03 16:25 0npcfr2c_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 151040 2014-07-03 16:25 0opcfr7t_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 10420224 2014-07-03 16:26 0qpcfr8p_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 96664576 2014-07-03 16:32 0spcfrk3_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 790096896 2014-07-03 16:33 0tpcfrkj_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 658778112 2014-07-03 16:35 0upcfrnk_1_1_20140703.rman

-rwxrwxrwx 1 oracle1 oinstall 10452992 2014-07-03 16:25 c-1367558153-20140703-05

-rwxrwxrwx 1 oracle1 oinstall 10452992 2014-07-03 16:26 c-1367558153-20140703-06

-rwxrwxrwx 1 oracle1 oinstall 10452992 2014-07-03 16:35 c-1367558153-20140703-07

drwxrwxrwx 2 oracle1 dba 16384 2014-07-03 13:31 lost+found

-rwxrwxrwx 1 oracle1 oinstall 10371072 2014-07-03 16:35 snapcf_orcl.f

 

  1. 복제 DB
    1. listener.ora 및 tnsnames.ora 변경

[oracle1@rmanauxtest admin]$ vi $ORACLE_HOME/network/admin/listener.ora

# listener.ora Network Configuration File: /u01/app/oracle1/product/11.2.0/db_1/network/admin/listener.ora

 

CLON =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = rmanauxtest.com)(PORT = 1521))

)

)

 

SID_LIST_CLON =

(SID_LIST =

(SID_DESC =

(SID_NAME = CLON)

(GLOBAL_DBNAME=CLON)

(ORACLE_HOME = /u01/app/oracle1/product/11.2.0/db_1)

)

)

ADR_BASE_LISTENER = /u01/app/oracle1

 

# Generated by Oracle configuration tools.

[oracle1@rmanauxtest admin]$ vi $ORACLE_HOME/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

CLON =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = rmanauxtest.com )(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = CLON)

(UR = A) ## Enable to connect into NOMOUNT database status

)

)

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = oracle11g.com )(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

 

  1. Listener start

[oracle1@rmanauxtest admin]$ lsnrctl start CLON

 

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-JUL-2014 15:10:11

 

Copyright (c) 1991, 2009, Oracle. All rights reserved.

 

Starting /u01/app/oracle1/product/11.2.0/db_1/bin/tnslsnr: please wait...

 

TNSLSNR for Linux: Version 11.2.0.1.0 - Production

System parameter file is /u01/app/oracle1/product/11.2.0/db_1/network/admin/listener.ora

Log messages written to /u01/app/oracle1/diag/tnslsnr/rmanauxtest/clon/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rmanauxtest.com)(PORT=1521)))

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rmanauxtest.com)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias CLON

Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date 03-JUL-2014 15:10:22

Uptime 0 days 0 hr. 0 min. 30 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/oracle1/product/11.2.0/db_1/network/admin/listener.ora

Listener Log File /u01/app/oracle1/diag/tnslsnr/rmanauxtest/clon/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rmanauxtest.com)(PORT=1521)))

Services Summary...

Service "CLON" has 1 instance(s).

Instance "CLON", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

 

  1. initCLON.ora 복사 및 변경

[oracle1@rmanauxtest admin]$ cd $ORACLE_HOME/dbs/

[oracle1@rmanauxtest dbs]$ ls

hc_DBUA0.dat hc_orcl.dat initDBUA1.ora lkORCL orapwDBUA0 orapworcl peshm_DBUA2_0 spfileorcl.ora.backup

hc_DBUA1.dat init.ora initDBUA2.ora lkinstDBUA0 orapwDBUA1 peshm_DBUA0_0 peshm_orcl_0

hc_DBUA2.dat initDBUA0.ora initorcl.ora lkinstDBUA2 orapwDBUA2 peshm_DBUA1_0 spfileorcl.ora.back

[oracle1@rmanauxtest dbs]$ cp initorcl.ora initCLON.ora

[oracle1@rmanauxtest dbs]$ ls

hc_DBUA0.dat hc_orcl.dat initDBUA0.ora initorcl.ora lkinstDBUA2 orapwDBUA2 peshm_DBUA1_0 spfileorcl.ora.back

hc_DBUA1.dat init.ora initDBUA1.ora lkORCL orapwDBUA0 orapworcl peshm_DBUA2_0 spfileorcl.ora.backup

hc_DBUA2.dat initCLON.ora initDBUA2.ora lkinstDBUA0 orapwDBUA1 peshm_DBUA0_0 peshm_orcl_0

 

[oracle1@rmanauxtest dbs]$ vi $ORACLE_HOME/dbs/initCLON.ora

orcl.__db_cache_size=46137344

orcl.__java_pool_size=16777216

orcl.__large_pool_size=16777216

orcl.__oracle_base='/u01/app/oracle1'#ORACLE_BASE set from environment

orcl.__pga_aggregate_target=687865856

orcl.__sga_target=1023410176

orcl.__shared_io_pool_size=0

orcl.__shared_pool_size=71303168

orcl.__streams_pool_size=0

*.audit_file_dest='/u01/app/oracle1/admin/CLON/adump'

*.audit_trail='XML'

*.compatible='11.2.0.0.0'

*.control_files='/u01/app/oracle1/oradata/CLON/control01.ctl','/u01/app/oracle1/flash_recovery_area/CLON/control02.ctl','/u01/app/oracle1/oradata/CLON/control03.ctl','/u01/app/oracle1/oradata/CLON/control04.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_name='CLON'

*.db_recovery_file_dest='/u01/app/oracle1/flash_recovery_area'

*.db_recovery_file_dest_size=4039114752

*.diagnostic_dest='/u01/app/oracle1'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=CLONXDB)'

*.global_names=FALSE

*.local_listener='CLON'

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.sec_max_failed_login_attempts=2

*.undo_tablespace='UNDOTBS1'

 

  1. Startup CLON database as NOMOUNT

[oracle1@rmanauxtest dbs]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 3 15:25:03 2014

 

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

 

Connected to an idle instance.

 

SQL> startup nomount pfile=$ORACLE_HOME/dbs/initCLON.ora

ORACLE instance started.

 

Total System Global Area 146472960 bytes

Fixed Size 1335080 bytes

Variable Size 92274904 bytes

Database Buffers 50331648 bytes

Redo Buffers 2531328 bytes

 

SQL> alter system register;

SQL> exit

 

  1. Connect RMAN and DB cloning

[oracle1@rmanauxtest dbs]$ rman target sys/oracle@orcl nocatalog

 

  1. 아카이브 백업

RMAN> backup archivelog all ;

 

Starting backup at 03-JUL-14

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=41 device type=DISK

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=168 RECID=3 STAMP=849462793

input archived log thread=1 sequence=169 RECID=1 STAMP=849462774

input archived log thread=1 sequence=170 RECID=2 STAMP=849462780

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/10pcftnr_1_1_20140703.rman tag=TAG20140703T170810 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15

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=1 RECID=4 STAMP=849463640

input archived log thread=1 sequence=2 RECID=5 STAMP=849463645

input archived log thread=1 sequence=3 RECID=6 STAMP=849463662

input archived log thread=1 sequence=4 RECID=7 STAMP=849463678

input archived log thread=1 sequence=5 RECID=8 STAMP=849463838

input archived log thread=1 sequence=6 RECID=9 STAMP=849463842

input archived log thread=1 sequence=8 RECID=11 STAMP=849463944

input archived log thread=1 sequence=9 RECID=12 STAMP=849463949

input archived log thread=1 sequence=10 RECID=13 STAMP=849464015

input archived log thread=1 sequence=12 RECID=15 STAMP=849464132

input archived log thread=1 sequence=13 RECID=16 STAMP=849464141

input archived log thread=1 sequence=14 RECID=17 STAMP=849464179

input archived log thread=1 sequence=15 RECID=18 STAMP=849466798

input archived log thread=1 sequence=16 RECID=19 STAMP=849466800

input archived log thread=1 sequence=17 RECID=20 STAMP=849466811

input archived log thread=1 sequence=18 RECID=21 STAMP=849466817

input archived log thread=1 sequence=19 RECID=22 STAMP=849466822

input archived log thread=1 sequence=20 RECID=23 STAMP=849466830

input archived log thread=1 sequence=21 RECID=24 STAMP=849466832

input archived log thread=1 sequence=22 RECID=25 STAMP=849466839

input archived log thread=1 sequence=23 RECID=26 STAMP=849466844

input archived log thread=1 sequence=24 RECID=27 STAMP=849466846

input archived log thread=1 sequence=25 RECID=28 STAMP=849468554

input archived log thread=1 sequence=26 RECID=29 STAMP=849528036

input archived log thread=1 sequence=27 RECID=30 STAMP=849600642

input archived log thread=1 sequence=28 RECID=31 STAMP=849652334

input archived log thread=1 sequence=29 RECID=32 STAMP=849738797

input archived log thread=1 sequence=30 RECID=33 STAMP=849808871

input archived log thread=1 sequence=31 RECID=34 STAMP=849852097

input archived log thread=1 sequence=32 RECID=35 STAMP=849911802

input archived log thread=1 sequence=33 RECID=36 STAMP=850003296

input archived log thread=1 sequence=34 RECID=37 STAMP=850036113

input archived log thread=1 sequence=35 RECID=38 STAMP=850122574

input archived log thread=1 sequence=36 RECID=39 STAMP=850166428

input archived log thread=1 sequence=37 RECID=40 STAMP=850212050

input archived log thread=1 sequence=38 RECID=41 STAMP=850295568

input archived log thread=1 sequence=39 RECID=42 STAMP=850370465

input archived log thread=1 sequence=40 RECID=43 STAMP=850413633

input archived log thread=1 sequence=41 RECID=44 STAMP=850468539

input archived log thread=1 sequence=42 RECID=45 STAMP=850555022

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/11pcftob_1_1_20140703.rman tag=TAG20140703T170810 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25

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=43 RECID=46 STAMP=850625627

input archived log thread=1 sequence=44 RECID=47 STAMP=850666536

input archived log thread=1 sequence=45 RECID=48 STAMP=850728005

input archived log thread=1 sequence=46 RECID=49 STAMP=850814528

input archived log thread=1 sequence=47 RECID=50 STAMP=850878058

input archived log thread=1 sequence=48 RECID=51 STAMP=850918270

input archived log thread=1 sequence=49 RECID=52 STAMP=850987484

input archived log thread=1 sequence=50 RECID=53 STAMP=851073966

input archived log thread=1 sequence=51 RECID=54 STAMP=851122845

input archived log thread=1 sequence=52 RECID=55 STAMP=851162445

input archived log thread=1 sequence=53 RECID=56 STAMP=851169047

input archived log thread=1 sequence=54 RECID=57 STAMP=851957339

input archived log thread=1 sequence=55 RECID=58 STAMP=851957804

input archived log thread=1 sequence=56 RECID=59 STAMP=851958115

input archived log thread=1 sequence=57 RECID=60 STAMP=851958279

input archived log thread=1 sequence=58 RECID=61 STAMP=851958295

input archived log thread=1 sequence=59 RECID=62 STAMP=851958303

input archived log thread=1 sequence=60 RECID=63 STAMP=851959257

input archived log thread=1 sequence=61 RECID=64 STAMP=851959302

input archived log thread=1 sequence=62 RECID=65 STAMP=851959356

input archived log thread=1 sequence=63 RECID=66 STAMP=851959396

input archived log thread=1 sequence=64 RECID=67 STAMP=851959847

input archived log thread=1 sequence=65 RECID=68 STAMP=851960783

input archived log thread=1 sequence=66 RECID=69 STAMP=851961512

input archived log thread=1 sequence=67 RECID=70 STAMP=851961879

input archived log thread=1 sequence=68 RECID=71 STAMP=851962765

input archived log thread=1 sequence=69 RECID=72 STAMP=851963129

input archived log thread=1 sequence=70 RECID=73 STAMP=851963362

input archived log thread=1 sequence=71 RECID=74 STAMP=851963368

input archived log thread=1 sequence=72 RECID=75 STAMP=851963376

input archived log thread=1 sequence=73 RECID=76 STAMP=851963495

input archived log thread=1 sequence=74 RECID=77 STAMP=851965686

channel ORA_DISK_1: starting piece 1 at 03-JUL-14

channel ORA_DISK_1: finished piece 1 at 03-JUL-14

piece handle=/rman_backup/12pcftr2_1_1_20140703.rman tag=TAG20140703T170810 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15

Finished backup at 03-JUL-14

 

Starting Control File and SPFILE Autobackup at 03-JUL-14

piece handle=/rman_backup/c-1367558153-20140703-08 comment=NONE

Finished Control File and SPFILE Autobackup at 03-JUL-14

 

  1. connect auxiliary sys/oracle

connected to auxiliary database: CLON (not mounted)

 

  1. RUN 실행

RUN

{

SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle1/oradata/CLON/system01.dbf';

SET NEWNAME FOR DATAFILE 2 TO '/u01/app/oracle1/oradata/CLON/sysaux01.dbf';

SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle1/oradata/CLON/undotbs01.dbf';

SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle1/oradata/CLON/users01.dbf';

SET NEWNAME FOR DATAFILE 5 TO '/u01/app/oracle1/oradata/CLON/example01.dbf';

SET NEWNAME FOR DATAFILE 6 TO '/u01/app/oracle1/oradata/CLON/system02.dbf';

SET NEWNAME FOR DATAFILE 7 TO '/u01/app/oracle1/oradata/CLON/test01.dbf';

SET NEWNAME FOR DATAFILE 8 TO '/u01/app/oracle1/oradata/CLON/test02.dbf';

SET NEWNAME FOR TEMPFILE 1 TO '/u01/app/oracle1/oradata/CLON/temp01.dbf';

DUPLICATE TARGET DATABASE TO CLON

NOFILENAMECHECK

UNTIL TIME "to_date('2014-07-03:16:28:52','YYYY-MM-DD:HH24:MI:SS')"

LOGFILE

GROUP 1 ('/u01/app/oracle1/oradata/CLON/redo01a.log') SIZE 512M REUSE,

GROUP 2 ('/u01/app/oracle1/oradata/CLON/redo02a.log') SIZE 512M REUSE,

GROUP 3 ('/u01/app/oracle1/oradata/CLON/redo03a.log') SIZE 512M REUSE

SPFILE PARAMETER_VALUE_CONVERT 'ORCL','CLON'

SET control_files='/u01/app/oracle1/oradata/CLON/control01.ctl','/u01/app/oracle1/flash_recovery_area/CLON/control02.ctl','/u01/app/oracle1/oradata/CLON/control03.ctl','/u01/app/oracle1/oradata/CLON/control04.ctl'

;

}

 

  1. RUN 실행 화면

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

Starting Duplicate Db at 03-JUL-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=19 device type=DISK

 

contents of Memory Script:

{

set until scn 15112852;

restore clone spfile to '/u01/app/oracle1/product/11.2.0/db_1/dbs/spfileCLON.ora';

sql clone "alter system set spfile= ''/u01/app/oracle1/product/11.2.0/db_1/dbs/spfileCLON.ora''";

}

executing Memory Script

 

executing command: SET until clause

 

Starting restore at 03-JUL-14

using channel ORA_AUX_DISK_1

 

WARNING: A restore time was estimated based on the supplied UNTIL SCN

channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: restoring SPFILE

output file name=/u01/app/oracle1/product/11.2.0/db_1/dbs/spfileCLON.ora

channel ORA_AUX_DISK_1: reading from backup piece /rman_backup/c-1367558153-20140703-06

channel ORA_AUX_DISK_1: piece handle=/rman_backup/c-1367558153-20140703-06 tag=TAG20140703T162611

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 03-JUL-14

 

sql statement: alter system set spfile= ''/u01/app/oracle1/product/11.2.0/db_1/dbs/spfileCLON.ora''

 

contents of Memory Script:

{

sql clone "alter system set db_name =

''CLON'' comment=

''duplicate'' scope=spfile";

sql clone "alter system set control_files =

''/u01/app/oracle1/oradata/CLON/control01.ctl'', ''/u01/app/oracle1/flash_recovery_area/CLON/control02.ctl'', ''/u01/app/oracle1/oradata/CLON/control03.ctl'', ''/u01/app/oracle1/oradata/CLON/control04.ctl'' comment=

'''' scope=spfile";

shutdown clone immediate;

startup clone nomount;

}

executing Memory Script

 

sql statement: alter system set db_name = ''CLON'' comment= ''duplicate'' scope=spfile

 

sql statement: alter system set control_files = ''/u01/app/oracle1/oradata/CLON/control01.ctl'', ''/u01/app/oracle1/flash_recovery_area/CLON/control02.ctl'', ''/u01/app/oracle1/oradata/CLON/control03.ctl'', ''/u01/app/oracle1/oradata/CLON/control04.ctl'' comment= '''' scope=spfile

 

Oracle instance shut down

 

connected to auxiliary database (not started)

Oracle instance started

 

Total System Global Area 146472960 bytes

 

Fixed Size 1335080 bytes

Variable Size 92274904 bytes

Database Buffers 50331648 bytes

Redo Buffers 2531328 bytes

 

contents of Memory Script:

{

set until scn 15112852;

sql clone "alter system set db_name =

''ORCL'' comment=

''Modified by RMAN duplicate'' scope=spfile";

sql clone "alter system set db_unique_name =

''CLON'' comment=

''Modified by RMAN duplicate'' scope=spfile";

shutdown clone immediate;

startup clone force nomount

restore clone primary controlfile;

alter clone database mount;

}

executing Memory Script

 

executing command: SET until clause

 

sql statement: alter system set db_name = ''ORCL'' comment= ''Modified by RMAN duplicate'' scope=spfile

 

sql statement: alter system set db_unique_name = ''CLON'' comment= ''Modified by RMAN duplicate'' scope=spfile

 

Oracle instance shut down

 

Oracle instance started

 

Total System Global Area 146472960 bytes

 

Fixed Size 1335080 bytes

Variable Size 92274904 bytes

Database Buffers 50331648 bytes

Redo Buffers 2531328 bytes

 

Starting restore at 03-JUL-14

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=19 device type=DISK

 

channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: reading from backup piece /rman_backup/c-1367558153-20140703-06

channel ORA_AUX_DISK_1: piece handle=/rman_backup/c-1367558153-20140703-06 tag=TAG20140703T162611

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:08

output file name=/u01/app/oracle1/oradata/CLON/control01.ctl

output file name=/u01/app/oracle1/flash_recovery_area/CLON/control02.ctl

output file name=/u01/app/oracle1/oradata/CLON/control03.ctl

output file name=/u01/app/oracle1/oradata/CLON/control04.ctl

Finished restore at 03-JUL-14

 

database mounted

Using previous duplicated file /u01/app/oracle1/oradata/CLON/system01.dbf for datafile 1 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/sysaux01.dbf for datafile 2 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/undotbs01.dbf for datafile 3 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/users01.dbf for datafile 4 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/example01.dbf for datafile 5 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/system02.dbf for datafile 6 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/test01.dbf for datafile 7 with checkpoint SCN of 15112746

Using previous duplicated file /u01/app/oracle1/oradata/CLON/test02.dbf for datafile 8 with checkpoint SCN of 15112746

 

contents of Memory Script:

{

catalog clone datafilecopy "/u01/app/oracle1/oradata/CLON/system01.dbf",

"/u01/app/oracle1/oradata/CLON/sysaux01.dbf",

"/u01/app/oracle1/oradata/CLON/undotbs01.dbf",

"/u01/app/oracle1/oradata/CLON/users01.dbf",

"/u01/app/oracle1/oradata/CLON/example01.dbf",

"/u01/app/oracle1/oradata/CLON/system02.dbf",

"/u01/app/oracle1/oradata/CLON/test01.dbf",

"/u01/app/oracle1/oradata/CLON/test02.dbf";

switch clone datafile 1 to datafilecopy

"/u01/app/oracle1/oradata/CLON/system01.dbf";

switch clone datafile 2 to datafilecopy

"/u01/app/oracle1/oradata/CLON/sysaux01.dbf";

switch clone datafile 3 to datafilecopy

"/u01/app/oracle1/oradata/CLON/undotbs01.dbf";

switch clone datafile 4 to datafilecopy

"/u01/app/oracle1/oradata/CLON/users01.dbf";

switch clone datafile 5 to datafilecopy

"/u01/app/oracle1/oradata/CLON/example01.dbf";

switch clone datafile 6 to datafilecopy

"/u01/app/oracle1/oradata/CLON/system02.dbf";

switch clone datafile 7 to datafilecopy

"/u01/app/oracle1/oradata/CLON/test01.dbf";

switch clone datafile 8 to datafilecopy

"/u01/app/oracle1/oradata/CLON/test02.dbf";

}

executing Memory Script

 

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/system01.dbf RECID=1 STAMP=851966929

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/sysaux01.dbf RECID=2 STAMP=851966931

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/undotbs01.dbf RECID=3 STAMP=851966932

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/users01.dbf RECID=4 STAMP=851966933

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/example01.dbf RECID=5 STAMP=851966935

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/system02.dbf RECID=6 STAMP=851966936

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/test01.dbf RECID=7 STAMP=851966937

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/test02.dbf RECID=8 STAMP=851966939

 

datafile 1 switched to datafile copy

input datafile copy RECID=1 STAMP=851966929 file name=/u01/app/oracle1/oradata/CLON/system01.dbf

 

datafile 2 switched to datafile copy

input datafile copy RECID=2 STAMP=851966931 file name=/u01/app/oracle1/oradata/CLON/sysaux01.dbf

 

datafile 3 switched to datafile copy

input datafile copy RECID=3 STAMP=851966932 file name=/u01/app/oracle1/oradata/CLON/undotbs01.dbf

 

datafile 4 switched to datafile copy

input datafile copy RECID=4 STAMP=851966933 file name=/u01/app/oracle1/oradata/CLON/users01.dbf

 

datafile 5 switched to datafile copy

input datafile copy RECID=5 STAMP=851966935 file name=/u01/app/oracle1/oradata/CLON/example01.dbf

 

datafile 6 switched to datafile copy

input datafile copy RECID=6 STAMP=851966936 file name=/u01/app/oracle1/oradata/CLON/system02.dbf

 

datafile 7 switched to datafile copy

input datafile copy RECID=7 STAMP=851966937 file name=/u01/app/oracle1/oradata/CLON/test01.dbf

 

datafile 8 switched to datafile copy

input datafile copy RECID=8 STAMP=851966939 file name=/u01/app/oracle1/oradata/CLON/test02.dbf

 

contents of Memory Script:

{

set until time "to_date('2014-07-03:16:28:52','YYYY-MM-DD:HH24:MI:SS')";

recover

clone database

delete archivelog

;

}

executing Memory Script

 

executing command: SET until clause

 

Starting recover at 03-JUL-14

using channel ORA_AUX_DISK_1

 

starting media recovery

 

channel ORA_AUX_DISK_1: starting archived log restore to default destination

channel ORA_AUX_DISK_1: restoring archived log

archived log thread=1 sequence=69

channel ORA_AUX_DISK_1: restoring archived log

archived log thread=1 sequence=70

channel ORA_AUX_DISK_1: reading from backup piece /rman_backup/12pcftr2_1_1_20140703.rman

channel ORA_AUX_DISK_1: piece handle=/rman_backup/12pcftr2_1_1_20140703.rman tag=TAG20140703T170810

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:16

archived log file name=/u01/app/oracle1/flash_recovery_area/CLON/archivelog/2014_07_03/o1_mf_1_69_9vb557cl_.arc thread=1 sequence=69

channel clone_default: deleting archived log(s)

archived log file name=/u01/app/oracle1/flash_recovery_area/CLON/archivelog/2014_07_03/o1_mf_1_69_9vb557cl_.arc RECID=73 STAMP=851967032

archived log file name=/u01/app/oracle1/flash_recovery_area/CLON/archivelog/2014_07_03/o1_mf_1_70_9vb55bh1_.arc thread=1 sequence=70

channel clone_default: deleting archived log(s)

archived log file name=/u01/app/oracle1/flash_recovery_area/CLON/archivelog/2014_07_03/o1_mf_1_70_9vb55bh1_.arc RECID=74 STAMP=851967035

media recovery complete, elapsed time: 00:00:11

Finished recover at 03-JUL-14

 

contents of Memory Script:

{

shutdown clone immediate;

startup clone nomount;

sql clone "alter system set db_name =

''CLON'' comment=

''Reset to original value by RMAN'' scope=spfile";

sql clone "alter system reset db_unique_name scope=spfile";

shutdown clone immediate;

startup clone nomount;

}

executing Memory Script

 

database dismounted

Oracle instance shut down

 

connected to auxiliary database (not started)

Oracle instance started

 

Total System Global Area 146472960 bytes

 

Fixed Size 1335080 bytes

Variable Size 92274904 bytes

Database Buffers 50331648 bytes

Redo Buffers 2531328 bytes

 

sql statement: alter system set db_name = ''CLON'' comment= ''Reset to original value by RMAN'' scope=spfile

 

sql statement: alter system reset db_unique_name scope=spfile

 

Oracle instance shut down

 

connected to auxiliary database (not started)

Oracle instance started

 

Total System Global Area 146472960 bytes

 

Fixed Size 1335080 bytes

Variable Size 92274904 bytes

Database Buffers 50331648 bytes

Redo Buffers 2531328 bytes

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLON" RESETLOGS ARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

MAXLOGHISTORY 292

LOGFILE

GROUP 1 ( '/u01/app/oracle1/oradata/CLON/redo01a.log' ) SIZE 512 M REUSE,

GROUP 2 ( '/u01/app/oracle1/oradata/CLON/redo02a.log' ) SIZE 512 M REUSE,

GROUP 3 ( '/u01/app/oracle1/oradata/CLON/redo03a.log' ) SIZE 512 M REUSE

DATAFILE

'/u01/app/oracle1/oradata/CLON/system01.dbf'

CHARACTER SET WE8MSWIN1252

 

 

contents of Memory Script:

{

catalog clone datafilecopy "/u01/app/oracle1/oradata/CLON/sysaux01.dbf",

"/u01/app/oracle1/oradata/CLON/undotbs01.dbf",

"/u01/app/oracle1/oradata/CLON/users01.dbf",

"/u01/app/oracle1/oradata/CLON/example01.dbf",

"/u01/app/oracle1/oradata/CLON/system02.dbf",

"/u01/app/oracle1/oradata/CLON/test01.dbf",

"/u01/app/oracle1/oradata/CLON/test02.dbf";

switch clone datafile all;

switch clone datafile 2 to datafilecopy

"/u01/app/oracle1/oradata/CLON/sysaux01.dbf";

switch clone datafile 3 to datafilecopy

"/u01/app/oracle1/oradata/CLON/undotbs01.dbf";

switch clone datafile 4 to datafilecopy

"/u01/app/oracle1/oradata/CLON/users01.dbf";

switch clone datafile 5 to datafilecopy

"/u01/app/oracle1/oradata/CLON/example01.dbf";

switch clone datafile 6 to datafilecopy

"/u01/app/oracle1/oradata/CLON/system02.dbf";

switch clone datafile 7 to datafilecopy

"/u01/app/oracle1/oradata/CLON/test01.dbf";

switch clone datafile 8 to datafilecopy

"/u01/app/oracle1/oradata/CLON/test02.dbf";

}

executing Memory Script

 

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/sysaux01.dbf RECID=1 STAMP=851967171

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/undotbs01.dbf RECID=2 STAMP=851967172

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/users01.dbf RECID=3 STAMP=851967173

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/example01.dbf RECID=4 STAMP=851967174

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/system02.dbf RECID=5 STAMP=851967175

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/test01.dbf RECID=6 STAMP=851967176

cataloged datafile copy

datafile copy file name=/u01/app/oracle1/oradata/CLON/test02.dbf RECID=7 STAMP=851967177

 

 

datafile 2 switched to datafile copy

input datafile copy RECID=1 STAMP=851967171 file name=/u01/app/oracle1/oradata/CLON/sysaux01.dbf

 

datafile 3 switched to datafile copy

input datafile copy RECID=2 STAMP=851967172 file name=/u01/app/oracle1/oradata/CLON/undotbs01.dbf

 

datafile 4 switched to datafile copy

input datafile copy RECID=3 STAMP=851967173 file name=/u01/app/oracle1/oradata/CLON/users01.dbf

 

datafile 5 switched to datafile copy

input datafile copy RECID=4 STAMP=851967174 file name=/u01/app/oracle1/oradata/CLON/example01.dbf

 

datafile 6 switched to datafile copy

input datafile copy RECID=5 STAMP=851967175 file name=/u01/app/oracle1/oradata/CLON/system02.dbf

 

datafile 7 switched to datafile copy

input datafile copy RECID=6 STAMP=851967176 file name=/u01/app/oracle1/oradata/CLON/test01.dbf

 

datafile 8 switched to datafile copy

input datafile copy RECID=7 STAMP=851967177 file name=/u01/app/oracle1/oradata/CLON/test02.dbf

 

contents of Memory Script:

{

Alter clone database open resetlogs;

}

executing Memory Script

 

database opened

Finished Duplicate Db at 03-JUL-14

 

RMAN> exit

 

  1. Check CLON database

[oracle1@rmanauxtest dbs]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 3 17:37:36 2014

 

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

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select status, instance_name from v$instance ;

 

STATUS INSTANCE_NAME

------------ ----------------

OPEN CLON

 

SQL> select FILE_NAME from dba_data_files ;

 

FILE_NAME

--------------------------------------------------------------------------------

/u01/app/oracle1/oradata/CLON/system01.dbf

/u01/app/oracle1/oradata/CLON/sysaux01.dbf

/u01/app/oracle1/oradata/CLON/undotbs01.dbf

/u01/app/oracle1/oradata/CLON/users01.dbf

/u01/app/oracle1/oradata/CLON/example01.dbf

/u01/app/oracle1/oradata/CLON/system02.dbf

/u01/app/oracle1/oradata/CLON/test01.dbf

/u01/app/oracle1/oradata/CLON/test02.dbf

 

8 rows selected.

 

SQL> select member from v$logfile ;

 

MEMBER

--------------------------------------------------------------------------------

/u01/app/oracle1/oradata/CLON/redo03a.log

/u01/app/oracle1/oradata/CLON/redo02a.log

/u01/app/oracle1/oradata/CLON/redo01a.log

 

SQL> select GROUP#,SEQUENCE# from v$log ;

 

GROUP# SEQUENCE#

---------- ----------

1 1

2 0

3 0

 

SQL>

 

사업자 정보 표시
(주)블루원 | 김홍태 | 서울특별시 용산구 원효로 4가 135 금홍 2빌딩 | 사업자 등록번호 : 106-86-76684 | TEL : 02-3272-7200 | Mail : support_ora@blueone.co.kr | 통신판매신고번호 : 호 | 사이버몰의 이용약관 바로가기

+ Recent posts