数据库迁移方案之DG方式迁移

一:环境信息

1)主库(单实例)

主机平台:AIX6.1

数据库版本:11.2.0.3(psu5)

2)备库(部署了crs)

主机平台:AIX6.1

数据库版本:11.2.0.3(psu5)

二:方案背景

  由于业务量增加,数据库需要由单实例,改成两节点rac。为了减少停机时间,采用DG方式迁移。

三迁移方案:

1.检查数据库是否支持Data Guard(只有企业版才支持DG)

SQL> select * from v$option where parameter = ‘Managed Standby‘;
PARAMETER                                                        VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
Managed Standby                                                  TRUE

2.修改主库为归档模式及force logging状态
1)

SQL> alter database force logging;
Database altered.

2)
SQL> archive log list;
如果未开归档,开启归档模式

alter system set log_archive_dest_2=‘location=/archlog/egap‘;
alter system set log_archive_format=‘egap_%t_%s_%r.arch‘ scope=spfile; --静态参数,重启后生效
shutdown immediate;
startup mount;
alter database archivelog;
alter database open;
archive log list;

3.创建备库pfile文件
在主库上创建pfile,修改,并添加DG备库所有参数,然后传至备库

SQL> create pfile=‘/data01/pfileegap‘ from spfile;

1)备库需要添加的参数
DB_UNIQUE_NAME;LOG_ARCHIVE_DEST_1;FAL_SERVER;FAL_CLIENT; STANDBY_FILE_MANAGEMENT=AUTO;DB_FILE_NAME_CONVERT;LOG_FILE_NAME_CONVERT
2)根据pfile中涉及到路径需要提前在备库主机上建好(如果主备库路径不一致要修改)
如主库*.audit_file_dest=‘/apps/oracle/admin/egap/adump‘
我们在备库需要建 mkdir -p /apps/oracle/admin/egap/adump
cd /apps/oracle/admin
chown -R oracle:oinstall egap
chmod -R 775 egap

改变前参数文件

*.__db_cache_size=27648851968
*.__java_pool_size=67108864
*.__large_pool_size=67108864
*.__oracle_base=‘/apps/oracle‘#ORACLE_BASE set from environment
*.__pga_aggregate_target=10334765056
*.__sga_target=30937186304
*.__shared_io_pool_size=0
*.__shared_pool_size=2952790016
*.__streams_pool_size=0
*.audit_file_dest=‘/apps/oracle/admin/egap/adump‘
*.audit_trail=‘db‘
*.compatible=‘11.2.0.0.0‘
*.control_files=‘/data01/egap/control01.ctl‘,‘/data01/egap/control02.ctl‘
*.db_block_size=8192
*.db_domain=‘‘
*.db_name=‘egap‘
*.diagnostic_dest=‘/apps/oracle‘
*.log_archive_dest_1=‘location=/archlog/egap‘
*.log_archive_format=‘egap_%t_%s_%r.arch‘
*.open_cursors=300
*.pga_aggregate_target=10307502080
*.processes=150
*.remote_login_passwordfile=‘EXCLUSIVE‘
*.sga_target=30922506240
*.undo_tablespace=‘UNDOTBS1‘

改变后参数文件

