oel 7.9搭建oracle 11.2.0.4物理备库

文档课题:oel 7.9搭建oracle 11.2.0.4物理备库.
实验目标:主库已存在一个备库,搭建第二个备库.
创建时间:2021/12/01
1、规划

2、磁盘处理
2.1、划分磁盘空间
#fdisk /dev/sdb
为meddocbak备库划分20g.
[root@bigdata ~]# partprobe
[root@bigdata ~]# lsblk -p
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
/dev/sdb 8:16 0 100G 0 disk
├─/dev/sdb2 8:18 0 30G 0 part
│ └─/dev/mapper/meddocdg-meddocdg 252:2 0 30G 0 lvm /meddocdg
├─/dev/sdb3 8:19 0 20G 0 part
└─/dev/sdb1 8:17 0 50G 0 part
└─/dev/mapper/hisorcldg-hisorcldg 252:3 0 50G 0 lvm /hisorcldg
/dev/sr0 11:0 1 4.5G 0 rom
/dev/sda 8:0 0 100G 0 disk
├─/dev/sda2 8:2 0 98G 0 part
│ ├─/dev/mapper/ol-swap 252:1 0 16G 0 lvm [SWAP]
│ └─/dev/mapper/ol-root 252:0 0 82G 0 lvm /
└─/dev/sda1 8:1 0 2G 0 part /boot
# pvcreate /dev/sdb3 #创建pv
# vgcreate -s 4M meddocdgbak /dev/sdb3 #创建vg meddocdgbak
# lvcreate -l 100%vg -n meddocdgbak meddocdgbak #创建lv meddocdgbak
# mkfs.xfs /dev/meddocdgbak/meddocdgbak

2.2、挂载
创建挂载点:
# mkdir /meddocdgbak
# chown -R oracle:oinstall /meddocdgbak
# blkid |grep meddocdgbak
/dev/mapper/meddocdgbak-meddocdgbak: UUID="7cd288a4-84b9-4d2a-b5bb-7d89815cfd54" TYPE="xfs"

# vim /etc/fstab
添加以下:
UUID="7cd288a4-84b9-4d2a-b5bb-7d89815cfd54" /meddocdgbak xfs defaults 0 0

# mount -a

3、主库操作
3.1、归档情况
> archive log list;
> select force_logging from v$database;
3.2、查看STANDBY日志文件
SQL> select thread#,group#,members,bytes/1024/1024 as M from v$log;

THREAD# GROUP# MEMBERS M
---------- ---------- ---------- ----------
1 1 1 50
1 2 1 50
1 3 1 50

SQL> select group#,bytes/1024/1024 as M from v$standby_log;

GROUP# M
---------- ----------
11 50
12 50
13 50
14 50

Database altered.
3.3、修改参数文件
#设置log_archive_config
> alter system set log_archive_config='dg_config=(orcl150,orcl151,meddocdgbak)';
#设置备库归档目的地
> alter system set log_archive_dest_3='service=meddocdgbak lgwr async VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=meddocdgbak';

3.4、拷贝参数文件
用spfile文件创建pfile 文件:
> create pfile='/home/oracle/pfilemeddocdgbak.ora' from spfile;
$ ll
total 4
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Desktop
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Documents
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Downloads
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Music
-rw-r--r-- 1 oracle oinstall 2129 Dec 1 10:19 pfilemeddocdgbak.ora
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Pictures
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Public
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Templates
drwxr-xr-x 2 oracle oinstall 6 Nov 6 23:46 Videos

$ scp pfilemeddocdgbak.ora oracle@192.168.133.226:/u01/app/oracle/product/11.2.0/db_1/dbs
3.5、拷贝密码文件
$ scp orapworcl150 oracle@192.168.133.226:/u01/app/oracle/product/11.2.0/db_1/dbs
3.6、修改TNS 配置文件
$ vim tnsnames.ora
$ 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.

ORCL150 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.150)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl150)
)
)

ORCL151 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.151)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl151)
)
)

