Oracle RMAN Duplicate方式 搭建 DG

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/leo__1990/article/details/91434506

1.环境说明

vbox 准备两个虚拟机,Linux 环境 OracleLinux x86.64-dvd,一个虚拟机已经搭建好库,一个虚拟机装好数据库软件,两个虚拟机要能相互ping 通,实例名都是orcl(实例名区分大小写)。

主库数据库版本

SQL> select * from v$version; 

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE	11.2.0.4.0	Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

主库:192.168.56.65

备库:192.168.56.71

2 主库设置为 force logging 模式 

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1043886080 bytes
Fixed Size		 2259840 bytes
Variable Size		 889193600 bytes
Database Buffers	 146800640 bytes
Redo Buffers		 5632000 bytes
Database mounted.
SQL> alter database force logging;

Database altered.

SQL> select force_logging from v$database; 

FOR
---
YES

--取消force logging命令

SQL> alter database no force logging;

Database altered.

SQL> select force_logging from v$database;

FOR
---
NO

3 修改主库为归档模式

--创建归档目录并赋权限

[root@localhost ~]# mkdir /u01/archive
[root@localhost ~]# chown oracle:oinstall /u01/archive

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1043886080 bytes
Fixed Size		 2259840 bytes
Variable Size		 889193600 bytes
Database Buffers	 146800640 bytes
Redo Buffers		 5632000 bytes
Database mounted.
SQL> archive log list
Database log mode	 No Archive Mode
Automatic archival	 Disabled
Archive destination	 USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence	 7
SQL> alter database archivelog;
Database altered.
SQL> alter system set log_archive_dest_1='location=/u01/archive/' scope=spfile;
System altered.
SQL> archive log list
Database log mode	 Archive Mode
Automatic archival	 Enabled
Archive destination	 USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence	 7

4 添加主库的 standby redo log

主库添加 standby redo log:大小和 online redo 相同,比 online redo group 多一组。

SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ('/u01/app/oracle/oradata/orcl/redo04.log') size 50M;

Database altered.

SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 ('/u01/app/oracle/oradata/orcl/redo05.log') size 50M;

Database altered.

SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 ('/u01/app/oracle/oradata/orcl/redo06.log') size 50M;

Database altered.

SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 7 ('/u01/app/oracle/oradata/orcl/redo07.log') size 50M;

Database altered.

SQL> select GROUP#,SEQUENCE#,BYTES/1024/1024,STATUS from v$log;

 GROUP# SEQUENCE# BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------------
	 1	 7		 50 CURRENT
	 3	 6		 50 INACTIVE
	 2	 5		 50 INACTIVE

SQL> col member for a50 
SQL> select group#,type, member from v$logfile;

 GROUP# TYPE MEMBER
---------- ------- --------------------------------------------------
	 3 ONLINE /u01/app/oracle/oradata/orcl/redo03.log
	 2 ONLINE /u01/app/oracle/oradata/orcl/redo02.log
	 1 ONLINE /u01/app/oracle/oradata/orcl/redo01.log
	 4 STANDBY /u01/app/oracle/oradata/orcl/redo04.log
	 5 STANDBY /u01/app/oracle/oradata/orcl/redo05.log
	 6 STANDBY /u01/app/oracle/oradata/orcl/redo06.log
	 7 STANDBY /u01/app/oracle/oradata/orcl/redo07.log

7 rows selected.
5 在主备库分别创建 Listener 并配置静态注册
使用 netca 命令创建监听,netmgr 命令配置静态注册
--主库192.168.56.65监听
[oracle@localhost admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
 (SID_LIST =
 (SID_DESC =
 (GLOBAL_DBNAME = orcl)
 (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
 (SID_NAME = orcl)
 )
 )
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
 )
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 )
 )
ADR_BASE_LISTENER = /u01/app/oracle
--备库192.168.56.71监听
[oracle@localhost admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
 (SID_LIST =
 (SID_DESC =
 (GLOBAL_DBNAME = orcl)
 (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
 (SID_NAME = orcl)
 )
 )

LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
 )
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 )
 )