*.__db_cache_size=27648851968
*.__java_pool_size=67108864
*.__large_pool_size=67108864
*.__oracle_base=‘/apps/oracle‘#ORACLE_BASE set from environment
*.__pga_aggregate_target=10334765056
*.__sga_target=30937186304
*.__shared_io_pool_size=0
*.__shared_pool_size=2952790016
*.__streams_pool_size=0
*.audit_file_dest=‘/apps/oracle/admin/egapdb/adump‘
*.audit_trail=‘db‘
*.compatible=‘11.2.0.0.0‘
*.control_files=‘/data01/egapdb/control01.ctl‘,‘/data01/egapdb/control02.ctl‘
*.db_block_size=8192
*.db_domain=‘‘
*.db_name=‘egap‘
*.diagnostic_dest=‘/apps/oracle‘
*.log_archive_dest_1=‘location=/archlog/egapdb1‘
*.log_archive_dest_2=‘SERVICE=primary LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=egap‘
*.log_archive_format=‘egapdb_%t_%s_%r.arch‘
*.open_cursors=300
*.pga_aggregate_target=10307502080
*.processes=150
*.remote_login_passwordfile=‘EXCLUSIVE‘
*.sga_target=30922506240
*.undo_tablespace=‘UNDOTBS1‘
*.DB_UNIQUE_NAME=egapdb
*.FAL_SERVER=primary
*.FAL_CLIENT=standby1
*.STANDBY_FILE_MANAGEMENT=AUTO
*.DB_FILE_NAME_CONVERT=‘/data01/egap‘,‘/data01/egapdb‘
*.LOG_FILE_NAME_CONVERT=‘/data01/egap‘,‘/data01/egapdb‘
*.LOG_ARCHIVE_CONFIG=‘DG_CONFIG=(egap,egapdb)‘

###注意db_file_name_convert和log_file_name_convert参数指定的路径要存在

4)根据修改后的pfile创建备库spfile

export ORACLE_SID=egapdb1
sqlplus / as sysdba
create spfile from pfile;

--使用新生成的spfile检查是否能够成功启动实例

4.生成备库的密码文件
scp主库密码文件到备库,并改名
如果主库没有密码文件,需要新建

orapwd file=/oracle/app/oracle/product/v11.2.0.3/db_1/dbs/orapwegap password=oracle  entries=5 ignorecase=y

--主库密码文件传到备库以后要重启备库

5.配置主备库监听及net服务
1)listener
--主库
一般建库后都会配置监听我们无需再配置
--备库(因为安装了cluster,所以用的是cluster的监听)
lsnrctl status 查看监听文件位置,并在监听文件中加入如下类容

LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3))))                # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2))))                # line added by Agent
#LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))           # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON                # line added by Agent
--注意集群安装完毕以后,上面部分内容在监听中已经存在
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /apps/oracle/product/11.2.0.3/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(ORACLE_HOME = /apps/oracle/product/11.2.0.3/db_1)
(SID_NAME = egapdb1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.96.1)(PORT = 1521)(IP = FIRST))
)
)

2)tns
主备库tnsnames.ora文件中加入如下部分

primary =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.96.16)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = egap)
)
)
standby1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.96.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = egapdb1)
)
)
standby2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.96.2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = egapdb2)
)
)

--DG搭建后要主备切换并添加实例

6. 测试网络连接
1)查看监听状态是否正常
lsnrctl status
2) 测试连接串是否能正常连接到指定数据库

tnsping egap
tnsping egapdb1
tnsping egapdb2
sqlplus sys/oracle@egap as sysdba
sqlplus sys/oracle@egapdb1 as sysdba
sqlplus sys/oracle@egapdb2 as sysdba

7. 复制备库
有两种1:rman在线复制 2:rman备份异机恢复
方法1:rman在线复制(不需要备份主库)
此种方式仅适用于ORACLE 11G,可以自动备份datafile,control等文件到备库,在复制过程主库仍可正常运行,但复制过程时间较长,会占用一定的网络资源。
1)将备库启动到nomount状态
export ORACLE_SID=egapdb1
sqlplus / as sysdba
startup nomount;
2)在备库上执行如下命令

rman target sys/oracle@primary auxiliary sys/oracle@standby1 nocatalog
duplicate target database for standby from active database nofilenamecheck;

--如果主备库文件路径不变,要加nofilenamecheck。登陆时加nocatalog否则会报如下错误:

PLS-00201: identifier ‘DBMS_RCVCAT.GETDBID‘ must be declared

8. 添加standby log
--为了日后切换,建议为主库也添加standby log
--注意stnadby log的大小(同主库redolog相同大小)
--注意添加合适数量的standby log