MEDDOCDGBAK =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.226)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = meddocdgbak)
)
)

#蓝色为修改部分
3.7、重启监听服务
$ lsnrctl stop
$ lsnrctl start

4、备库操作
4.1、添加实例名
$ vi /etc/oratab
添加以下:
meddocdgbak:/u01/app/oracle/product/11.2.0/db_1:N

$ export ORACLE_SID=meddocdgbak

4.2、重命名文件
[oracle@bigdata dbs]$ ll
total 60
-rw-rw---- 1 oracle oinstall 1544 Dec 1 00:15 hc_hisorcldg.dat
-rw-rw---- 1 oracle oinstall 1544 Dec 1 09:20 hc_meddocdg.dat
-rw-r--r-- 1 oracle oinstall 1744 Nov 29 22:16 inithisorcldg.ora
-rw-r--r-- 1 oracle oinstall 1675 Nov 30 14:42 initmeddocdg.ora
-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r----- 1 oracle oinstall 24 Nov 30 00:15 lkHISORCLDG
-rw-r----- 1 oracle oinstall 24 Nov 30 15:16 lkMEDDOCDG
-rw-r----- 1 oracle oinstall 1536 Nov 30 00:15 orapwhisorcldg
-rw-r----- 1 oracle oinstall 1536 Nov 30 15:16 orapwmeddocdg
-rw-r----- 1 oracle oinstall 1536 Dec 1 10:26 orapworcl150
-rw-r--r-- 1 oracle oinstall 2129 Dec 1 10:24 pfilemeddocdgbak.ora
-rw-r----- 1 oracle oinstall 5632 Nov 30 23:37 spfilehisorcldg.ora
-rw-r----- 1 oracle oinstall 5632 Dec 1 09:11 spfilemeddocdg.ora

[oracle@bigdata dbs]$ mv orapworcl150 orapwmeddocdgbak

4.3、修改参数文件
[oracle@bigdata dbs]$ vi pfilemeddocdgbak.ora

*._allow_resetlogs_corruption=FALSE
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl150'
*.db_recovery_file_dest_size=4385144832
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcl151XDB)'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.memory_target=3217031168
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.log_archive_config='dg_config=(orcl150,meddocdgbak)'
*.control_files='/u01/app/oracle/oradata/meddocdgbak/control01.ctl','/u01/app/oracle/fast_recovery_area/meddocdgbak/control02.ctl'
*.audit_file_dest='/u01/app/oracle/admin/meddocdgbak/adump'
*.db_unique_name='meddocdgbak'
*.fal_client='meddocdgbak'
*.fal_server='orcl150'
*.log_archive_dest_1='location=/u01/app/oracle/oradata/meddocdgbak/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=meddocdgbak'
*.log_archive_dest_2='service=orcl150 lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=orcl150'
*.db_file_name_convert='/u01/app/oracle/oradata/orcl150/','/meddocdgbak/app/oracle/oradata/meddocdgbak/','/u01/oracle/','/meddocdgbak/oracle/'
*.log_file_name_convert='/u01/app/oracle/oradata/orcl150/','/meddocdgbak/app/oracle/oradata/meddocdgbak/','/u01/app/oracle/fast_recovery_area/orcl150/','/meddocdgbak/app/oracle/fast_recovery_area/meddocdgbak/'

#红色为修改内容
4.4、创建目录
[oracle@bigdata dbs]$ mkdir -p /u01/app/oracle/oradata/meddocdgbak/
[oracle@bigdata dbs]$ mkdir -p /u01/app/oracle/fast_recovery_area/meddocdgbak/
[oracle@bigdata dbs]$ mkdir -p /u01/app/oracle/admin/meddocdgbak/adump
[oracle@bigdata dbs]$ mkdir -p /u01/app/oracle/oradata/meddocdgbak/archivelog/
[oracle@bigdata dbs]$ mkdir -p /meddocdgbak/app/oracle/oradata/meddocdgbak/
[oracle@bigdata dbs]$ mkdir -p /meddocdgbak/oracle/
[oracle@bigdata dbs]$ mkdir -p /meddocdgbak/app/oracle/oradata/meddocdgbak/
[oracle@bigdata dbs]$ mkdir -p /meddocdgbak/app/oracle/fast_recovery_area/meddocdgbak/
4.5、修改监听配置文件
修改监听配置文件:
[oracle@bigdata admin]$ vi listener.ora
[oracle@bigdata 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 = hisorcldg)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = hisorcldg)
)
(SID_DESC =
(GLOBAL_DBNAME = meddocdg)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = meddocdg)
)
(SID_DESC =
(GLOBAL_DBNAME = meddocdgbak)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = meddocdgbak)
)
)

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

