Oracle 12C RAC DataGuard實戰

流浪的野狼發表於2016-06-14


此篇文件僅限於測試學習,本人不對文章的任何內容進行解釋。為了形成該文件,特意像組織申請了一套測試環境進行文件的編寫,如下內容均為本人實踐,話不多說直接進入主題:

1         環境準備,primary環境:

1.1     作業系統檢查:

*****Physical CPU count:2

*****Core         count:4

*****Processor    count:8

*****Memory    size(M):32112

*****operation system:Red Hat Enterprise Linux Server release 6.4 (Santiago)

1.2     版本確認:

SQL> select banner from v$version;

 

BANNER

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

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

PL/SQL Release 12.1.0.2.0 - Production

CORE        12.1.0.2.0         Production

TNS for Linux: Version 12.1.0.2.0 - Production

NLSRTL Version 12.1.0.2.0 – Production

1.3     補丁情況檢查:

[oracle@d5jtbipvdrd41 OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 12.1.0.1.3

Copyright (c) 2016, Oracle Corporation.  All rights reserved.

Oracle Home       : /oracle/app/12.1.0/db_1

Central Inventory : /oracle/app/oraInventory

   from           : /oracle/app/12.1.0/db_1/oraInst.loc

OPatch version    : 12.1.0.1.3

OUI version       : 12.1.0.2.0

Log file location : /oracle/app/12.1.0/db_1/cfgtoollogs/opatch/opatch2016-06-14_14-16-32PM_1.log

Lsinventory Output file location : /oracle/app/12.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2016-06-14_14-16-32PM.txt

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

Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0

There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

Rac system comprising of multiple nodes

  Local node = d5jtbipvdrd41

  Remote node = d5jtbipvdrd42

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

OPatch succeeded.

[oracle@d5jtbipvdrd41 OPatch]$

1.4     元件情況確認:

COMP_NAME                                              VERSION                            STATUS

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

Oracle Database Vault                                     12.1.0.2.0                          VALID

Oracle Application Express                              4.2.5.00.08                        VALID

Oracle Label Security                                       12.1.0.2.0                          VALID

Spatial                                                          12.1.0.2.0                          VALID

Oracle Multimedia                                           12.1.0.2.0                          VALID

Oracle Text                                                             12.1.0.2.0                          VALID

Oracle Workspace Manager                            12.1.0.2.0                          VALID

Oracle XML Database                                      12.1.0.2.0                          VALID

Oracle Database Catalog Views                          12.1.0.2.0                           VALID

Oracle Database Packages and Types                  12.1.0.2.0                           VALID

JServer JAVA Virtual Machine                              12.1.0.2.0                           VALID

Oracle XDK                                                         12.1.0.2.0                           VALID

Oracle Database Java Packages                           12.1.0.2.0                           VALID

OLAP Analytic Workspace                                12.1.0.2.0                           VALID

Oracle OLAP API                                              12.1.0.2.0                          VALID

Oracle Real Application Clusters                     12.1.0.2.0                          VALID

SQL> select name,open_mode from v$pdbs;

1.5     需要做DGpdb確認:

NAME                                   OPEN_MODE

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

PDB$SEED                                READ ONLY

DGPDB                                    READ WRITE

1.6     ASM磁碟組和大小確認:

TIME_STAT NAME               TOTAL_MB    FREE_MB FREE_RATE_% USED_TATE_%

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

14-JUN-16   DATADG01             501748     351804   70.12             29.88

14-JUN-16   OCRDG                           10244       5527     53.95             46.05

1.7     12C中的DG clone賬號解鎖以及備份賬號解鎖

SQL> select  USERNAME,  ACCOUNT_STATUS,  DEFAULT_TABLESPACE  from  dba_users  where  username  in  ('SYSBACKUP','SYSDG','SYS');

USERNAME       ACCOUNT_STATUS               DEFAULT_TABLESPACE

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

SYS            OPEN                SYSTEM

SYSBACKUP      OPEN                USERS

SYSDG          OPEN                USERS

SQL> alter  user  sysbackup  identified  by  oracle  account  unlock;

User altered.

SQL> alter  user  sysdg  identified  by  oracle  account  unlock;

User altered.

12C環境如上解鎖賬號後需要重建口令檔案。然後傳到DG環境上去。

2         引數檔案確認與修改:

DGCDB2.__data_transfer_cache_size=0

DGCDB1.__data_transfer_cache_size=0

DGCDB1.__db_cache_size=2919235584

DGCDB2.__db_cache_size=2919235584

DGCDB2.__java_pool_size=33554432

DGCDB1.__java_pool_size=33554432

DGCDB1.__large_pool_size=83886080

DGCDB2.__large_pool_size=83886080

DGCDB1.__oracle_base='/oracle/app/db'#ORACLE_BASE set from environment

DGCDB2.__oracle_base='/oracle/app/db'#ORACLE_BASE set from environment

DGCDB2.__pga_aggregate_target=2701131776

DGCDB1.__pga_aggregate_target=2701131776

DGCDB2.__sga_target=4043309056

DGCDB1.__sga_target=4043309056

DGCDB1.__shared_io_pool_size=201326592

DGCDB2.__shared_io_pool_size=201326592

DGCDB2.__shared_pool_size=788529152

DGCDB1.__shared_pool_size=788529152

DGCDB2.__streams_pool_size=0

DGCDB1.__streams_pool_size=0

*.audit_file_dest='/oracle/app/db/admin/DGCDB/adump'

*.audit_trail='db'

*.cluster_database=true

*.compatible='12.1.0.2.0'

*.control_files='+DATADG01/DGCDB/CONTROLFILE/current.386.914413053','+DATADG01/DGCDB/CONTROLFILE/current.387.914413057'

*.db_block_size=8192

*.db_create_file_dest='+DATADG01'

*.db_domain=''

*.db_file_name_convert='+DATADG01/DGCDB/DATAFILE/','+DATADG01/DGTCDB/DATAFILE/','+DATADG01/DGCDB/TEMPFILE/','+DATADG01/DGTCDB/TEMPFILE/'

*.db_name='DGCDB'

*.db_recovery_file_dest='+DATADG01'

*.db_recovery_file_dest_size=478500m

*.diagnostic_dest='/oracle/app/db'

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

*.enable_pluggable_database=true

*.fal_client='dgcdb'

*.fal_server='dgtcdb'

DGCDB2.instance_number=2

DGCDB1.instance_number=1

*.log_archive_config='DG_CONFIG=(DGCDB,DGTCDB)'

*.log_archive_dest_2='service=DGTCDB lgwr sync affirm valid_for=(online_logfiles,primary_role) db_unique_name=DGTCDB'

*.log_archive_dest_state_2='ENABLE'

*.log_file_name_convert='+DATADG01/DGCDB/ONLINELOG/','+DATADG01/DGTCDB/ONLINELOG/'

*.memory_target=6432m

*.open_cursors=300

*.processes=3000

*.remote_login_passwordfile='exclusive'

*.standby_file_management='AUTO'

DGCDB2.thread=2

DGCDB1.thread=1

DGCDB1.undo_tablespace='UNDOTBS1'

DGCDB2.undo_tablespace='UNDOTBS2'

如上紅色部分為已修改好的引數,這些引數用於此次的DG配置。

3         TNS配置:

DGCDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = target_vip)(PORT = 1526))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = DGCDB)

      (UR=A)

    )

  )