alter database add standby logfile thread 1
GROUP 7(‘/data01/egapdb/stand07.log‘) SIZE 50M,
GROUP 8(‘/data01/egapdb/stand08.log‘) SIZE 50M,
GROUP 9(‘/data01/egapdb/stand09.log‘) SIZE 50M,
GROUP 10(‘/data01/egapdb/stand10.log‘) SIZE 50M,
GROUP 11(‘/data01/egapdb/stand11.log‘) SIZE 50M,
GROUP 12(‘/data01/egapdb/stand12.log‘) SIZE 50M,
GROUP 13(‘/data01/egapdb/stand13.log‘) SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 group 3(‘/oracle/dbs/log1c.rdo‘,‘/oracle/dbs/log2c.rdo‘) SIZE 500M;

SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
检查是否成功创建

standy log 的推荐数目为=(每个线程的日志文件的最大数目+1)×线程最大数目

9.配置主库DG参数
主库需要配置的参数为DB_UNIQUE_NAME;LOG_ARCHIVE_CONFIG;LOG_ARCHIVE_DEST_2;REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
--为了方便以后切主库也应该添加备库所需要的参数

*.DB_UNIQUE_NAME=egap
*.FAL_SERVER=standby1
*.FAL_CLIENT=primary
*.STANDBY_FILE_MANAGEMENT=AUTO
*.DB_FILE_NAME_CONVERT=‘/data01/egapdb‘,‘/data01/egap‘
*.LOG_FILE_NAME_CONVERT=‘/data01/egapdb‘,‘/data01/egap‘
*.LOG_ARCHIVE_CONFIG=‘DG_CONFIG=(egap,egapdb)‘
*.log_archive_dest_1=‘location=/archlog/egap‘
*.log_archive_dest_2=‘SERVICE=standby1 LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=egapdb‘
alter system set fal_server=‘standby1‘;
alter system set fal_client=‘primary‘;
alter system set standby_file_management=auto;
alter system set db_file_name_convert=‘/data01/egapdb‘,‘/data01/egap‘ scope=spfile;
alter system set log_file_name_convert=‘/data01/egapdb‘,‘/data01/egap‘ scope=spfile;
alter system set log_archive_config=‘DG_CONFIG=(egap,egapdb)‘;
alter system set log_archive_dest_2=‘SERVICE=standby1 LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=egapdb‘;

10.在备库上启动恢复
启动恢复

alter database recover managed standby database using current logfile disconnect;
alter database recover managed standby database cancel;

--主库切换日志,观察DG能否正常应用日志
1)在备库查看 data guard 为哪种日志接受方式,以及当前被应用的日志

SQL> select process,client_process,sequence#,status from v$managed_standby;
PROCESS   CLIENT_P  SEQUENCE# STATUS
--------- -------- ---------- ------------
ARCH      ARCH            132 CLOSING
ARCH      ARCH            131 CLOSING
ARCH      ARCH              0 CONNECTED
ARCH      ARCH            133 CLOSING
MRP0      N/A             134 APPLYING_LOG
RFS       ARCH              0 IDLE
RFS       LGWR            134 IDLE
RFS       UNKNOWN           0 IDLE

--rfs进程接受的是lgwr日志,说明主库用的是lgwr进程传输日志。mrp0进程存在说明此时已启动恢复管理

2)在备库查看新的归档日志有没有正常传输过来,并被应用

SQL> select THREAD#,SEQUENCE#,ARCHIVED,APPLIED,DELETED,STATUS from v$archived_log order by 1,2;

3)查看主备库的alert日志,是否正常
4)备库查看日志应用延时

alter session set nls_date_format=‘yyyy-mm-dd hh24:mi:ss‘;
select name,value from v$dataguard_stats where name in (‘apply lag‘,‘apply finish time‘);

11.添加实例

1.oracle DG主备切换(switchover)
--切换前检查主备库参数,及standbylog是否配置(如下参数在主备库都需配置)