ADR_BASE_LISTENER = /u01/app/oracle

#蓝色为添加部分
4.6、修改 TNS 配置文件
[oracle@bigdata admin]$ vi tnsnames.ora
[oracle@bigdata 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.

HISORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.227)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = hisorcl)
)
)

HISORCLDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.226)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = hisorcldg)
)
)

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.225)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

MEDDOCDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.226)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = meddocdg)
)
)

MEDDOCDGBAK =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.226)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = meddocdgbak)
)
)

ORCL150 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.150)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl150)
)
)

备注:蓝色为添加部分
4.7、重启监听服务
[oracle@bigdata admin]$ lsnrctl stop
[oracle@bigdata admin]$ lsnrctl start

4.8、备库启动到 nomount 状态
[oracle@bigdata admin]$ echo $ORACLE_SID
meddocdgbak
[oracle@bigdata admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 1 11:51:36 2021

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

Connected to an idle instance.

SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/pfilemeddocdgbak.ora';
ORACLE instance started.

Total System Global Area 3206836224 bytes
Fixed Size 2257520 bytes
Variable Size 1811942800 bytes
Database Buffers 1375731712 bytes
Redo Buffers 16904192 bytes
SQL> create spfile from pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/pfilemeddocdgbak.ora';

File created.
SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 3206836224 bytes
Fixed Size 2257520 bytes
Variable Size 1811942800 bytes
Database Buffers 1375731712 bytes
Redo Buffers 16904192 bytes

5、验证监听和TNS配置
主库:
ping 192.168.133.226
tnsping meddocdgbak
备库:
ping 192.168.133.150
tnsping orcl150

注:测试OK后,执行以下:
5.1、主库验证
$ sqlplus sys/oracle_4U@192.168.133.150:1521/orcl150 as sysdba
> show parameter db_unique_name;
$ sqlplus sys/oracle_4U@192.168.133.226:1521/meddocdgbak as sysdba
5.2、备库验证
$ export ORACLE_SID=meddocdgbak
$ sqlplus sys/oracle_4U@192.168.133.226:1521/meddocdgbak as sysdba
$ sqlplus sys/oracle_4U@192.168.133.150:1521/orcl150 as sysdba
备注:在主备库上都能测试通过的条件下才执行下面步骤

6、恢复
6.1、恢复数据库
注:确认备库nomount
然后执行以下:
[oracle@bigdata dbs]$ rman target sys/oracle_4U@orcl150 auxiliary sys/oracle_4U@meddocdgbak

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 1 12:53:27 2021

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

connected to target database: ORCL150 (DBID=4034131047)
connected to auxiliary database: ORCL150 (not mounted)

RMAN> duplicate target database for standby from active database;

Starting Duplicate Db at 01-DEC-21
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=193 device type=DISK

contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl150' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapwmeddocdgbak' ;
}
executing Memory Script

Starting backup at 01-DEC-21
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=71 device type=DISK
Finished backup at 01-DEC-21

contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/meddocdgbak/control01.ctl';
restore clone controlfile to '/u01/app/oracle/fast_recovery_area/meddocdgbak/control02.ctl' from
'/u01/app/oracle/oradata/meddocdgbak/control01.ctl';
}
executing Memory Script

Starting backup at 01-DEC-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl150.f tag=TAG20211201T130321 RECID=17 STAMP=1090155801
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 01-DEC-21