ADR_BASE_LISTENER = /u01/app/oracle

 SID_LIST_LISTENER 部分的内容就是静态注册,如果没有该参数,而且 Data Guard 启动顺序又不正确,

那么在 主库可能会报 PING[ARC1]: Heartbeat failed to connect to standby 'orcl_st'. Error is 12512. 错误,导致归档无法完成

6 在主备库添加 Oracle Net Service 
 特别说明一下在备库没有安装数据库的时候/u01/app/oracle/product/11.2.0/db_1/network/admin 目录下没有tnsnames.ora 文件
此时需要手工建netmgr 创建
 
 
--在主备库添加以下内容
    
    
    ORCL_PD =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.65)(PORT = 1521))

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )
ORCL_ST =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.71)(PORT = 1521))

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )
 
[oracle@localhost admin]$ cat tnsnames.ora 

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.56.65)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )
ORCL_PD =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.65)(PORT = 1521))

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )
ORCL_ST =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.71)(PORT = 1521))

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )
配置完成后,使用 tnsping 命令效验: 

[oracle@localhost admin]$ tnsping orcl_pd

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 24-APR-2017 20:58:35

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

Used parameter files:
/u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.65)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = orcl)))
OK (10 msec)
[oracle@localhost admin]$ tnsping orcl_st

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 24-APR-2017 20:58:37

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

Used parameter files:
/u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.71)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = orcl)))
OK (0 msec)
上面执行成功的前提条件是防火墙已关闭,或者开放1521端口
vi /etc/sysconfig/iptables
添加一行
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
重启防火墙
[root@localhost ~]# /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
[root@localhost ~]# 
7 在备库创建相关的目录
因为我们的备库没有创建实例,所以是没有相关的目录的,我们需要参考主库的位置来创建。
 
[oracle@localhost oracle]$ pwd /u01/app/oracle [oracle@localhost oracle]$ ls admin checkpoints fast_recovery_area oradiag_oracle cfgtoollogs diag oradata product [oracle@localhost oracle]$ 
--FRA目录
[oracle@localhost orcl]$ pwd
/u01/app/oracle/fast_recovery_area/orcl
--DATAFILE 

[oracle@localhost orcl]$ pwd
/u01/app/oracle/oradata/orcl

[oracle@localhost orcl]$ pwd
/u01/app/oracle/admin/orcl
8 在主库创建 pfile 文件并修改 pfile 内容 
SQL> create pfile from spfile; File created.
修改pfile

[oracle@localhost dbs]$ cat initorcl.ora 
orcl.__db_cache_size=146800640
orcl.__java_pool_size=4194304
orcl.__large_pool_size=587202560
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=25165824
orcl.__sga_target=1023410176
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=272629760
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4385144832
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.memory_target=1048576000
*.open_cursors=300
*.processes=1500
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=1655
*.undo_tablespace='UNDOTBS1'

--在pfile添加如下内容
*.db_unique_name=orcl_pd 
*.log_archive_config='dg_config=(orcl_pd,orcl_st)' 
*.log_archive_dest_1='location=/u01/archive valid_for=(all_logfiles,all_roles) db_unique_name=orcl_pd' 
*.log_archive_dest_2='service=orcl_st valid_for=(online_logfiles,primary_role) db_unique_name=orcl_st' 
*.log_archive_dest_state_1=enable 
*.log_archive_dest_state_2=enable 
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE 
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc 
*.standby_file_management='auto' 
*.fal_server='orcl_st'
注意: 
(1)在 oracle 11g 中,废弃了 fal_client 参数,也就是说不用配置。 
(2)log_archive_dest_n 这个参数中的Oracle Net Service名首位是一样的,前面写哪个,最后的db_unique_name 
 就写哪个,不要搞错了。 