*.DB_UNIQUE_NAME=egap
*.FAL_SERVER=standby1
*.FAL_CLIENT=primary
*.STANDBY_FILE_MANAGEMENT=AUTO
*.DB_FILE_NAME_CONVERT=‘/data01/egapdb‘,‘/data01/egap‘
*.LOG_FILE_NAME_CONVERT=‘/data01/egapdb‘,‘/data01/egap‘
*.LOG_ARCHIVE_CONFIG=‘DG_CONFIG=(egap,egapdb)‘
*.log_archive_dest_1=‘location=/archlog/egap‘
*.log_archive_dest_2=‘SERVICE=standby1 LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=egapdb‘

1)主库

--查看是否可以切换为备库

select database_role,switchover_status from v$database;
注:当SWITCHOVER_STATUS的值为TO STANDBY or SESSIONS ACTIVE的时候表示主库可以支持SWITCHOVER.
alter database commit to switchover to physical standby;
shutdown immediate;
startup nomount;
alter database mount standby database;
alter database recover managed standby database using current logfile disconnect;

2)备库

select database_role,switchover_status from v$database;
注:当SWITCHOVER_STATUS的值为TO PRIMARY or SESSIONS ACTIVE的时候表示备库可以支持SWITCHOVER(在主库执行完commit后会变成to primary
而在主库没有执行之前是not allowed状态)
alter database commit to switchover to primary;

12.配置cluster listener(主要是配置第二个节点的listener)
具体方法见DG实施方案的第五步

3.创建集群参数文件

1)create pfile from spfile;(在转换后的主库上)
修改pfile,并添加rac需要的参数

*.cluster_database = TRUE
*.cluster_database_instances = 2
*.undo_management=AUTO
<SID1>.undo_tablespace=undotbs (undo tablespace which already exists)
<SID1>.instance_name=<SID1>
<SID1>.instance_number=1
<SID1>.thread=1
<SID1>.local_listener=<LISTENERNAME>_<HOSTNAME1>
<SID2>.instance_name=<SID2>
<SID2>.instance_number=2
<SID2>.local_listener=<LISTENERNAME>_<HOSTNAME2>
<SID2>.thread=2
<SID2>.undo_tablespace=UNDOTBS2
<SID2>.cluster_database = TRUE
<SID2>.cluster_database_instances = 2

修改后参数文件如下:

egapdb1.__db_cache_size=27648851968
egapdb1.__java_pool_size=67108864
egapdb1.__large_pool_size=67108864
egapdb1.__oracle_base=‘/apps/oracle‘#ORACLE_BASE set from environment
egapdb1.__pga_aggregate_target=10334765056
egapdb1.__sga_target=30937186304
egapdb1.__shared_io_pool_size=0
egapdb1.__shared_pool_size=2952790016
egapdb1.__streams_pool_size=0
egapdb2.__db_cache_size=27648851968
egapdb2.__java_pool_size=67108864
egapdb2.__large_pool_size=67108864
egapdb2.__oracle_base=‘/apps/oracle‘#ORACLE_BASE set from environment
egapdb2.__pga_aggregate_target=10334765056
egapdb2.__sga_target=30937186304
egapdb2.__shared_io_pool_size=0
egapdb2.__shared_pool_size=2952790016
egapdb2.__streams_pool_size=0
*.audit_file_dest=‘/apps/oracle/admin/egapdb/adump‘
*.audit_trail=‘db‘
*.compatible=‘11.2.0.0.0‘
*.control_files=‘/data01/egapdb/control01.ctl‘,‘/data01/egapdb/control02.ctl‘
*.db_block_size=8192
*.db_domain=‘‘
*.db_file_name_convert=‘/data01/egap‘,‘/data01/egapdb‘
*.db_name=‘egap‘
*.db_unique_name=‘egapdb‘
*.diagnostic_dest=‘/apps/oracle‘
egapdb1.fal_client=‘standby1‘
egapdb2.fal_client=‘standby2‘
*.fal_server=‘primary‘
*.log_archive_config=‘DG_CONFIG=(egap,egapdb)‘
egapdb1.log_archive_dest_1=‘location=/archlog/egapdb1‘
egapdb2.log_archive_dest_1=‘location=/archlog/egapdb2‘
*.log_archive_dest_2=‘SERVICE=primary LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=egap‘
*.log_archive_format=‘egapdb_%t_%s_%r.arch‘
*.log_file_name_convert=‘/data01/egap‘,‘/data01/egapdb‘
*.open_cursors=300
*.pga_aggregate_target=10307502080
*.processes=150
*.remote_login_passwordfile=‘EXCLUSIVE‘
*.sga_target=30922506240
*.standby_file_management=‘AUTO‘
*.undo_tablespace=‘UNDOTBS1‘
*.cluster_database = TRUE
*.cluster_database_instances = 2
*.undo_management=AUTO
egapdb1.undo_tablespace=‘UNDOTBS1‘
egapdb1.instance_name=egapdb1
egapdb1.instance_number=1
egapdb1.thread=1
egapdb1.local_listener=‘(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.96.3)(PORT=1521))))‘
egapdb2.instance_name=egapdb2
egapdb2.instance_number=2
egapdb2.local_listener=‘(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.96.4)(PORT=1521))))‘
egapdb2.thread=2
egapdb2.undo_tablespace=‘UNDOTBS2‘

