设为首页 加入收藏

TOP

Oracle创建PhysicalStandbyDatabase案例(八)
2015-07-24 10:37:28 来源: 作者: 【 】 浏览:15
Tags:Oracle 创建 PhysicalStandbyDatabase 案例
y redo data the next time there is a log switch on the primary database.

Example 3–1 andExample 3–2show how to create a new standby redo log file group using theALTER DATABASEstatement with variations of theADD STANDBYLOGFILE GROUPclause.

Example 3–1 Adding a Standby Redo Log File Group to a Specific Thread

The following statement adds a new standby redo log file group to a standby database and assigns it toTHREAD 5:

SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 5

2> ('/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;

The THREAD clause is required only if you want to add one or more standby redo log file groups to aspecificprimary database thread. If you do not include theTHREAD clause and the configuration uses Real Application Clusters (RAC), Data Guard will automatically assign standby redo log file groups to threads at runtime as they are

needed by the various RAC instances.

Example 3–2 Adding a Standby Redo Log File Group to a Specific Group Number

You can also specify a number that identifies the group using theGROUPclause:

SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10

2> ('/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;

Using group numbers can make administering standby redo log file groups easier. However, the group number must be between 1 and the value of theMAXLOGFILES clause. Do not skip log file group numbers (that is, do not number groups 10, 20, 30, and so on), or you will use additional space in the standby database control file.

Note: Although the standby redo log is only used when the database is running in the standby role, Oracle recommends that you create a standby redo log on the primary database so that the primary database can switch over quickly to the standby role without the need for additional DBA intervention. Consider using Oracle Enterprise Manager to automatically configure standby redo log on both your primary and standby databases.

Step 5 Verify the standby redo log file groups were created.

To verify the standby redo log file groups are created and running correctly, invoke a log switch on the primary database, and then query either theV$STANDBY_LOGview or theV$LOGFILEview on the standby database once it has been created. For example:

SQL> SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;

GROUP# THREAD# SEQUENCE# ARC STATUS

---------- ---------- ---------- --- ----------

3 1 16 NO ACTIVE

4 0 0 YES UNASSIGNED

5 0 0 YES UNASSIGNED

3.1.4 Set Primary Database Initialization Parameters

On the primary database, you define initialization parameters that control redo transport services while the database is in the primary role. There are additional parameters you need to add that control the receipt of the redo data and log apply services when the primary database is transitioned to the standby role.

Example 3–3 shows the primary role initialization parameters that you maintain on the primary database. This example represents a Data Guard configuration with a primary database located in Chicago and one physical standby database located in Boston. The parameters shown inExample 3–3are valid for the Chicago database when it is running in either the primary or the standby database role. The configuration examples use the names shown in the following table:

Database DB_UNIQUE_NAME Oracle Net Service Name

Primary chicago chicago

Physical standby boston boston

Example 3–3 Primary Database: Primary Role Initialization Parameters

DB_NAME=chicago

DB_UNIQUE_NAME=chicago

LOG_ARCHIVE_CONF

首页 上一页 5 6 7 8 9 10 11 下一页 尾页 8/14/14
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle本地数据库连接 下一篇ORACLE错误1033出现和ORA-00600错..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·求navicat for mysql (2025-12-26 13:21:33)
·有哪位大哥推荐一下m (2025-12-26 13:21:30)
·MySQL下载与安装教程 (2025-12-26 13:21:26)
·Linux_百度百科 (2025-12-26 12:51:52)
·Shell 流程控制 | 菜 (2025-12-26 12:51:49)