如何创建和启用 Oracle Data Guard Broker 欧博allbet配置 (Sun C

文章正文
发布时间:2024-06-10 15:51

Procedure

如何创建和启用 Oracle Data Guard Broker 配置

要将 Oracle Data Guard 与 Sun Cluster Geographic Edition 一起使用,欧博allbet需要创建 Oracle Data Guard Broker 配置。

在下面的示例过程中,Oracle Data Guard Broker 配置称为 mysales.com。salesdr 数据库是 sales 数据库的 physical 副本。

创建主数据库的 Oracle Data Guard Broker 配置。

可以使用 dgmgrl 命令来创建 Oracle Data Guard Broker 配置。您需要知道要创建的 Oracle Data Guard Broker 配置的名称、主数据库的名称以及用来连接的 net 服务名。将配置指定给 Sun Cluster Geographic Edition 时,也需要知道这些属性。


oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc DGMGRL> create configuration mysales.com as primary DGMGRL> database is sales connect identifier is sales-svc;
 

如果在连接到 Oracle Data Guard Broker 时发现错误,欧博百家乐请检查 ${ORACLE_HOME}/admin/sales/bdump/alert_ prim_sid.log 文件。可以使用以下命令来检查是否已创建该配置:


oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc DGMGRL> show configuration; Configuration Name: mysales.com Enabled: NO Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: sales - Primary database Current status for "mysales.com": DISABLED
 

将备用数据库添加到 Oracle Data Guard Broker 配置。

您需要知道备用数据库的名称、用来连接的 net 服务名以及备用类型(physical 或 logical)。


oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc DGMGRL> add database salesdr as connect identifier is salesdr-svc maintained as physical;
 

为备用数据库配置应用实例。

如果备用数据库也是一个多实例 Oracle RAC 数据库,可以指定要应用传送的归档重做日志的实例。启用该配置之前,发出以下命令:


oracle$ dgmgrl sys/sysdba_password@sales-svc DGMGRL> edit database salesdr set property PreferredApplyInstance='salesdr1';
 

要检验 Oracle Data Guard Broker 配置是否在正常工作,请启用该配置。


oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svc DGMGRL> enable configuration;
 

如果您已成功地执行了所有步骤,可以通过使用以下命令检查配置的状态:


oracle$ dgmgrl sys/sysdba_password@sales-svc DGMGRL> show configuration; Configuration Name: mysales.com Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: sales - Primary database salesdr - Physical standby database Current status for "mysales.com": SUCCESS
 

检验 Oracle Data Guard Broker 配置是否可以切换。

在将 Oracle Data Guard Broker 配置添加到 Sun Cluster Geographic Edition 之前,需要检验是否可以在主群集和备用群集之间来回执行数据库的切换。如果此切换不起作用,则 Sun Cluster Geographic Edition 也将无法执行此操作。


oracle (phys-paris-1)$ dgmgrl sys/sysdba_password@sales-svcDGMGRL> switchover to salesdr Performing switchover NOW, please wait... Operation requires shutdown of instance "sales1" on database "sales" Shutting down instance "sales1"... ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires shutdown of instance "salesdr1" on database "salesdr" Shutting down instance "salesdr1"... ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance "sales1" on database "sales" Starting instance "sales1"... ORACLE instance started. Database mounted. Operation requires startup of instance "salesdr1" on database "salesdr" Starting instance "salesdr1"... ORACLE instance started. Database mounted. Switchover succeeded, new primary is "salesdr" DGMGRL switchover to sales; Performing switchover NOW, please wait... Operation requires shutdown of instance "salesdr1" on database "salesdr" Shutting down instance "salesdr1"... ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires shutdown of instance "sales1" on database "sales" Shutting down instance "sales1"... ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance "salesdr1" on database "salesdr" Starting instance "salesdr1"... ORACLE instance started. Database mounted. Operation requires startup of instance "sales1" on database "sales" Starting instance "sales1"... ORACLE instance started. Database mounted. Switchover succeeded, new primary is "sales"
 

首页
评论
分享
Top