如果主备库的路径不同,修改在主库的参数文件里添加如下 2 个参数:
  *.log_file_name_convert='/u02/oradata/orcl/','/u03/oradata/orcl/' 
  *.db_file_name_convert='/u02/oradata/orcl/','/u03/oradata/orcl/' 

前面的是旧的路径,后面的是新的路径
用pfile启动主库,并创建spfile
 
 
SQL> startup nomount ORA-00845: MEMORY_TARGET not supported on this system SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora' ORACLE instance started. Total System Global Area 1043886080 bytes Fixed Size 2259840 bytes Variable Size 889193600 bytes Database Buffers 146800640 bytes Redo Buffers 5632000 bytes SQL> create spfile from pfile;  SP2-0734: unknown command beginning "create sp..." - rest of line ignored. SQL> create spfile from pfile; File created.
9 将主库的口令文件,参数文件 copy 到备库并修改 
[oracle@localhost dbs]$ scp initorcl.ora 192.168.56.71:/u01/app/oracle/product/11.2.0/db_1/dbs
[email protected]'s password: 
initorcl.ora 100% 1672 1.6KB/s 00:00 
[oracle@localhost dbs]$ scp orapworcl 192.168.56.71:/u01/app/oracle/product/11.2.0/db_1/dbs
[email protected]'s password: 
orapworcl 100% 1536 1.5KB/s 00:00 
如果不存在,手工创建,使用 orapwd 命令。  
[oracle@dg1 /]$ orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/ orapwdave password=admin entries=30 

缺省情况下,win 下口令文件的格式是 pwdsid.ora,unix 下的格式是 orapwSID(大小写敏感)。  
Linux 默认位置为$ORACLE_HOME/dbs 目录下下,Windows 默认为$ORACLE_HOME/database 目录。
--修改备库pfile
[oracle@localhost dbs]$ cat initorcl.ora 
 orcl.__db_cache_size=146800640
 orcl.__java_pool_size=4194304
 orcl.__large_pool_size=587202560
 orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
 orcl.__pga_aggregate_target=25165824
 orcl.__sga_target=1023410176
 orcl.__shared_io_pool_size=0
 orcl.__shared_pool_size=272629760
 orcl.__streams_pool_size=0
 *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
 *.audit_trail='db'
 *.compatible='11.2.0.4.0'
 *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
 *.db_block_size=8192
 *.db_domain=''
 *.db_name='orcl'
 *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
 *.db_recovery_file_dest_size=4385144832
 *.diagnostic_dest='/u01/app/oracle'
 *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
 *.memory_target=1048576000
 *.open_cursors=300
 *.processes=1500
 *.remote_login_passwordfile='EXCLUSIVE'
 *.sessions=1655
 *.undo_tablespace='UNDOTBS1'
#添加一下内容

*.db_unique_name=orcl_st 
*.log_archive_config='dg_config=(orcl_pd,orcl_st)' 
*.log_archive_dest_1='location=/u01/archive valid_for=(all_logfiles,all_roles) db_unique_name=orcl_st' 
*.log_archive_dest_2='service=orcl_pd valid_for=(online_logfiles,primary_role) db_unique_name=orcl_pd' 
*.log_archive_dest_state_1=enable 
*.log_archive_dest_state_2=enable 
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE 
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc 
*.standby_file_management='auto' 
*.fal_server='orcl_pd' 

--创建spfile 

10 使用 RMAN 备份主库 

在主备库 创建 /u01/backup

[oracle@localhost u01]$ mkdir backup
 
备份语句如下:

run{  
allocate channel c1 type disk; 
allocate channel c2 type disk;
sql 'alter system archive log current';
backup format '/u01/backup/db_%U_%T' skip inaccessible filesperset 5 database;
sql 'alter system archive log current';
backup format '/u01/backup/db_%U_%T' skip inaccessible filesperset 5 archivelog all delete input;
backup current controlfile for standby format='/u01/backup/control_%U';
release channel c2;
release channel c1;
}