上述TNS檔案的配置中,需要注意URHOST,我們在做複製的時候只針對一個節點進行,host ip地址只指定一個主機的vip,後期複製完成後修改為scan-ip即可。UR的設定是為了防止連線中的blocked。

4         DG環境

4.1     伺服器資訊確認:

*****Physical CPU count:2

*****Core         count:2

*****Processor    count:4

*****Memory    size(M):7869

*****operation system:Red Hat Enterprise Linux Server release 6.6 (Santiago)  --不影響配置DG

根據主環境的配置資訊等進行安裝備用環境RAC軟體,此處不做過大解釋。

4.2     安裝完後進行檢查:

TIME_STAT                NAME                  TOTAL_MB        FREE_MB FREE_RATE_%  USED_TATE_%

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

2016/06/14 14:44:31   DATADG01        593910        589048       99.18           .82

2016/06/14 14:44:31   OCRDG             20489          16012        78.15           21.85

4.3     DG資料庫引數檔案配置:

DGTCDB1.__oracle_base='/oracle/app/db'#ORACLE_BASE set from environment

DGTCDB2.__oracle_base='/oracle/app/db'#ORACLE_BASE set from environment

DGTCDB1.__pga_aggregate_target=1701131776

DGTCDB2.__pga_aggregate_target=1701131776

