[RAC]ORACLE Database 10g RAC for Administrators学习笔记(二)

4. RAC Database Administration

Use Enterprise Manager cluster database pages

Redo Log Files and RAC

每个实例必须拥有至少两组redo

使用alter database add logfile thread…命令来指定为哪个实例增加redo file

Automatic Undo Management and RAC

为每个实例指定一个专用的undo tablespace

RAC01.UNDO_TABLESPACE=undotbs3

RAC02.UNDO_TABLESPACE=undotbs2

Starting and Stopping RAC Instances

RAC instances can be started and stopped by using:

Enterprise Manager

Server Control (SRVCTL) utility

SQL*Plus

Starting and Stopping RAC Instances with SRVCTL

srvctl start|stop instance -d -i

[-o open|mount|nomount|normal|transactional|immediate|abort>]

[-c | -q]

srvctl start|stop database -d

[-o open|mount|nomount|normal|transactional|immediate|abort>]

[-c | -q]

Switch Between the Automatic and Manual Policies

srvctl modify database -d RACB -y MANUAL;

RAC Initialization Parameter Files

所有instance使用同一个spfilespfile在共享存储上。

使用以下命令为设置单个instance或全局的参数,sid优先于“*

ALTER SYSTEM SET SCOPE=spfile sid='';

使用以下命令删除spfile中的一行

ALTER SYSTEM RESET SCOPE=SPFILE sid='';

RAC Initialization Parameters

CLUSTER_DATABASE-TRUE

CLUSTER_DATABASE_INSTANCES-instance个数

CLUSTER_INTERCONNECTS-定义额外的interconnect,一般情况下无须修改

DB_NAME

DISPATCHERS

MAX_COMMIT_PROPAGATION_DELAY-已被废弃

SPFILE-如果使用spfile启动,则必须使用同一个spfile。每个instance本地有一个pfile文件指定spfile在共享存储上的路径

THREAD-如果定义,则在每个instance上的值必须唯一。指定使用哪一个threadredo

Parameters That Require Identical Settings

ACTIVE_INSTANCE_COUNT

ARCHIVE_LAG_TARGET

CLUSTER_DATABASE

CONTROL_FILES

DB_BLOCK_SIZE

DB_DOMAIN

DB_FILES

DB_NAME

DB_RECOVERY_FILE_DEST

DB_RECOVERY_FILE_DEST_SIZE

DB_UNIQUE_NAME

MAX_COMMIT_PROPAGATION_DELAY

TRACE_ENABLED

UNDO_MANAGEMENT

Parameters That Require Unique Settings

THREAD

ROLLBACK_SEGMENTS

INSTANCE_NAME

INSTANCE_NUMBER

UNDO_TABLESPACE (When using Automatic Undo Management)

Quiescing RAC Databases

SQL> ALTER SYSTEM QUIESCE RESTRICTED; / ALTER SYSTEM UNQUIESCE

在一个单一的instance上执行,命令执行后其他instance无法打开数据库。一般用于一些维护操作。在此期间无法进行数据库冷备,因为后台进程在此期间仍可能对数据库进行更新。

How SQL*Plus Commands Affect Instances

The ALTER SYSTEM SET CHECKPOINT LOCAL statement affects only the local instance.

ALTER SYSTEM CHECKPOINT LOCAL affects the current instance.

ALTER SYSTEM CHECKPOINT or ALTER SYSTEM CHECKPOINT GLOBAL affects all instances in the cluster database.

ALTER SYSTEM SWITCH LOGFILE affects only the current instance.

To force a global log switch, use the ALTER SYSTEM ARCHIVE LOG CURRENT statement.

The INSTANCE option of ALTER SYSTEM ARCHIVE LOG enables you to archive each online redo log file for a specific instance.

Transparent Data Encryption and Wallets in RAC

One wallet shared by all instances on shared storage:

No additional administration required

One copy of the wallet on each local storage:

Local copies need to be synchronized each time master key is changeds

RAC and ASM Instances Creation

rac环境下创建ASM实例时,先选择Oracle Real Application Clusters database选项,再选择所有节点。Dbca自动创建两个名为+ASM1+ASM2的实例。

ASM: General Architecture