[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Apr 24 14:26:08 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1468135053)
run{  

allocate channel c1 type disk; 

allocate channel c2 type disk;

sql 'alter system archive log current';

backup format '/u01/backup/db_%U_%T' skip inaccessible filesperset 5 database;

sql 'alter system archive log current';

backup format '/u01/backup/db_%U_%T' skip inaccessible filesperset 5 archivelog all delete input;

backup current controlfile for standby format='/u01/backup/control_%U';

release channel c2;

release channel c1;

11> }
using target database control file instead of recovery catalog

allocated channel: c1

channel c1: SID=32 device type=DISK
allocated channel: c2

channel c2: SID=52 device type=DISK
sql statement: alter system archive log current
Starting backup at 24-APR-17

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

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

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

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

channel c1: starting piece 1 at 24-APR-17

channel c2: starting full datafile backup set

channel c2: specifying datafile(s) in backup set

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

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

channel c2: starting piece 1 at 24-APR-17
 
channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_07s2gbo6_1_1_20170424 tag=TAG20170424T142614 comment=NONE

channel c1: backup set complete, elapsed time: 00:01:55

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

channel c2: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_08s2gbo7_1_1_20170424 tag=TAG20170424T142614 comment=NONE

channel c2: backup set complete, elapsed time: 00:01:55

channel c2: starting full datafile backup set

channel c2: specifying datafile(s) in backup set

including current SPFILE in backup set

channel c2: starting piece 1 at 24-APR-17

including current control file in backup set

channel c1: starting piece 1 at 24-APR-17

channel c2: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0as2gbrq_1_1_20170424 tag=TAG20170424T142614 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:01

channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_09s2gbrq_1_1_20170424 tag=TAG20170424T142614 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 24-APR-17
sql statement: alter system archive log current
Starting backup at 24-APR-17

current log archived

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=7 RECID=1 STAMP=940419935

input archived log thread=1 sequence=8 RECID=2 STAMP=940419945

input archived log thread=1 sequence=9 RECID=3 STAMP=940421052

input archived log thread=1 sequence=10 RECID=4 STAMP=940421055

input archived log thread=1 sequence=11 RECID=5 STAMP=940424201

channel c1: starting piece 1 at 24-APR-17

channel c2: starting archived log backup set

channel c2: specifying archived log(s) in backup set

input archived log thread=1 sequence=12 RECID=6 STAMP=940424207

input archived log thread=1 sequence=13 RECID=7 STAMP=940427868

input archived log thread=1 sequence=14 RECID=9 STAMP=940427874

input archived log thread=1 sequence=15 RECID=11 STAMP=940427963

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

channel c2: starting piece 1 at 24-APR-17

channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0bs2gbrv_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

channel c1: deleting archived log(s)

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_7_940354317.arc RECID=1 STAMP=940419935

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_8_940354317.arc RECID=2 STAMP=940419945

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_9_940354317.arc RECID=3 STAMP=940421052

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_10_940354317.arc RECID=4 STAMP=940421055

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_11_940354317.arc RECID=5 STAMP=940424201

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set

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

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

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

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

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

channel c1: starting piece 1 at 24-APR-17

channel c2: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0cs2gbrv_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:02

channel c2: deleting archived log(s)

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_12_940354317.arc RECID=6 STAMP=940424207

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_13_940354317.arc RECID=7 STAMP=940427868

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_14_940354317.arc RECID=9 STAMP=940427874

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_15_940354317.arc RECID=11 STAMP=940427963

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_16_940354317.arc RECID=13 STAMP=940518322

channel c2: starting archived log backup set

channel c2: specifying archived log(s) in backup set

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

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

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

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

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

channel c2: starting piece 1 at 24-APR-17

channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0ds2gbs1_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:00

channel c1: deleting archived log(s)

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_17_940354317.arc RECID=14 STAMP=940518326

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_18_940354317.arc RECID=15 STAMP=940518523

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_19_940354317.arc RECID=16 STAMP=940518541

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_20_940354317.arc RECID=17 STAMP=940518560

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_21_940354317.arc RECID=18 STAMP=940518561

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set

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

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

