数据库管理-第九十六期 19c OCM之路-第六堂(20230801)

第九十六期 19c OCM之路-第六堂(20230801)

首先,我已经报考了9月1日于上海举行的19c OCM升级考试,希望能一步到位!
终于来到了最后一个SkillSet: Configuring Real Application Clusters配置RAC集群,这里和11g从头开始,安装GI,DB到创建数据库不一样,从12c OCM考试开始,是安装好了GI和DB软件的,就部署难度而言是有所下降的。但是就RAC本身配置来说,却增加了不少内容。

1 环境

总共有10个已经完成处理的用于ASM的磁盘,分别为DISK01-10(asmca中可直接看到),根据题目对其进行操作使用。其中DISK01-04已经创建为+DGDATA磁盘组。
GI_HOME=/u01/app/19.0.0/grid
ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

2 考题

  1. Enabling Grid Infrastructure 开启GI自动启动
  2. Administering ASM disk groups 管理ASM磁盘组
    1)create asm diskgroup +DGACFS using DISK05 and DISK06 with external redundancy.
    2)create asm diskgroup +DGFRA using DISK07 and DISK08 with external redundancy.
    3)Create ADVM volume name ACFS_VOL in +DGACFS disk group with size 200M.
    4)Create a ACFS file system on ACFS_VOL and mount it at: /u01/app/oracle/acfs_share
    5)Add one more OCR image in +DGACFS and +DGFRA disk group
    6)Copy /home/oracle/scripts/images.zip to /u01/app/oracle/acfs_share, and create a snapshot name SNAP_001 for ACFS
  3. Managing Grid Infrastructure 管理GI
    1)Export the OLR on the host03 to the directory /home/grid/olrdump
    2)Configure OCR backup location to /home/grid/ocrbackup
    3)Configure the cluster policy management method by referring the followings contents from /home/oracle/scripts/policysetfile.txt. Perform the neceassary operation to make the configuration be implemented, the active day policy.
    4)Configure eth1 and eth2 both for privte and asm
  4. Creating a RAC database 创建RAC数据库
    1)The datbase name is RACDB.
    2)General purpose.
    3)Policy management in racdbpool server pool.
    4)Do not configure EM.
    5)The password for sys and system is oracle.
    6)The datafiles are stored in +DGDATA disk group.
    7)Fast recovery area is +DGFRA disk group and the size is 4GB.
    8)Do not install sample schema
    9)The instance total memory is 800MB.
  5. Additional configuration 附加配置
    1)Create a service named SRV1 in racdbpool and run SRV1 on host03 when start it.
    2)Create a service named SRV2 in racdbpool, which need to be started to support transaction level failover.
    3)Convert RAC to RAC ONENODE
    4)Run the SQL scripts, how to make proper action to lower the contention of insert activties issued by millions of concurrent user from two nodes.
    5)Convert RAC ONENODE backup to normal RAC mode
    6)Configure database to reduce duplicate blocks parallel query image.
    7)Configure the database backup the controlfile automatically, regardless of any change on the physical structure of the database.

3 操作

  1. host03,host04上操作
sudo /u01/app/19.0.0/grid/bin/crsctl enable crs
  1. 题目1)-4)使用ASMCA进行操作
5)
sudo /u01/app/19.0.0/grid/bin/ocrconfig -add +DGACFS
sudo /u01/app/19.0.0/grid/bin/ocrconfig -add +DGFRA

6)
sudo /u01/app/19.0.0/grid/bin/ocrdump -local /home/grid/olrdump

3.GI配置

1)
cp /home/oracle/scripts/images.zip /u01/app/oracle/acfs_shars
sudo /sbin/acfsutil snap create SNAP_001 /u01/app/oracle/acfs_share

2)
mkdir /home/grid/ocrbackup
sudo /u01/app/19.0.0/grid/ocrconfig -backuploc /home/grid/ocrbackup