DGTCDB1.__sga_target=2000000000

DGTCDB2.__sga_target=2000000000

*.audit_file_dest='/oracle/app/db/admin/DGTCDB/adump'

*.audit_trail='db'

*.cluster_database=true

*.compatible='12.1.0.2.0'

*.control_files='+DATADG01/DGTCDB/CONTROLFILE/control.ctl'

*.db_block_size=8192

*.db_create_file_dest=''

*.db_domain=''

*.db_file_name_convert='+DATADG01/DGCDB/DATAFILE/','+DATADG01/DGTCDB/DATAFILE/','+DATADG01/DGCDB/TEMPFILE/','+DATADG01/DGTCDB/TEMPFILE/'

*.db_name='DGCDB'

*.db_recovery_file_dest='+DATADG01'

*.db_recovery_file_dest_size=47850m

*.db_unique_name='DGTCDB'

*.diagnostic_dest='/oracle/app/db'

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

*.enable_pluggable_database=true

*.fal_client='DGTCDB'

*.fal_server='DGCDB'

DGTCDB2.instance_number=2

DGTCDB1.instance_number=1

*.log_archive_config='DG_CONFIG=(DGCDB,DGTCDB)'

*.log_archive_dest_2='service=DGCDB lgwr sync affirm valid_for=(online_logfiles,primary_role) db_unique_name=DGCDB'

*.log_file_name_convert='+DATADG01/DGCDB/ONLINELOG/','+DATADG01/DGTCDB/ONLINELOG/'

*.open_cursors=300

*.processes=300

*.remote_login_passwordfile='exclusive'

DGTCDB2.thread=2

DGTCDB1.thread=1

DGTCDB1.undo_tablespace='UNDOTBS1'

DGTCDB2.undo_tablespace='UNDOTBS2'

如上紅色部分為跟primary環境不一樣的地方。

5         DG環境TNS與監聽器配置:

5.1     配置監聽器:

################### for oracle dataguard configure #######################

##配置靜態監聽器,為了線上DG環境複製。

LISTENER =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))

    )

  )

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (ORACLE_HOME = /oracle/app/db/product/12.1.0/db_1/)

      (SID_NAME = DGTCDB1)

    )

  )

DGCDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = source_scan_ip)(PORT = 1526))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = DGCDB)

      (UR=A)

    )

  )

如上配置完成即可。

5.2     關於密碼檔案的配置:

         12C的密碼檔案預設是放在ASM下,此處我們單獨建立密碼檔案:

orapwd file=/oracle/app/12.1.0/db_1/dbs/orapwDGCDB1 entries=20 force=y asm=n sysbackup=y sysdg=y syskm=y

上述密碼檔案完後,copy到節點2以及DG環境上去。在DG環境上講檔名進行修改:

mv  orapwDGCDB1   orapwDGTCDB1

mv  orapwDGCDB2   orapwDGTCDB2