input archived log thread=1 sequence=29 RECID=27 STAMP=940518766

input archived log thread=1 sequence=30 RECID=29 STAMP=940518770

input archived log thread=1 sequence=31 RECID=31 STAMP=940518788

channel c1: starting piece 1 at 24-APR-17

channel c2: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0es2gbs1_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:00

channel c2: deleting archived log(s)

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_22_940354317.arc RECID=19 STAMP=940518561

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_23_940354317.arc RECID=20 STAMP=940518562

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_24_940354317.arc RECID=21 STAMP=940518562

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_25_940354317.arc RECID=22 STAMP=940518610

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_26_940354317.arc RECID=23 STAMP=940518611

channel c2: starting archived log backup set

channel c2: specifying archived log(s) in backup set

input archived log thread=1 sequence=32 RECID=45 STAMP=940518953

input archived log thread=1 sequence=33 RECID=47 STAMP=940519384

input archived log thread=1 sequence=34 RECID=49 STAMP=940519735

input archived log thread=1 sequence=35 RECID=50 STAMP=940519750

input archived log thread=1 sequence=36 RECID=51 STAMP=940519878

channel c2: starting piece 1 at 24-APR-17

channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0fs2gbs1_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

channel c1: deleting archived log(s)

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_27_940354317.arc RECID=24 STAMP=940518614

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_28_940354317.arc RECID=25 STAMP=940518756

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_29_940354317.arc RECID=27 STAMP=940518766

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_30_940354317.arc RECID=29 STAMP=940518770

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_31_940354317.arc RECID=31 STAMP=940518788

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=37 RECID=52 STAMP=940520373

input archived log thread=1 sequence=38 RECID=55 STAMP=942157412

channel c1: starting piece 1 at 24-APR-17

channel c2: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0gs2gbs2_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:00

channel c2: deleting archived log(s)

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_32_940354317.arc RECID=45 STAMP=940518953

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_33_940354317.arc RECID=47 STAMP=940519384

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_34_940354317.arc thread=1 sequence=34

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_35_940354317.arc thread=1 sequence=35

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_36_940354317.arc thread=1 sequence=36

channel c2: starting archived log backup set

channel c2: specifying archived log(s) in backup set

input archived log thread=1 sequence=1 RECID=53 STAMP=942157404

input archived log thread=1 sequence=2 RECID=54 STAMP=942157411

input archived log thread=1 sequence=3 RECID=56 STAMP=942157574

input archived log thread=1 sequence=4 RECID=57 STAMP=942157694

input archived log thread=1 sequence=5 RECID=58 STAMP=942157694

channel c2: starting piece 1 at 24-APR-17

channel c2: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0is2gbs2_1_1_20170424 tag=TAG20170424T142814 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:01

channel c2: deleting archived log(s)

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/archive/1_1_942157350.arc thread=1 sequence=1

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/archive/1_2_942157350.arc thread=1 sequence=2

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/archive/1_3_942157350.arc thread=1 sequence=3

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/archive/1_4_942157350.arc thread=1 sequence=4

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/archive/1_5_942157350.arc thread=1 sequence=5

channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/db_0hs2gbs2_1_1_20170424 tag=TAG20170424T142814 comment=NONE

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

channel c1: deleting archived log(s)

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/app/oracle/oradata/orcl/archivelog/1_37_940354317.arc thread=1 sequence=37

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/archive/1_38_940354317.arc thread=1 sequence=38

Finished backup at 24-APR-17
Starting backup at 24-APR-17

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

including standby control file in backup set

channel c1: starting piece 1 at 24-APR-17

channel c1: finished piece 1 at 24-APR-17

piece handle=/u01/backup/control_0js2gbs7_1_1 tag=TAG20170424T142823 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 24-APR-17
released channel: c2
released channel: c1

 