Starting restore at 01-DEC-21
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 01-DEC-21

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 newname for tempfile 1 to
"/meddocdgbak/app/oracle/oradata/meddocdgbak/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/meddocdgbak/app/oracle/oradata/meddocdgbak/system01.dbf";
set newname for datafile 2 to
"/meddocdgbak/app/oracle/oradata/meddocdgbak/sysaux01.dbf";
set newname for datafile 3 to
"/meddocdgbak/app/oracle/oradata/meddocdgbak/undotbs01.dbf";
set newname for datafile 4 to
"/meddocdgbak/app/oracle/oradata/meddocdgbak/users01.dbf";
set newname for datafile 5 to
"/meddocdgbak/app/oracle/oradata/meddocdgbak/example01.dbf";
set newname for datafile 6 to
"/meddocdgbak/oracle/audit01.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/meddocdgbak/app/oracle/oradata/meddocdgbak/system01.dbf" datafile
2 auxiliary format
"/meddocdgbak/app/oracle/oradata/meddocdgbak/sysaux01.dbf" datafile
3 auxiliary format
"/meddocdgbak/app/oracle/oradata/meddocdgbak/undotbs01.dbf" datafile
4 auxiliary format
"/meddocdgbak/app/oracle/oradata/meddocdgbak/users01.dbf" datafile
5 auxiliary format
"/meddocdgbak/app/oracle/oradata/meddocdgbak/example01.dbf" datafile
6 auxiliary format
"/meddocdgbak/oracle/audit01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /meddocdgbak/app/oracle/oradata/meddocdgbak/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

executing command: SET NEWNAME

Starting backup at 01-DEC-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl150/system01.dbf
output file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/system01.dbf tag=TAG20211201T130329
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl150/sysaux01.dbf
output file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/sysaux01.dbf tag=TAG20211201T130329
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:36
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl150/example01.dbf
output file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/example01.dbf tag=TAG20211201T130329
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=/u01/app/oracle/oradata/orcl150/undotbs01.dbf
output file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/undotbs01.dbf tag=TAG20211201T130329
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/u01/oracle/audit01.dbf
output file name=/meddocdgbak/oracle/audit01.dbf tag=TAG20211201T130329
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl150/users01.dbf
output file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/users01.dbf tag=TAG20211201T130329
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 01-DEC-21

sql statement: alter system archive log current

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

datafile 1 switched to datafile copy
input datafile copy RECID=17 STAMP=1090155926 file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=18 STAMP=1090155926 file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=19 STAMP=1090155926 file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=20 STAMP=1090155926 file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=21 STAMP=1090155926 file name=/meddocdgbak/app/oracle/oradata/meddocdgbak/example01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=22 STAMP=1090155926 file name=/meddocdgbak/oracle/audit01.dbf
Finished Duplicate Db at 01-DEC-21

6.2、开启实时同步
备库执行:
> alter database open;
> select status from v$instance;
> select database_role,open_mode from v$database;

DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
> alter database recover managed standby database using current logfile disconnect from session;
7、验证同步
7.1、最大归档序号
主库执行:
SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
39
备库验证:
SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
39
7.2、日志切换
主库执行:
SQL> alter system archive log current;

System altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
40
备库验证:
SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
40
7.3、主备库状态
主库执行:
SQL> select switchover_status,database_role from v$database;

SWITCHOVER_STATUS DATABASE_ROLE
---------------------------------------- --------------------------------
SESSIONS ACTIVE PRIMARY

备库执行:
SQL> select switchover_status,database_role from v$database;

SWITCHOVER_STATUS DATABASE_ROLE
---------------------------------------- --------------------------------
NOT ALLOWED PHYSICAL STANDBY
7.4、创建表测试
主库执行:
SQL> create table dg(id number);
SQL> insert into dg values(1);
SQL> commit;
SQL> select * from dg;

ID
----------
1
备库验证:
SQL> select * from dg;

ID
----------
1
DG 同步,DG搭建结束.