6         新增DG資料庫資訊到叢集中

如果將DG資料庫資訊不新增到叢集中,在修改引數的時候會出現如下錯誤資訊:

alter system set log_archive_dest_state_2=defer scope=both sid='*'

*

ERROR at line 1:

ORA-01565: error in identifying file '+DATADG01/DGTCDB/spfiledgcdb.ora'

ORA-17503: ksfdopn:2 Failed to open file +DATADG01/DGTCDB/spfiledgcdb.ora

ORA-15001: diskgroup "DATADG01" does not exist or is not mounted

ORA-15040: diskgroup is incomplete

可能的原因是新增資料庫是透過手動建立的,並未加入到叢集中。需要手動新增到叢集中去:

oracle使用者下執行:

 [oracle@jtdbavurd01 db_1]$ srvctl add database -d DGTCDB -o /oracle/app/db/product/12.1.0/db_1 -spfile +DATADG01/DGTCDB/spfiledgcdb.ora -dbtype RAC -dbname DGCDB -diskgroup DATADG01

[oracle@jtdbavurd01 db_1]$ srvctl config database -d DGTCDB

Database unique name: DGTCDB

Database name: DGCDB

Oracle home: /oracle/app/db/product/12.1.0/db_1

Oracle user: oracle

Spfile: +DATADG01/DGTCDB/spfiledgcdb.ora

Password file:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATADG01

Mount point paths:

Services:

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group: oper

Database instances:

Configured nodes:

Database is administrator managed

[oracle@jtdbavurd01 db_1]$ srvctl add instance -db DGTCDB -instance DGTCDB1 -node jtdbavurd01

[oracle@jtdbavurd01 db_1]$ srvctl add instance -db DGTCDB -instance DGTCDB2 -node jtdbavurd02

[oracle@jtdbavurd01 db_1]$ srvctl config database -d DGTCDB

Database unique name: DGTCDB

Database name: DGCDB

Oracle home: /oracle/app/db/product/12.1.0/db_1

Oracle user: oracle

Spfile: +DATADG01/DGTCDB/spfiledgcdb.ora

Password file:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATADG01

Mount point paths:

Services:

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group: oper

Database instances: DGTCDB1,DGTCDB2

Configured nodes: jtdbavurd01,jtdbavurd02

Database is administrator managed

[oracle@jtdbavurd01 db_1]$

如上操作完成後,關閉資料庫,然後透過GI重啟資料庫即可。

如果在grid下執行會報錯如下:

PRCD-1025 : Failed to create database DGTCDB

PRKH-1014 : Current user "grid" is not the oracle owner user "oracle" of oracle home "/oracle/app/db/product/12.1.0/db_1"

7         建立引數檔案

根據修改過的pfile引數檔案,在DG環境上建立引數檔案:

Create spfile=’+DATADG01/DGTCDB/spfiledgcdb.ora’ from pfile=’/home/oracle/guijian.ora’;

修改init檔案(兩個節點均需要變更):

[oracle@jtdbavurd01 dbs]$ cat initDGTCDB1.ora

SPFILE='+DATADG01/DGTCDB/spfileDGCDB.ora'

8         開始複製DG環境

[oracle@d5jtbipvdrd41 ~]$ rman target sysbackup/oracle

 

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jun 14 11:50:13 2016

 

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

 

connected to target database: DGCDB (DBID=1775637629)

 

RMAN>  connect auxiliary "sysbackup/oracle@dgtcdb as sysbackup"

 

connected to auxiliary database: DGCDB (not mounted)

 

RMAN> duplicate target database for standby from active database dorecover nofilenamecheck;

 

Starting Duplicate Db at 14-JUN-16

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=130 instance=DGTCDB1 device type=DISK

current log archived

 

contents of Memory Script:

{

   backup as copy reuse

   targetfile  '+DATADG01/DGCDB/PASSWORD/pwddgcdb.380.914412825' auxiliary format

 '/oracle/app/db/product/12.1.0/db_1/dbs/orapwDGTCDB1'   ;

}

executing Memory Script

 

Starting backup at 14-JUN-16

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=74 instance=DGCDB1 device type=DISK

Finished backup at 14-JUN-16

 

contents of Memory Script:

{

   backup as copy current controlfile for standby auxiliary format  '+DATADG01/DGTCDB/CONTROLFILE/control.ctl';

}

executing Memory Script

 

Starting backup at 14-JUN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile copy

copying standby control file

output file name=+DATADG01/DGTCDB/CONTROLFILE/control.ctl tag=TAG20160614T115057

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 14-JUN-16

 

contents of Memory Script:

{

   sql clone 'alter database mount standby database';

}

executing Memory Script

 

sql statement: alter database mount standby database

RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

 

contents of Memory Script:

{

   set newname for tempfile  1 to

 "+DATADG01";

   set newname for tempfile  2 to

 "+DATADG01/DGCDB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/pdbseed_temp012016-06-13_11-39-11-am.dbf";

   set newname for tempfile  3 to

 "+DATADG01";

   switch clone tempfile all;

   set newname for datafile  1 to

 "+DATADG01";

   set newname for datafile  3 to

 "+DATADG01";

   set newname for datafile  4 to

 "+DATADG01";

   set newname for datafile  5 to

 "+DATADG01";

   set newname for datafile  6 to

 "+DATADG01";

   set newname for datafile  7 to

 "+DATADG01";

   set newname for datafile  8 to

 "+DATADG01";

   set newname for datafile  9 to

 "+DATADG01";

   set newname for datafile  10 to

 "+DATADG01";

   set newname for datafile  11 to

 "+DATADG01";

   backup as copy reuse

   datafile  1 auxiliary format

 "+DATADG01"   datafile

 3 auxiliary format

 "+DATADG01"   datafile

 4 auxiliary format

 "+DATADG01"   datafile

 5 auxiliary format

 "+DATADG01"   datafile

 6 auxiliary format

 "+DATADG01"   datafile

 7 auxiliary format

 "+DATADG01"   datafile

 8 auxiliary format

 "+DATADG01"   datafile

 9 auxiliary format

 "+DATADG01"   datafile

 10 auxiliary format

 "+DATADG01"   datafile

 11 auxiliary format

 "+DATADG01"   ;

   sql 'alter system archive log current';

}

executing Memory Script

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

renamed tempfile 1 to +DATADG01 in control file

renamed tempfile 2 to +DATADG01/DGCDB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/pdbseed_temp012016-06-13_11-39-11-am.dbf in control file

renamed tempfile 3 to +DATADG01 in control file

 

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

 

executing command: SET NEWNAME

 

Starting backup at 14-JUN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile copy

input datafile file number=00001 name=+DATADG01/DGCDB/DATAFILE/system.397.914412911

output file name=+DATADG01/DGTCDB/DATAFILE/system.258.914500267 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15

channel ORA_DISK_1: starting datafile copy

input datafile file number=00003 name=+DATADG01/DGCDB/DATAFILE/sysaux.381.914412847

output file name=+DATADG01/DGTCDB/DATAFILE/sysaux.259.914500283 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15

channel ORA_DISK_1: starting datafile copy

input datafile file number=00010 name=+DATADG01/DGCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/sysaux.450.914414107

output file name=+DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/sysaux.260.914500297 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15

channel ORA_DISK_1: starting datafile copy

input datafile file number=00007 name=+DATADG01/DGCDB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/sysaux.395.914413091

output file name=+DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/sysaux.261.914500313 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile copy

input datafile file number=00005 name=+DATADG01/DGCDB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/system.396.914413091

output file name=+DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/system.262.914500319 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile copy

input datafile file number=00009 name=+DATADG01/DGCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/system.449.914414107