11 将主库的备份文件全部 copy 到备库的相同位置
RMAN 备份采用的是 nocatalog 模式,简单一点,保证主备库目录的一直,如果不一直就需要重新进行 catalog。

[oracle@localhost backup]$ ls
control_0js2gbs7_1_1      db_0bs2gbrv_1_1_20170424  db_0gs2gbs2_1_1_20170424
db_07s2gbo6_1_1_20170424  db_0cs2gbrv_1_1_20170424  db_0hs2gbs2_1_1_20170424
db_08s2gbo7_1_1_20170424  db_0ds2gbs1_1_1_20170424  db_0is2gbs2_1_1_20170424
db_09s2gbrq_1_1_20170424  db_0es2gbs1_1_1_20170424
db_0as2gbrq_1_1_20170424  db_0fs2gbs1_1_1_20170424
[oracle@localhost backup]$ scp * 192.168.56.71:/u01/backup
[email protected]'s password: 
control_0js2gbs7_1_1                         100% 9760KB   9.5MB/s   00:00    
db_07s2gbo6_1_1_20170424                     100%  471MB  26.2MB/s   00:18    
db_08s2gbo7_1_1_20170424                     100%  715MB  23.8MB/s   00:30    
db_09s2gbrq_1_1_20170424                     100% 9760KB   9.5MB/s   00:01    
db_0as2gbrq_1_1_20170424                     100%   96KB  96.0KB/s   00:00    
db_0bs2gbrv_1_1_20170424                     100% 5253KB   5.1MB/s   00:01    
db_0cs2gbrv_1_1_20170424                     100%   13MB  12.8MB/s   00:01    
db_0ds2gbs1_1_1_20170424                     100%  528KB 527.5KB/s   00:00    
db_0es2gbs1_1_1_20170424                     100%   36KB  35.5KB/s   00:00    
db_0fs2gbs1_1_1_20170424                     100%  108KB 108.0KB/s   00:00    
db_0gs2gbs2_1_1_20170424                     100% 1993KB   2.0MB/s   00:00    
db_0hs2gbs2_1_1_20170424                     100%   31MB  31.0MB/s   00:01    
db_0is2gbs2_1_1_20170424                     100%  631KB 631.0KB/s   00:00    

12 在备库使用 RMAN 恢复备库

--启动备库到nomount 状态:

SQL> conn /as sysdba
ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on

检查原因原来是 /u01/app/oracle/admin/orcl 目录下adump 未建

[oracle@localhost orcl]$ pwd
/u01/app/oracle/admin/orcl
[oracle@localhost orcl]$ mkdir adump dpdump pfile scripts

建好目录adump 在启动就没问题了

SQL> startup nomount
ORACLE instance started.

Total System Global Area 1043886080 bytes
Fixed Size		 2259840 bytes
Variable Size		 889193600 bytes
Database Buffers	 146800640 bytes
Redo Buffers		 5632000 bytes
SQL>

如果控制文件没有备份,也可以直接恢复成 standby 的控制文件:

RMAN> restore standby controlfile from '/sasbackup/ctl_file_g4qfmqm6_1_1_20150828';
 
--在备库执行 duplicate 操作:

[oracle@localhost ~]$ rman target sys/oracle@orcl_pd auxiliary sys/oracle@orcl_st

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Apr 24 14:43:08 2017

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

connected to target database: ORCL (DBID=1468135053)
connected to auxiliary database: ORCL (not mounted)
duplicate target database for standby nofilenamecheck dorecover; 
--因为我们的数据文件路径相同,所以这里加上了 nofilenamecheck,如果不同,就不需要加了。 

RMAN> duplicate target database for standby nofilenamecheck dorecover;

Starting Duplicate Db at 24-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=22 device type=DISK

contents of Memory Script:
{
   set until scn  1117059;
   restore clone standby controlfile;
}
executing Memory Script

executing command: SET until clause

