您既可以查看整体的复制状态,也可以通过复制资源组的状态获取 Oracle Data Guard 软件的更为详细的运行时状态。下面各节说明了如何检查复制操作的运行时状态:
每个 Oracle Data Guard 数据复制资源的状态均表明特定 Oracle Data Guard Broker 配置上的复制状态。保护组中所有资源的状态汇总到复制状态中。
要查看整体的复制状态,请按以下过程所述查看保护组的状态。
登录到一个已定义保护组的群集节点。
要完成此步骤,您需要分配有 Basic Solaris User RBAC 权限配置文件。有关 RBAC 的更多信息,请参见《Sun Cluster Geographic Edition 系统管理指南》中的“Sun Cluster Geographic Edition 软件和 RBAC”。
检查复制的运行时状态。
phys-paris-1# geoadm status |
有关复制信息,请参阅输出内容中的 Protection Group 部分。此命令的输出包括以下信息:
是否为参与伙伴关系启用本地群集
伙伴关系中是否涉及到本地群集
心跳配置的状态
已定义的保护组的状态
当前事务的状态
检查每个 Oracle Data Guard 保护组的数据复制运行时状态。
phys-paris-1 clresource status -v ODGConfigurationName-odg-rep-rs |
请参阅要检查的 Oracle Data Guard Broker 配置数据复制所对应的 Status 和 StatusMessage 字段。有关这些字段的更多信息,请参见表 2–1。
每个保护组都会有一个复制资源组与之对应。复制资源组的名称遵循以下格式:
ODGprotectiongroupname-odg-rep-rg |
如果将 Oracle Data Guard Broker 配置添加到保护组,Sun Cluster Geographic Edition 软件会为该配置创建资源。该资源监视并显示此 Oracle Data Guard Broker 配置的复制状态。每个资源的名称都遵循以下格式:
ODGConfigurationName-odg-rep-rs |
您可以监视复制资源的状态以便了解复制的整体状态。请按如下所示,使用 clresource status 命令来获取 Oracle Data Guard Broker 配置的复制状态的 State 值和 Status Message 值:
phys-node-n# clresource status -v ODGConfigurationName-odg-rep-rs |
资源联机时,State 的值为 Online。
下表介绍了 Oracle Data Guard 复制资源组的 State 为 Online 时,clresource status 命令返回的 Status 值和 Status Message 值。
表 2–1 处于联机状态的 Oracle Data Guard 复制资源组的状态和状态消息
状态 |
状态消息 |
可能的原因 |
---|---|---|
Faulted |
Program program-name returned a nonzero exit code | |
Faulted |
Protection mode "replication-mode" given for local database database does not match configured value "replication-mode" |
已通过使用 Oracle Data Guard 命令行界面 (dgmgrl) 更改了 Oracle Data Guard Broker 配置,但尚未在 Sun Cluster Geographic Edition 中更新此配置。 |
Faulted |
Database database does not exist in the configured Oracle Data Guard database list "List-of-databases " |
已使用 Oracle Data Guard 命令行界面 (dgmgrl) 从 Oracle Data Guard Broker 配置中删除了此数据库。 |
Faulted |
Oracle errors "List-of-ORA-xxxxx-errors" were found in the Oracle Data Guard broker (dgmgrl) output when connecting by using "connect-string" | |
Faulted |
Role "role" given for database database does not match role "role" configured for Oracle Data Guard |
数据库可能已从物理备用 (physical standby) 改为逻辑备用 (logical standby),或者反之。 |
Unknown |
Unexpected error - unexpected-error | |
Unknown |
Oracle Data Guard broker (dgmgrl connect-string) did not complete a response to the command "command-string" within "number" seconds and was timed out. |
Oracle Data Guard 命令行界面 (dgmgrl) 在指定的时间内未响应 show configuration 命令,或者 Oracle Data Guard Broker 在此期间正忙于执行运行状况检查。 |
Unknown |
Password or connect name (connect-string) for remote cluster is incorrect |
sysdba_username、sysdba_password、local_db_service_name 或 remote_db_service_name 参数与 Sun Cluster Geographic Edition 软件所维护的信息不匹配。 |
Unknown |
File filename does not exist |
Oracle Data Guard 模块所使用的临时内部文件在被读取之前已删除。 |
Degraded |
Program program-name failed to read the Cluster Configuration Repository (CCR) |
用于从 CCR 中检索信息的程序之一出现故障。 |
Degraded |
Failed to get password for sysdba user name for Oracle Data Guard configuration ODGConfigurationName in protection group ODGprotectiongroupname |
未在群集配置系统信息库 (Cluster Configuration Repository, CCR) 中找到 sysdba_password 字段,或者该字段超过预期的长度。 |
Degraded |
Local cluster cluster-name is not primary for Oracle Data Guard configuration ODGConfigurationName |
已通过使用 Oracle Data Guard 命令行界面 (dgmgrl) 中的命令在 Oracle Data Guard Broker 中执行了切换或故障转移,但 Sun Cluster Geographic Edition 配置尚未更新。 |
Degraded |
Oracle Data Guard configuration name ODGConfigurationName found does not match ODGConfigurationName | |
Degraded |
Database database-name is in the disabled state |
已通过使用 Oracle Data Guard 命令行界面 (dgmgrl) 中的命令在 Oracle Data Guard Broker 中禁用了某个数据库,但 Sun Cluster Geographic Edition 配置尚未更新。 |
Degraded |
Oracle Data Guard configuration ODGConfigurationName is disabled on cluster cluster-name |
已通过使用 Oracle Data Guard 命令行界面 (dgmgrl) 中的命令禁用了 Oracle Data Guard Broker 配置中的备用数据库,但 Sun Cluster Geographic Edition 配置尚未更新。 |
Degraded |
Oracle Data Guard configuration ODGConfigurationName is disabled |
已通过使用 Oracle Data Guard 命令行界面 (dgmgrl) 中的命令禁用了 Oracle Data Guard Broker 配置,但 Sun Cluster Geographic Edition 配置尚未更新。 |
Online |
Online or replicating in replication-mode mode |
有关 clresource 命令的更多信息,请参见 clresource(1CL) 手册页。