output file name=+DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/system.263.914500327 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile copy

input datafile file number=00004 name=+DATADG01/DGCDB/DATAFILE/undotbs1.388.914412997

output file name=+DATADG01/DGTCDB/DATAFILE/undotbs1.264.914500335 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile copy

input datafile file number=00008 name=+DATADG01/DGCDB/DATAFILE/undotbs2.378.914413729

output file name=+DATADG01/DGTCDB/DATAFILE/undotbs2.265.914500343 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03

channel ORA_DISK_1: starting datafile copy

input datafile file number=00006 name=+DATADG01/DGCDB/DATAFILE/users.391.914412997

output file name=+DATADG01/DGTCDB/DATAFILE/users.266.914500345 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting datafile copy

input datafile file number=00011 name=+DATADG01/DGCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/users.452.914414157

output file name=+DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/users.267.914500347 tag=TAG20160614T115106

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 14-JUN-16

 

sql statement: alter system archive log current

current log archived

 

contents of Memory Script:

{

   backup as copy reuse

   archivelog like  "+DATADG01/DGCDB/ARCHIVELOG/2016_06_14/thread_2_seq_11.490.914500249" auxiliary format

 "+DATADG01"   archivelog like

 "+DATADG01/DGCDB/ARCHIVELOG/2016_06_14/thread_2_seq_12.491.914500349" auxiliary format

 "+DATADG01"   archivelog like

 "+DATADG01/DGCDB/ARCHIVELOG/2016_06_14/thread_1_seq_31.492.914500349" auxiliary format

 "+DATADG01"   archivelog like

 "+DATADG01/DGCDB/ARCHIVELOG/2016_06_14/thread_2_seq_13.493.914500351" auxiliary format

 "+DATADG01"   archivelog like

 "+DATADG01/DGCDB/ARCHIVELOG/2016_06_14/thread_1_seq_32.494.914500351" auxiliary format

 "+DATADG01"   ;

   catalog clone start with  "+DATADG01";

   switch clone datafile all;

}

executing Memory Script

 

Starting backup at 14-JUN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log copy

input archived log thread=2 sequence=11 RECID=25 STAMP=914500248

output file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_11.268.914500353 RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting archived log copy

input archived log thread=1 sequence=31 RECID=27 STAMP=914500349

output file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_31.269.914500355 RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting archived log copy

input archived log thread=2 sequence=12 RECID=26 STAMP=914500348

output file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_12.270.914500355 RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting archived log copy

input archived log thread=2 sequence=13 RECID=28 STAMP=914500351

output file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_13.271.914500357 RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting archived log copy

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

output file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_32.272.914500359 RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

Finished backup at 14-JUN-16

 

searching for all files that match the pattern +DATADG01

 

List of Files Unknown to the Database

=====================================

File Name: +DATADG01/DB_UNKNOWN/PARAMETERFILE/spfile.256.914498917

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_11.268.914500353

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_31.269.914500355

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_12.270.914500355

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_13.271.914500357

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_32.272.914500359

File Name: +DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/sysaux.261.914500313

File Name: +DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/system.262.914500319

File Name: +DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/sysaux.260.914500297

File Name: +DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/system.263.914500327

File Name: +DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/users.267.914500347

File Name: +DATADG01/DGTCDB/DATAFILE/system.258.914500267

File Name: +DATADG01/DGTCDB/DATAFILE/sysaux.259.914500283

File Name: +DATADG01/DGTCDB/DATAFILE/undotbs1.264.914500335

File Name: +DATADG01/DGTCDB/DATAFILE/undotbs2.265.914500343

File Name: +DATADG01/DGTCDB/DATAFILE/users.266.914500345

cataloging files...

cataloging done

 

List of Cataloged Files

=======================

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_11.268.914500353

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_31.269.914500355

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_12.270.914500355

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_13.271.914500357

File Name: +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_32.272.914500359