Starting restore at 24-APR-17
using channel ORA_AUX_DISK_1

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 /u01/backup/db_09s2gbrq_1_1_20170424
channel ORA_AUX_DISK_1: piece handle=/u01/backup/db_09s2gbrq_1_1_20170424 tag=TAG20170424T142614
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/orcl/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/orcl/control02.ctl
Finished restore at 24-APR-17

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set until scn  1117059;
   set newname for tempfile  1 to 
 "/u01/app/oracle/oradata/orcl/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to 
 "/u01/app/oracle/oradata/orcl/system01.dbf";
   set newname for datafile  2 to 
 "/u01/app/oracle/oradata/orcl/sysaux01.dbf";
   set newname for datafile  3 to 
 "/u01/app/oracle/oradata/orcl/undotbs01.dbf";
   set newname for datafile  4 to 
 "/u01/app/oracle/oradata/orcl/users01.dbf";
   set newname for datafile  5 to 
 "/u01/app/oracle/oradata/orcl/example01.dbf";
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/oradata/orcl/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 24-APR-17
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/db_08s2gbo7_1_1_20170424
channel ORA_AUX_DISK_1: piece handle=/u01/backup/db_08s2gbo7_1_1_20170424 tag=TAG20170424T142614
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/db_07s2gbo6_1_1_20170424
channel ORA_AUX_DISK_1: piece handle=/u01/backup/db_07s2gbo6_1_1_20170424 tag=TAG20170424T142614
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 24-APR-17

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=3 STAMP=942158744 file name=/u01/app/oracle/oradata/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=4 STAMP=942158744 file name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=5 STAMP=942158744 file name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=6 STAMP=942158744 file name=/u01/app/oracle/oradata/orcl/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=7 STAMP=942158744 file name=/u01/app/oracle/oradata/orcl/example01.dbf