--注意参数文件中定义的路径要在第二个节点提前建立

2).修改备库fal_server

alter system set fal_server=‘standby1‘,‘standby2‘;

--可以在一开始就配置,此处就不必修改

3)创建新的spfile(注意建在共享路径下)

create spfile=‘/data01/egapdb/spfileegapdb.ora‘ from pfile=‘/apps/oracle/product/11.2.0.3/db_1/dbs/initegapdb1.ora‘;

4)在两个节点的写入如下信息(并删除$ORACLE_HOME/dbs目录下的spfile文件)
SPFILE=‘/data01/egapdb/spfileegap.ora‘

13.生成第二个节点的密码文件
传第老库的密码文件到第二个节点,并改名
scp orapwegap oracle@egapdb2:$ORACLE_HOME/dbs
mv orapwegap orapwegapdb2

14.重启主库使修改的参数生效
1)停主库前,先停掉备库的日志应用
alter database recover managed standby database cancel;
2)停主库
shutdown immediate;
3)startup;
--查看rac相关参数是否生效,tail -f 主备库的alert日志,观察是否有报错,DG是否正常
show parameter cluster;

15.添加其他节点的redo及undo
1)redo

alter database
add logfile thread 2
group 4 (‘/data01/egapdb/redo04.log‘) size 50M,
group 5 (‘/data01/egapdb/redo05.log‘) size 50M,
group 6 (‘/data01/egapdb/redo06.log‘) size 50M;
alter database enable public thread 2;

2)undo

create undo tablespace UNDOTBS2 datafile ‘/data01/egapdb/undotbs02.dbf‘ size 200m;
alter system set undo_tablespace=‘undotbs2‘ sid=‘egapdb2‘;--如果参数文件中已修改则可以省略此步

16.在备库添加第二个实例的standby log(不建好像也可以)

17.在备库设置db_recovery_file_dest,db_recovery_file_dest_size参数
--如果不设该参数,备库会报错(主库添加第二个实例日志,在备库应用会报错)
OpenVMS: Error Creating Redo Logs In Standby Database ORA-01264: Unable to create logfile file name (Doc ID 1376892.1)

 

8.在第二个节点打开数据库
--tail -f 主备库alert日志,查看是否有报错,DG是否正常
export ORACLE_SID=egapdb2
sqlplus / as sysdba
startup

 

19.向crs中注册资源
1)查看注册前集群中资源