File Name: +DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/sysaux.261.914500313

File Name: +DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/system.262.914500319

File Name: +DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/sysaux.260.914500297

File Name: +DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/system.263.914500327

File Name: +DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/users.267.914500347

File Name: +DATADG01/DGTCDB/DATAFILE/system.258.914500267

File Name: +DATADG01/DGTCDB/DATAFILE/sysaux.259.914500283

File Name: +DATADG01/DGTCDB/DATAFILE/undotbs1.264.914500335

File Name: +DATADG01/DGTCDB/DATAFILE/undotbs2.265.914500343

File Name: +DATADG01/DGTCDB/DATAFILE/users.266.914500345

 

List of Files Which Were Not Cataloged

=======================================

File Name: +DATADG01/DB_UNKNOWN/PARAMETERFILE/spfile.256.914498917

  RMAN-07518: Reason: Foreign database file DBID: 0  Database Name:

 

datafile 1 switched to datafile copy

input datafile copy RECID=13 STAMP=914500360 file name=+DATADG01/DGTCDB/DATAFILE/system.258.914500267

datafile 3 switched to datafile copy

input datafile copy RECID=14 STAMP=914500360 file name=+DATADG01/DGTCDB/DATAFILE/sysaux.259.914500283

datafile 4 switched to datafile copy

input datafile copy RECID=15 STAMP=914500360 file name=+DATADG01/DGTCDB/DATAFILE/undotbs1.264.914500335

datafile 5 switched to datafile copy

input datafile copy RECID=16 STAMP=914500360 file name=+DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/system.262.914500319

datafile 6 switched to datafile copy

input datafile copy RECID=17 STAMP=914500360 file name=+DATADG01/DGTCDB/DATAFILE/users.266.914500345

datafile 7 switched to datafile copy

input datafile copy RECID=18 STAMP=914500361 file name=+DATADG01/DGTCDB/35219DDABFC01D74E0534061000A3BD0/DATAFILE/sysaux.261.914500313

datafile 8 switched to datafile copy

input datafile copy RECID=19 STAMP=914500361 file name=+DATADG01/DGTCDB/DATAFILE/undotbs2.265.914500343

datafile 9 switched to datafile copy

input datafile copy RECID=20 STAMP=914500361 file name=+DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/system.263.914500327

datafile 10 switched to datafile copy

input datafile copy RECID=21 STAMP=914500361 file name=+DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/sysaux.260.914500297

datafile 11 switched to datafile copy

input datafile copy RECID=22 STAMP=914500361 file name=+DATADG01/DGTCDB/3521DA7F4A4831C7E0534061000A7D5B/DATAFILE/users.267.914500347

 

contents of Memory Script:

{

   set until scn  1994267;

   recover

   standby

   clone database

    delete archivelog

   ;

}

executing Memory Script

 

executing command: SET until clause

 

Starting recover at 14-JUN-16

using channel ORA_AUX_DISK_1

 

starting media recovery

 

archived log for thread 1 with sequence 31 is already on disk as file +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_31.269.914500355

archived log for thread 1 with sequence 32 is already on disk as file +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_32.272.914500359

archived log for thread 2 with sequence 12 is already on disk as file +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_12.270.914500355

archived log for thread 2 with sequence 13 is already on disk as file +DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_13.271.914500357

archived log file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_31.269.914500355 thread=1 sequence=31

archived log file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_12.270.914500355 thread=2 sequence=12

archived log file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_2_seq_13.271.914500357 thread=2 sequence=13

archived log file name=+DATADG01/DGTCDB/ARCHIVELOG/2016_06_14/thread_1_seq_32.272.914500359 thread=1 sequence=32

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

Finished recover at 14-JUN-16

Finished Duplicate Db at 14-JUN-16

 

RMAN> 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28612416/viewspace-2120106/,如需轉載,請註明出處,否則將追究法律責任。

相關文章