ASM instances do not mount databases, but instead manage the metadata needed to make ASM files available to ordinary database instances.

Database instances access the contents of ASM files directly, communicating with an ASM instance only to obtain information about the

layout of these files.

ASM侧后台进程

RBAL- responsible for coordinating rebalance activity for disk groups

ARBn- actually performs the data extent movements

GMON- responsible for certain disk group-monitoring operations that maintain ASM metadata inside disk groups

DB侧后台进程

ASMB- connects to foreground processes in ASM instances. Over those connections, periodic messages are exchanged to update statistics and to verify that both instances are healthy.

RBAL- performs global opens of the disks in the disk groups

当执行一些需要ASM干预的操作,如创建数据文件时,DB的前台进程直接连接ASM实例进行操作。

一个db instance只能同时连接到一个asm instance

Group Services: is used to register the connection information needed by the database instances to find ASM instances. When an ASM instance mounts a disk group, it registers the disk group and connect string with Group Services. Group Services is a functionality provided by Oracle Clusterware, which is automatically installed on every node that runs Oracle Database 10g.

ASM Instance and Crash Recovery in RAC

如一个ASM实例crash,则所有的相关的db instance也失败。单实例情况下,该实例重启时读取disk group’ log进行恢复。多实例下其他实例进行恢复。Db instance crash并不影响ASM实例。

ASM Instance Initialization Parameters and RAC

CLUSTER_DATABASE: This parameter must be set to TRUE.

ASM_DISKGROUP:

Multiple instances can have different values.

Shared disk groups must be mounted by each ASM instance.

ASM_DISKSTRING:

Multiple instances can have different values.

With shared disk groups, every instance should be able to see the common pool of physical disks.

ASM_POWER_LIMIT: Multiple instances can have different values.

ASM and SRVCTL with RAC

You can use SRVCTL to perform the following ASM administration tasks:

ADD

ENABLE

DISABLE

START

STOP

CONFIG-displays configuration information stored in the OCR for a particular ASM instance.

STATUS

REMOVE

MODIFY INSTANCE-establishes a dependency between an ASM instance and a db instance.

5. Managing Backup and Recovery in RAC

Archived Log File Configurations Cluster file

Cluster file system scheme: Archive logs from each instance are written to the same file location.

Local archive with NFS scheme: Each instance can read mounted archive destinations of all instances.

RAC and the Flash Recovery Area

Cluster file system

ASM

Certified NFS directory

Archived Redo File Conventions in RAC

%r : Resetlogs identifier

%s: Log sequence number

%t : Thread number

Configure RMAN Snapshot Control File Location

在每个实施备份的节点上必须存在有效路径

When RMAN needs to resynchronize from a read-consistent version of the control file, it creates a temporary snapshot control file. RMAN needs a snapshot control file only when resynchronizing with the recovery catalog or when making a backup of the current control file.

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘’;

Configure Control File and SPFILE Autobackup

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+FRA';

Channel Connections to Cluster Instances

多个channel可以连接到多个instance。如同时连接到多个instance,则这些instance必须全部mount或全部open

RMAN Channel Support for the Grid

使用未确定的连接字符串并定义并行度,则备份作业可以自动选择负载较轻的节点进行备份。

RMAN Default Autolocation

Rman可在备份或恢复中自动定位以下文件:

Backup pieces

Archived redo logs during backup

Data file or control file copies

archive文件在本地时,一个节点只能备份本地的归档文件。当restore时,一个节点只能restore从该节点备份的归档文件。

Distribution of Backups

Three possible backup configurations for RAC:

A dedicated backup server performs and manages backups for the cluster and the cluster database.

One node has access to a local backup appliance and performs and manages backups for the cluster database.

Each node has access to a local backup appliance and can write to its own local backup media.

Restoring and Recovering

Media recovery may require one or more archived log files from each thread.

The RMAN RECOVER command automatically restores and applies the required archived logs.

Archive logs may be restored to any node performing the restore and recover operation.

Logs must be readable from the node performing the restore and recovery activity.

Recovery processes request additional threads enabled during the recovery period.

Recovery processes notify you of threads no longer needed because they were disabled.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8558093/viewspace-1015730/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8558093/viewspace-1015730/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值