grid@egapdb2:/home/grid$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....ER.lsnr ora....er.type ONLINE    ONLINE    egapdb1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    egapdb1
ora....N2.lsnr ora....er.type ONLINE    ONLINE    egapdb2
ora....N3.lsnr ora....er.type ONLINE    ONLINE    egapdb2
ora.asm        ora.asm.type   OFFLINE   OFFLINE
ora.cvu        ora.cvu.type   ONLINE    ONLINE    egapdb2
ora....SM1.asm application    OFFLINE   OFFLINE
ora....B1.lsnr application    ONLINE    ONLINE    egapdb1
ora....db1.gsd application    OFFLINE   OFFLINE
ora....db1.ons application    ONLINE    ONLINE    egapdb1
ora....db1.vip ora....t1.type ONLINE    ONLINE    egapdb1
ora....SM2.asm application    OFFLINE   OFFLINE
ora....B2.lsnr application    ONLINE    ONLINE    egapdb2
ora....db2.gsd application    OFFLINE   OFFLINE
ora....db2.ons application    ONLINE    ONLINE    egapdb2
ora....db2.vip ora....t1.type ONLINE    ONLINE    egapdb2
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    egapdb1
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    egapdb2
ora.ons        ora.ons.type   ONLINE    ONLINE    egapdb1
ora....ry.acfs ora....fs.type OFFLINE   OFFLINE
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    egapdb1
ora.scan2.vip  ora....ip.type ONLINE    ONLINE    egapdb2
ora.scan3.vip  ora....ip.type ONLINE    ONLINE    egapdb2

 

2)注册(在任意一个节点添加即可)

srvctl add database -d <db_unique_name> -o <ORACLE_HOME path> -p <spfile location and name>
srvctl add instance -d <db_unique_name> -i <instance 1 name> -n <node 1 name >
srvctl add instance -d <db_unique_name> -i <instance 2 name> -n <node 2 name >

 

--如果用的是asm的话还需要添加数据库实例同asm实例的对应关系

srvctl modify instance -d <db_unique_name> -i <SID1> -s <+ASM1>
srvctl modify instance -d <db_unique_name> -i <SID2> -s <+ASM2>

 

3)查看注册后的集群资源

grid@egapdb2:/home/grid$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....ER.lsnr ora....er.type ONLINE    ONLINE    egapdb1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    egapdb1
ora....N2.lsnr ora....er.type ONLINE    ONLINE    egapdb2
ora....N3.lsnr ora....er.type ONLINE    ONLINE    egapdb2
ora.asm        ora.asm.type   OFFLINE   OFFLINE
ora.cvu        ora.cvu.type   ONLINE    ONLINE    egapdb2
ora.egapdb.db  ora....se.type OFFLINE   OFFLINE
ora....SM1.asm application    OFFLINE   OFFLINE
ora....B1.lsnr application    ONLINE    ONLINE    egapdb1
ora....db1.gsd application    OFFLINE   OFFLINE
ora....db1.ons application    ONLINE    ONLINE    egapdb1
ora....db1.vip ora....t1.type ONLINE    ONLINE    egapdb1
ora....SM2.asm application    OFFLINE   OFFLINE
ora....B2.lsnr application    ONLINE    ONLINE    egapdb2
ora....db2.gsd application    OFFLINE   OFFLINE
ora....db2.ons application    ONLINE    ONLINE    egapdb2
ora....db2.vip ora....t1.type ONLINE    ONLINE    egapdb2
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    egapdb1
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    egapdb2
ora.ons        ora.ons.type   ONLINE    ONLINE    egapdb1
ora....ry.acfs ora....fs.type OFFLINE   OFFLINE
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    egapdb1
ora.scan2.vip  ora....ip.type ONLINE    ONLINE    egapdb2
ora.scan3.vip  ora....ip.type ONLINE    ONLINE    egapdb2

4)srctl start instance启动实例(添加资源后DB资源是offline状态)

--检验crs能否正常启停数据库

本文出自 “技术” 博客,请务必保留此出处http://589985.blog.51cto.com/1609992/1393011

数据库迁移方案之DG方式迁移,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。