当您完成了 HDR 的配置后,您将准备启动 HDR。本主题描述了启动 HDR 的必需步骤。
要启动 HDR,请执行以下操作:
下表说明了前面的步骤,这样您可以清楚地确定在主服务器上执行的步骤和在辅助服务器上执行的步骤。该表还显示在执行每个步骤之后写入日志文件的信息。
步骤 | 在主服务器 (ServerA) 上 | 在辅助服务器 (ServerB) 上 |
---|---|---|
1. | 安装 UDR、UDT 和 DataBlade 模块。
注册 UDR、UDT 和 DataBlade 模块。 |
安装 UDR、UDT 和 DataBlade 模块。 |
2. | ontape 命令:
运行 ontape -s -L 0 ON-Bar 命令 :运行 onbar -b -L 0发送至消息日志的消息: Level 0 archive started on rootdbs Archive on rootdbs completed |
|
3. |
onmode 命令 onmode -d primary sec_name 发送至消息日志的消息: DR: new type = primary server name = sec_name DR: Trying to connect to secondary server DR: Cannot connect to secondary server |
|
4. | ontape 命令
运行 ontape -p 或 ontape -p -e 当提示您备份日志时回答否。 ON-Bar 命令 运行 onbar -r -p 或 onbar -r -p -e 发送至消息日志的消息: GBase 8s Database Server Initialized -- Shared Memory Initialized Recovery Mode Physical restore of rootdbs started Physical restore of rootdbs completed |
|
5. | 运行 onmode -d secondary prim_name 发送至消息日志的消息: DR: new type = secondary, primary server name = prim_name 如果自步骤 1 以来写入主数据库服务器的所有逻辑日志记录仍位于主数据库服务器磁盘上,那么辅助数据库服务器将读取这些记录以执行逻辑恢复。(否则,必须执行步骤 6)。 |
|
发送至消息日志的消息: DR: Primary server connected DR: Primary server operational |
发送至消息日志的消息: DR: Trying to connect to primary server DR: Secondary server connected DR: Failure recovery from disk in progress n recovery worker threads will be started Logical Recovery Started Start Logical Recovery - Start Log n, End Log ? Starting Log Position - n 0xnnnnn DR: Secondary server operational |
|
6. | ontape 命令
ontape -l ON-Bar 命令 onbar -r -l |
|
发送至消息日志的消息: DR: Primary server connected DR: Primary server operational |
发送至消息日志的消息: DR: Secondary server connected DR: Failure recovery from disk in progress n recovery worker threads will be started Logical Recovery Started Start Logical Recovery - Start Log n, End Log ? Starting Log Position - n 0xnnnnn DR: Secondary server operational |