contents of Memory Script:
{
   set until scn  1117059;
   recover
   standby
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 24-APR-17
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=4
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=5
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/db_0is2gbs2_1_1_20170424
channel ORA_AUX_DISK_1: piece handle=/u01/backup/db_0is2gbs2_1_1_20170424 tag=TAG20170424T142814
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/archive1_4_942157350.arc thread=1 sequence=4
channel clone_default: deleting archived log(s)
archived log file name=/u01/archive1_4_942157350.arc RECID=1 STAMP=942158746
archived log file name=/u01/archive1_5_942157350.arc thread=1 sequence=5
channel clone_default: deleting archived log(s)
archived log file name=/u01/archive1_5_942157350.arc RECID=2 STAMP=942158746
media recovery complete, elapsed time: 00:00:00
Finished recover at 24-APR-17
Finished Duplicate Db at 24-APR-17

13 启动备库

--完成 duplicate 之后,备库就是 mount 状态: 

SQL>  select open_mode from v$database; 

OPEN_MODE
--------------------
MOUNTED

SQL> alter database open; 

Database altered.
SQL>  select open_mode from v$database; 

OPEN_MODE
--------------------
READ ONLY 

14重新创建standby logfile 


--备库添加 online redo log 和 standby redo log: 
  
备库我们需要重点关注:

 
SQL> select group#,type, member from v$logfile; 

    GROUP# TYPE    MEMBER
---------- ------- --------------------------------------------------
	 3 ONLINE  /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_3_dhv7ryyj_.log

	 2 ONLINE  /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_2_dhv7ry0z_.log

	 1 ONLINE  /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_1_dhv7rwlf_.log

	 4 STANDBY /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_4_dhv7s05g_.log

    GROUP# TYPE    MEMBER
---------- ------- --------------------------------------------------

	 5 STANDBY /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_5_dhv7s136_.log

	 6 STANDBY /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_6_dhv7s1z7_.log

	 7 STANDBY /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_7_dhv7s3cw_.log


7 rows selected.

SQL> select GROUP#,SEQUENCE#,BYTES/1024/1024,STATUS from v$standby_log; 

    GROUP#  SEQUENCE# BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------
	 4	    0		   50 UNASSIGNED
	 5	    8		   50 ACTIVE
	 6	    0		   50 UNASSIGNED
	 7	    0		   50 UNASSIGNED


这个是默认恢复的情况。 都恢复到 FRA 里了。 我们需要对他们进行重建。 改到本地的归档目录下去。 

SQL>  alter database drop logfile group 4; 

Database altered.

SQL>  alter database drop logfile group 6;     

Database altered.

SQL>  alter database drop logfile group 7; 

Database altered.

SQL>  alter database drop logfile group 5; 
 alter database drop logfile group 5
*
ERROR at line 1:
ORA-00261: log 5 of thread 1 is being archived or modified
ORA-00312: online log 5 thread 1:
'/u01/app/oracle/fast_recovery_area/ORCL_ST/onlinelog/o1_mf_5_dhv7s136_.log'

当前的 online log,不能删除。 
 
在主库 switch 一下就可以了。

SQL> alter system switch logfile;

System altered. 

SQL>  alter database drop logfile group 5; 

Database altered.

SQL>  select group#,type, member from v$logfile;

    GROUP# TYPE    MEMBER
---------- ------- --------------------------------------------------
	 3 ONLINE  /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_3_dhv7ryyj_.log

	 2 ONLINE  /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_2_dhv7ry0z_.log

	 1 ONLINE  /u01/app/oracle/fast_recovery_area/ORCL_ST/onlinel
		   og/o1_mf_1_dhv7rwlf_.log

	 4 STANDBY /u01/app/oracle/oradata/orcl/redo04.log
	 5 STANDBY /u01/app/oracle/oradata/orcl/redo05.log

    GROUP# TYPE    MEMBER
---------- ------- --------------------------------------------------
	 6 STANDBY /u01/app/oracle/oradata/orcl/redo06.log
	 7 STANDBY /u01/app/oracle/oradata/orcl/redo07.log

7 rows selected.

SQL>  alter database recover managed standby database disconnect from session; 

Database altered.

15 验证 DG 
 
--主库 

SQL>  col error for a10 
SQL>  col dest_name for a20
SQL>  select DEST_NAME,STATUS,PROCESS,ERROR,TRANSMIT_MODE from v$archive_dest WHERE TARGET='STANDBY';

DEST_NAME      STATUS    PROCESS   ERROR      TRANSMIT_MOD
-------------------- --------- ---------- ---------- ------------
LOG_ARCHIVE_DEST_2   VALID     LGWR       ASYNCHRONOUS

SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

PROCESS   STATUS   THREAD#  SEQUENCE#  BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH   CLOSING  1   31       1        814
ARCH   CLOSING  1   30       1  98
ARCH   CONNECTED  0    0       0   0
ARCH   CONNECTED  0    0       0   0
LNS   WRITING  1   32   55750   1

SQL> create table leo(x number(10));

Table created.

SQL> insert into leo values(10);

1 row created.

SQL> insert into leo values(10);

1 row created.

SQL> commit;

Commit complete.

SQL>  alter system switch logfile;

System altered.

SQL> insert into leo values(10);

1 row created.

SQL> commit;

Commit complete.

SQL>  alter system switch logfile;

System altered.

--备库 

SQL>  SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

PROCESS   STATUS	  THREAD#  SEQUENCE#	 BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH	  CLOSING		1	  32	  55296        475
ARCH	  CLOSING		1	  30	      1 	98
ARCH	  CONNECTED		0	   0	      0 	 0
ARCH	  CLOSING		1	  31	      1        814
RFS	  IDLE			0	   0	      0 	 0
RFS	  IDLE			0	   0	      0 	 0
MRP0	  WAIT_FOR_LOG		1	  33	      0 	 0
RFS	  IDLE			1	  33	    101 	 1

8 rows selected.

SQL> desc leo

 Name        Null?    Type

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

 X          NUMBER(10)
SQL> select * from leo;
  X

----------

 10
 10
SQL> select * from leo;
  X

----------

 10
 10
 10

猜你喜欢

转载自blog.csdn.net/leo__1990/article/details/91434506