【游戏开发】CentOS 9.2使用iSCSI部署Orattle 18.3 RAC
CentOS 7.5使用iSCSI部署Oracle 18.3 RAC
- 一、主机环境以及配置
- 1.1 ASM磁盘组规划
- 1.2 主机网络规划
- 1.3 操作系统配置部分
- 5.1 容器数据库自动启动
- 5.2 集群日志查看
- 5.3 客户端配置
- 5.3 卸载Grid Cluster集群环境
一、主机环境以及配置
Oracle 18c的安装方式与12c R2类似,基本没有变化,本次测试环境使用的是VMware+Openfiler虚拟多路径iSCSI存储实现,测试环境的主机节点建议使用16G内存以上。
目前在Linux环境下可以使用18.3版本
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
RAC主机:
RAC主机名:rac1、rac2CPU:Intel® Xeon® CPU E5-2670 v2 @ 2.50GHz 4core
内存:16G
操作环境: CentOS 7.5 + Oracle 18.3 + UDEV
SSD:INTEL P3700 1.6T NVME
存储:Openfiler
附sysbench测试Openfiler ISCSI存储IOPS
随机读IOPS:11583
随机写IOPS:3067
顺序读IOPS:12248
顺序写IOPS:2382
1.1 ASM磁盘组规划
在18C环境下如果ocr、Voting files与管理资料库GIMR共存并且使用外部冗余,那么ASM磁盘组最小为30GB。下面附Oracle官方磁盘组最小要求
https://docs.oracle.com/en/database/oracle/oracle-database/18/cwlin/oracle-clusterware-storage-space-requirements.html#GUID-97FD5D40-A65B-4575-AD12-06C491AF3F41
本次测试环境,使用4个磁盘组
ASM磁盘组 | 用途 | 大小 |
---|---|---|
asm_crs | ocr文件,voting disk | 30G |
asm_gimr | 18c管理库 | 40G |
asm_data | 数据文件 | 20G |
asm_arch | 归档文件 | 2G |
1.2 主机网络规划
网络配置 | 节点1 | 节点2 |
---|---|---|
主机名称 | rac1 | rac2 |
public ip | 192.168.189.202 | 192.168.189.203 |
private ip | 10.10.10.202 | 10.10.10.202 |
vip | 192.168.189.204 | 192.168.189.205 |
scan ip | 192.168.189.206 | 192.168.189.206 |
1.3 操作系统配置部分
两个节点主机名设置
hostnamectl set-hostname racnnode1
1、关闭防火墙
在两个节点关闭防火墙
[root@rac1~]# systemctl stop firewalld
[root@rac1~]# systemctl disabled firewalld
2、关闭selinux
在两个节点关闭selinux
[root@rac1~]# vi /etc/selinux/configSELINUX=disabled
[root@rac1~]#setenforce 0
3、hosts文件配置
在两个节点修改hosts文件
[root@rac1~]# vi /etc/hosts#public ip ent0
192.168.189.202 rac1
192.168.189.203 rac2
192.168.189.204 rac1-vip
192.168.189.205 rac2-vip
10.10.10.202 rac1-prv
10.10.10.203 rac2-prv
192.168.189.206 rac-scan
4、依赖包配置
在两个节点安装rac需要的依赖包(使用12C R2依赖包即可)
[[email protected] ~]# yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y compat-libstdc++-33.i686
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc
yum install -y glibc.i686
yum install -y glibc-devel
yum install -y glibc-devel.i686
yum install -y ksh
yum install -y libgcc
yum install -y libgcc.i686
yum install -y libstdc++
yum install -y libstdc++.i686
yum install -y libstdc++-devel
yum install -y libstdc++-devel.i686
yum install -y libaio
yum install -y libaio.i686
yum install -y libaio-devel
yum install -y libaio-devel.i686
yum install -y libXext
yum install -y libXext.i686
yum install -y libXtst
yum install -y libXtst.i686
yum install -y libX11
yum install -y libX11.i686
yum install -y libXau
yum install -y libXau.i686
yum install -y libxcb
yum install -y libxcb.i686
yum install -y libXi
yum install -y libXi.i686
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
yum install -y readline
yum install -y libtermcap-devel
yum install -y pdksh
centos7还需单独安装一个独立包rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
5、关闭时间同步ntpd服务
检查两节点时间,时区是否相同,并禁止ntp[root@rac1~]#systemctl disable ntpd.service
[root@rac1~]#systemctl stop ntpd.service
[root@rac1~]#mv /etc/ntp.conf /etc/ntp.conf.orig
[root@rac1~]#systemctl status ntpd
时区设置
# timedatectl list-timezones |grep Shanghai #查找中国时区的完整名称
Asia/Shanghai
# timedatectl set-timezone Asia/Shanghai
6、创建用户及用户组
在两个节点创建oracle,grid用户组
[root@rac1~]groupadd -g 601 oinstall
groupadd -g 602 dba
groupadd -g 603 oper
groupadd -g 604 backupdba
groupadd -g 605 dgdba
groupadd -g 606 kmdba
groupadd -g 607 asmdba
groupadd -g 608 asmoper
groupadd -g 609 asmadmin
groupadd -g 610 racdba
useradd -u 601-g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
useradd -u 602-g oinstall -G asmadmin,asmdba,asmoper,dba grid
设置grid、oracle密码
[root@rac1~]echo "oracle"| passwd --stdin oracle
echo "oracle"| passwd --stdin grid
7、创建文件目录
在两个节点创建grid、oracle文件目录
[root@rac1~]mkdir -p /u01/app/18.3.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/18.3.0/db_1
chown -R grid:oinstall /u01
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775/u01/
8、修改20-nproc.conf
在两个节点修改/etc/security/limits.d/20-nproc.conf
[root@rac1~]vi /etc/security/limits.d/20-nproc.conf# Change this
#注释这行* soft nproc 1024
# To this增加下面一行
*- nproc 16384
9、修改limits.conf
在两个节点修改/etc/security/limits.conf
[root@rac1~]vi /etc/security/limits.conf#ORACLE SETTING
grid soft nproc 16384
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
10、修改login
在两个节点修改/etc/pam.d/login文件
[root@rac1~]vi /etc/pam.d/login#ORACLE SETTING
session required pam_limits.so
11、修改/etc/systemd/logind.conf文件
使用centos 7.2 安装grid时,需要修改这个参数,不然asm组件会起不来,crs时好时不好,7.5无需修改
vim /etc/systemd/logind.confRemoveIPC=no
systemctldaemon-reloadsystemctlrestart systemcd-logind
12、修改sysctl.conf
在两个节点修改/etc/sysctl.conf
[root@rac1~]vi /etc/sysctl.conf#ORACLE SETTING
fs.aio-max-nr =1048576
fs.file-max =6815744
kernel.shmmax =15461882265
kernel.shmall =3774873
kernel.shmmni =4096
kernel.sem =25032000100128
net.ipv4.ip_local_port_range =900065500
net.core.rmem_default =262144
net.core.rmem_max =4194304
net.core.wmem_default =262144
net.core.wmem_max =1048586
13、停止avahi-daemon服务
两个节点分别操作
[root@rac1~]# systemctl disable avahi-daemon.socket[root@rac1~]# systemctl disable avahi-daemon.service
ps -ef|grep avahi-daemon
kill-9 pid avahi-daemon
14、添加NOZEROCONF=yes参数
[root@rac1 rpm]# vi /etc/sysconfig/networkNOZEROCONF=yes
15、修改grid用户环境变量
节点1 grid
[root@rac1~]# su - grid[grid@rac1:/home/grid]$vi ~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rac1
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/18.3.0/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
THREADS_FLAG=native; export THREADS_FLAG
if[ $USER="oracle"]||[ $USER="grid"];then
if[ $SHELL ="/bin/ksh"];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384-n 65536
fi
umask 022
fi
节点2 grid
[root@rac2~]# su - grid[grid@rac2:/home/grid]$vi ~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rac2
ORACLE_SID=+ASM2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/18.3.0/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
THREADS_FLAG=native; export THREADS_FLAG
if[ $USER="oracle"]||[ $USER="grid"];then
if[ $SHELL ="/bin/ksh"];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384-n 65536
fi
umask 022
fi
16、修改oracle用户环境变量
节点1 oracle
[root@rac1~]# su - oracle[oracle@rac1:/home/oracle]$vi ~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rac1
export ORACLE_UNQNAME=rac1
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/18.3.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/18.3.0/db_1/bin:$ORACLE_HOME/bin; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
THREADS_FLAG=native; export THREADS_FLAG
if[ $USER="oracle"]||[ $USER="grid"];then
if[ $SHELL ="/bin/ksh"];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384-n 65536
fi
umask 022
fi
节点2 oracle
[root@rac2~]# su - oracle[oracle@rac2:/home/oracle]$vi ~/.bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rac2
export ORACLE_UNQNAME=rac2
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/18.3.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/18.3.0/db_1/bin:$ORACLE_HOME/bin; export PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
THREADS_FLAG=native; export THREADS_FLAG
if[ $USER="oracle"]||[ $USER="grid"];then
if[ $SHELL ="/bin/ksh"];then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384-n 65536
fi
umask 022
fi
17、修改root环境变量
加入grid用户$ORACLE_HOME
[root@rac1 opt]# vi ~/.bash_profile# .bash_profile
# Get the aliases and functions
if[-f ~/.bashrc ];then
.~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:/u01/app/18.3.0/grid/bin:$HOME/bin
export PATH
18、禁用透明大页
1 修改grub文件cp /etc/default/grub /etc/default/grub.bak
vi /etc/default/grub
2 增加一行transparent_hugepage=never到尾部
GRUB_CMDLINE_LINUX="rhgb quiet transparent_hugepage=never"
3 执行命令
grub2-mkconfig -o /boot/grub2/grub.cfg
4 不重启生效
[[email protected] ~]#echo never > /sys/kernel/mm/transparent_hugepage/enabled
5 查看是否禁用透明大页
[[email protected] ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
[[email protected] ~]# grep AnonHugePages /proc/meminfo
AnonHugePages: 0 kB---------->>>返回值若是零,代表成功禁用THP
19、修改共享存储、udev规则
在节点1和节点2,固定设备名称并且赋予grid属性,执行如下命令,用来生成udev规则
1 取得DM_UUID
cd /dev/mapperfor i in`ls mpath*`;
do printf "%s %s\n""$i""$(udevadm info --query=all --name=/dev/mapper/$i |grep -i dm_uuid)";
done
2 生成rules文件
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c4552374d50627a782d5258784c2d48617139",SYMLINK+="asm_crs1",OWNER="grid",GROUP="asmadmin",MODE="0660"KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c455268306259436d2d567037722d48384664",SYMLINK+="asm_crs2",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c4552525341664b612d3864536d2d76756f6d",SYMLINK+="asm_crs3",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c4552304b564372552d524770522d6e4b3752",SYMLINK+="asm_gimr",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c45527961674d52742d55427a522d4c685a53",SYMLINK+="asm_data",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-14f504e46494c455257316f4a31772d43766d732d45745249",SYMLINK+="asm_arch",OWNER="grid",GROUP="asmadmin",MODE="0660"
3重新加载udev
udevadm control --reload-rulesudevadm trigger
4查看asm磁盘
[root@rac1~]# ll /dev/asm*lrwxrwxrwx 1 root root 4 Nov 417:53/dev/asm_crs -> dm-1
lrwxrwxrwx 1 root root 4 Nov 417:53/dev/asm_data -> dm-0
20、节点2拷贝节点1的udev规则文件
scp rac1:/etc/udev/rules.d/99-oracle-asmdevices.rules /etc/udev/rules.d/99-oracle-asmdevices.rules
二、Grid集群软件安装部分
1、上传集群软件包
在节点1上传grid安装包
[root@rac1 grid]# ll-rwxr-xr-x 1 grid oinstall 5.1G Jan 2815:58 LINUX.X64_180000_grid_home.zip
2、解压grid安装包
在18C中需要把grid包解压放到grid用户下ORACLE_HOME目录内
解压文件到/u01/app/18.3.0/grid
[grid@rac2 grid]$ cd /u01/app/18.3.0/grid[grid@rac2 grid]$ unzip LINUX.X64_180000_grid_home.zip
3、进入grid集群软件目录执行安装
[grid@rac1 grid]$ ./gridSetup.sh
4、GUI安装步骤
4.1 创建新的集群
4.2 选择独立集群
4.3 配置集群名称以及scan名称
4.4 grid下ssh认证配置
4.5 集群网络子网段配置
用于心跳的选择asm与private即可
4.6 配置asm
选择块设备
4.7 为asm磁盘组单独配置GIMR
单独配置GIMR
4.8 设置ocr、voting files磁盘组
4.9 配置GIMR磁盘组
External至少27GB
Normal至少54GB
4.10 配置asm密码
配置oracle asm下用户密码
4.11保持默认
4.12 不使用EM
4.13 grid用户组确认
4.14 grid文件目录确认
4.15 保持默认
4.16 输入root密码自动执行脚本
4.17 环境检查
修复之后忽略警告
4.18 开始安装
4.19 执行root.sh脚本
在两个节点,执行root.sh脚本
备注:在部署过程,如果rac主机内存低于4G不够大,可能会有如下报错,可尝试重试
忽略如下scan警告
下面为部署过程日志,因使用hosts解析,可忽略此警告
4.20 完成grid组件部署
grid部署时间:60min
三、Oracle DataBase软件安装
解压压缩包到oracle用户的ORACLE_HOME目录,执行安装
[oracle@rac1 db_1]$ pwd/u01/app/oracle/product/18.3.0/db_1
[oracle@rac1 db_1]$ unzip /opt/LINUX.X64_180000_db_home.zip
[oracle@rac1 db_1]$ ./runInstaller
1 software only
2 选择rac
3 ssh互信验证
4 保持默认
5 保持默认
6 保持默认
7 环境检查
修复之后忽略警告
8 开始install
9 执行root脚本
10 完成安装
oracle软件安装部分结束
四、DBCA创建实例
在创建实例前先通过grid的asmca创建磁盘组,随后再用oracle dbca创建实例
1、通过asmca创建oracle数据文件磁盘组
[[email protected] grid]$ asmca
data磁盘组
arch磁盘组
asm磁盘组创建完毕
2、dbca图形化安装实例
[[email protected] db_1]$ dbca
常规配置DBCA
DBCA完成
dbca创建过程 :20min
部署完毕查看集群状态
[root@rac1~]# crsctl stat res -t--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.CRS.dg
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.DATA.dg
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.GIMR.dg
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.chad
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.net1.network
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.ons
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac2 STABLE
ora.MGMTLSNR
1 ONLINE ONLINE rac2 169.254.27.20910.10
.10.82,STABLE
ora.asm
1 ONLINE ONLINE rac1 Started,STABLE
2 ONLINE ONLINE rac2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE rac2 STABLE
ora.mgmtdb
1 ONLINE ONLINE rac2 Open,STABLE
ora.orcl.db
1 ONLINE ONLINE rac1 Open,HOME=/u01/app/o
racle/product/18.3.0
/db_1,STABLE
2 ONLINE ONLINE rac2 Open,HOME=/u01/app/o
racle/product/18.3.0
/db_1,STABLE
ora.qosmserver
1 ONLINE ONLINE rac2 STABLE
ora.rac1.vip
1 ONLINE ONLINE rac1 STABLE
ora.rac2.vip
1 ONLINE ONLINE rac2 STABLE
ora.scan1.vip
1 ONLINE ONLINE rac2 STABLE
--------------------------------------------------------------------------------
查看数据库版本
[oracle@rac1 db_1]$ sqlplus /as sysdbaSQL*Plus: Release18.0.0.0.0- Production on Wed Jan 3014:27:352019
Version 18.3.0.0.0
Copyright © 1982,2018, Oracle.All rights reserved.
Connected to:
Oracle Database18c Enterprise Edition Release18.0.0.0.0- Production
Version 18.3.0.0.0
SQL> col banner_full for a120
SQL>select BANNER_FULL from v$version;
BANNER_FULL
--------------------------------------------------------------------------------
Oracle Database18c Enterprise Edition Release18.0.0.0.0- Production
Version 18.3.0.0.0
五、RAC日常维护
5.1 容器数据库自动启动
- 创建脚本
当数据库重启时,oracle下的pdb不会随着cdb启动,需要通过创建触发器,在数据库启动时候自动打开pdb
使用SYS用户创建如下触发器:CREATETRIGGER open_all_pdbs
AFTER STARTUP
ONDATABASE
BEGIN
EXECUTE IMMEDIATE 'alter pluggable database all open';
END open_all_pdbs;
/
5.2 集群日志查看
Oracle已经改变了命名约定开始使用Oracle 12.2.0.2之后的集群日志。
现在所有的集群日志文件被称为TRACE文件,并用带.trc扩展名(除集群警报日志)结束,而不是.log扩展这是在以前的版本的情况。
su - gridcd $ORACLE_BASE
asm实例告警日志位置:
vi /u01/app/grid/diag/asm/+asm/+ASM1/trace/alert_+ASM1.log
集群日志位置:
vi /u01/app/grid/diag/crs/rac1/crs/trace/alert.log
5.3 客户端配置
tnsnames.ora
orcl_rac =(DESCRIPTION =
(ADDRESS =(PROTOCOL = TCP)(HOST = rac-scan)(PORT =1521))
(LOAD_BALANCE = yes)
(FAILOVER =ON)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(FAILOVER_MODE =
(TYPE=SELECT)
(METHOD = BASIC)
)
)
)
jdbc:
urlAddr: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 10.1.73.234 )(PORT = 1521)))(CONNECT_DATA =(SERVER=DEDICATED)(SERVICE_NAME = racdb)))
5.3 卸载Grid Cluster集群环境
1、卸载oracle数据库软件
su - oraclecd $ORACLE_HOME/deinstall
[oracle@rac1 deinstall]$ ./deinstall
The details ofdatabase(s) orcl have been discovered automatically.Do you still want tomodify the details of orcl database(s)? [n]: y
2、卸载grid集群软件
su - gridcd $ORACLE_HOME/deinstall
[grid@rac1 deinstall]$ ./deinstall
如果不需要保留asm磁盘组,输入N
If you want to retain the existing diskgroups orifanyof the information detected is incorrect, you can modifyby entering 'y'.Do you want tomodify above information (y|n)[n]: nDatabaseCheck Configuration START
3、重新配置集群、清除grid安装配置,清空OCR配置和Voting disk
如果由于一些原因导致需要重新配置集群,那么需要先deconfig,再reconfig:
第一个节点
ORACLE_HOME/crs/install/rootcrs.sh -verbose -deconfig –force
第二个节点
ORACLE_HOME/crs/install/rootcrs.sh -verbose -deconfig –force-lastnode
rm -rf /etc/oraInst.loc
4、asm磁盘格式化
dd if=/dev/zero of=/dev/asm_crs1 bs=1024 count=100
dd if=/dev/zero of=/dev/asm_crs2 bs=1024 count=100
dd if=/dev/zero of=/dev/asm_crs3 bs=1024 count=100
dd if=/dev/zero of=/dev/asm_data bs=1024 count=100
dd if=/dev/zero of=/dev/asm_gimr bs=1024 count=100
以上是 【游戏开发】CentOS 9.2使用iSCSI部署Orattle 18.3 RAC 的全部内容, 来源链接: utcz.com/a/71079.html