3)policysetfile.txt原文件为:
SERVER_POOL_NAMES=Free bigpool ora.racdbpool
POLICY
NAME=day
DESCRIPTION=The day policy
SERVERPOOL
NAME=ora.racdbpool
IMPORTANCE=10
MAX_SIZE=5
MIN_SIZE=1
SERVER_CATEGORY=ora.hub.category
SERVERPOOL
NAME=bigpool
IMPORTANCE=0
MAX_SIZE=0
MIN_SIZE=0
SERVER_CATEGORY=big
POLICY
NAME=night
DESCRIPTION=The night policy
SERVERPOOL
NAME=ora.racdbpool
IMPORTANCE=10
MAX_SIZE=5
MIN_SIZE=1
SERVER_CATEGORY=ora.hub.category
SERVERPOOL
NAME=bigpool
IMPORTANCE=5
MAX_SIZE=1
MIN_SIZE=1
SERVER_CATEGORY=big

sudo cp /home/oracle/scripts/policysetfile.txt /home/grid/
sudo chown grid:oinstall /home/grid/policysetfile.txt
#需要对文件进行缩进处理
SERVER_POOL_NAMES=Free bigpool ora.racdbpool
POLICY
  NAME=day
  DESCRIPTION=The day policy
  SERVERPOOL
    NAME=ora.racdbpool
    IMPORTANCE=10
    MAX_SIZE=5
    MIN_SIZE=1
    SERVER_CATEGORY=ora.hub.category
  SERVERPOOL
    NAME=bigpool
    IMPORTANCE=0
    MAX_SIZE=0
    MIN_SIZE=0
    SERVER_CATEGORY=big
POLICY
  NAME=night
  DESCRIPTION=The night policy
  SERVERPOOL
    NAME=ora.racdbpool
    IMPORTANCE=10
    MAX_SIZE=5
    MIN_SIZE=1
    SERVER_CATEGORY=ora.hub.category
  SERVERPOOL
    NAME=bigpool
    IMPORTANCE=5
    MAX_SIZE=1
    MIN_SIZE=1
    SERVER_CATEGORY=big
 
crsctl add category big
crsctl modify policyset -file /home/grid/policysetfile.txt
crsctl modify policyset -attr "LAST_ACTIVATED_POLICY=day"

4)
oifcfg setif -global eth1/10.0.0.0:cluster_interconnect,asm
oifcfg setif -global eth2/10.0.0.0:cluster_interconnect,asm

sudo /u01/app/12.1.0/grid/bin/crsctl stop cluster -all
sudo /u01/app/12.1.0/grid/bin/crsctl start cluster -all

文档位置:
Oracle Database 19c
Clusterware Administration and Deployment Guide
\qquad -> E Oracle Clusterware Control (CRSCTL) Utility Reference
\qquad\qquad -> Oracle RAC Environment CRSCTL Commands
\qquad\qquad\qquad -> crsctl modify policyset

  1. 使用DBCA创建数据库
  2. 附加配置
1)
srvctl add service -d racdb -s SRV1 -g racdbpool -c singleton
srvctl start service -db racdb -service SRV1

2)
srvctl add service -db racdb -service SRV2 -serverpool racdbpool -failovertype transaction -commit_outcom true -retention 86400 -notification true
srvctl start service -db racdb -service SRV2

3)
srvctl stop instance -db racdb -node host04 -force
srvctl convert database -db racdb -dbtype RACONENODE
srvctl config database -d racdb

4)脚本内容:
#create table t1 (id number primary key,name varchar2(10),createdate date) partition by range(createdate) interval(numtoyminterval(1,'MONTH')) (partition SAL1 values less than (to_date('2007-01-01','yyyy-mm-dd')));
#create sequence seq_t1;

alter sequence seq_t1 cache 100000;
select constraint_name,constraint_type,index_name from dba_constraints where table_name='T1';
alter table t1 drop constraint <constraint_name>;
drop index <constraint_name>;
create unique index idx_t1 on t1(id) parallel 4 global partition by hash(id) partitions 4;
alter table t1 add constraint pd_t1 primery key(id) using index idx_t1;

5)
srvctl convert database -db racdb -dbtype RAC

6)sqlplus / as sysdba
alter system set parallel_force_local=true;

7)rman target/
configure controlfile autobackup on;
configure controlfile autoback format for device type disk to '+DGDATA';
configure snapshot controlfile name to '+DGDATA/snapcf_RACDB.f';

总结

至此,19c OCM考试及考点内容基本完成,后面会在考完以后进行更新并调整。
老规矩,知道写了些啥。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

胖头鱼的鱼缸(尹海文)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值