oracle 11g 单机asm配置

简介: oracle 11g 单机asm配置

1,系统依赖软件包安装

yum -y install bc gcc gcc-c++ binutils make gdb cmake glibc ksh elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc-devel libaio libaio-devel libXrender libXrender-devel libX11 libXau sysstat libXi libXtst libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb net-tools nfs-utils compat-libcap1 compat-libstdc++ smartmontools targetcli python python-configshell python-rtslib python-six unixODBC unixODBC-devel

2,安装X11-Forwarding的支持

yum groupinstall "X Window System" -y
yum install xorg-x11-xauth xorg-x11-fonts-* xclock -y

3,用户建立

groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 505 asmoper
groupadd -g 506 asmdba
useradd -g oinstall -G dba,asmdba,oper oracle
useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid

mkdir /u01
chown grid:oinstall /u01/

4.rid安装选择软件:

[root@db01 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@db01 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid
ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl

To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/11.2.0/grid/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.

5,执行gi配置

[root@db01 ~]# /u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node db01 successfully pinned.
Adding Clusterware entries to oracle-ohasd.service
db01 2021/11/15 20:55:59 /u01/app/11.2.0/grid/cdata/db01/backup_20211115_205559.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

6,集权状态检查

[grid@db01 ~]$ crsctl stat res -t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

ora.ons

           OFFLINE OFFLINE      db01

Cluster Resources

ora.cssd

  1        OFFLINE OFFLINE

ora.diskmon

  1        OFFLINE OFFLINE

ora.evmd

  1        ONLINE  ONLINE       db01

6,启动cssd

[grid@db01 ~]$ crsctl start resource ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'db01'
CRS-2672: Attempting to start 'ora.diskmon' on 'db01'
CRS-2676: Start of 'ora.diskmon' on 'db01' succeeded
CRS-2676: Start of 'ora.cssd' on 'db01' succeeded

7.添加asm

[grid@db01 ~]$ export ORACLE_SID=+ASM

[grid@db01 ~]$ srvctl add asm
[grid@db01 grid]$ srvctl start asm

默认SID为+ASM
[grid@db01 ~]$ export ORACLE_SID=+ASM
状态检查
[grid@db01 grid]$ ps -ef|grep ASM
grid 6941 1 0 21:02 ? 00:00:00 asm_pmon_+ASM
grid 6943 1 0 21:02 ? 00:00:00 asm_psp0_+ASM
grid 6945 1 1 21:02 ? 00:00:01 asm_vktm_+ASM
grid 6949 1 0 21:02 ? 00:00:00 asm_gen0_+ASM
grid 6951 1 0 21:02 ? 00:00:00 asm_diag_+ASM
grid 6953 1 0 21:02 ? 00:00:00 asm_dia0_+ASM
grid 6955 1 0 21:02 ? 00:00:00 asm_mman_+ASM
grid 6957 1 0 21:02 ? 00:00:00 asm_dbw0_+ASM
grid 6959 1 0 21:02 ? 00:00:00 asm_lgwr_+ASM
grid 6961 1 0 21:02 ? 00:00:00 asm_ckpt_+ASM
grid 6963 1 0 21:02 ? 00:00:00 asm_smon_+ASM
grid 6965 1 0 21:02 ? 00:00:00 asm_rbal_+ASM
grid 6967 1 0 21:02 ? 00:00:00 asm_gmon_+ASM
grid 6969 1 0 21:02 ? 00:00:00 asm_mmon_+ASM
grid 6971 1 0 21:02 ? 00:00:00 asm_mmnl_+ASM

添
加
监听:
/u01/app/11.2.0/grid/bin/srvctl add LISTENER
必须添加LISTENER否则asm开启启动报错:
2021-11-15 23:30:12.969: USRTHRD{0:0:2} ASM Dedicated Thread {
2021-11-15 23:30:12.969: USRTHRD{0:0:2} CrsCmd::ClscrsCmdData::stat entity 1 statflag 32 useFilter 0
2021-11-15 23:30:12.985: USRTHRD{0:0:2} checkCrsStat 2 CLSCRS_STAT ret: 200
2021-11-15 23:30:12.985: USRTHRD{0:0:2} checkCrsStat 2 clscrs_res_get_op_status CLSCRS_STAT status 210 err_msg CRS-0210: Could not find resource 'ora.LISTENER.lsnr'.
2021-11-15 23:30:12.985: USRTHRD{0:0:2} CrsCmd::ClscrsCmdData::stat entity 1 statflag 33 useFilter 0
2021-11-15 23:30:13.005: USRTHRD{0:0:2} checkCrsStat 2 CLSCRS_STAT ret: 200
2021-11-15 23:30:13.005: USRTHRD{0:0:2} checkCrsStat 2 clscrs_res_get_op_status CLSCRS_STAT status 210 err_msg CRS-0210: Could not find resource 'ora.LISTENER.lsnr'.
2021-11-15 23:30:13.006: USRTHRD{0:0:2} AsmCommonAgent::setLocalListener cls::Exception CRS-0210: Could not find resource 'ora.LISTENER.lsnr'.
2021-11-15 23:30:13.006: USRTHRD{0:0:2} ASM Dedicated Thread }
2021-11-15 23:30:13.006: USRTHRD{0:0:2} Thread:ASM DedicatedThreadisRunning is reset to false here

数据库安装:选择single instanc

single instance database installation

[grid@db01 ~]$ asmcmd
ASMCMD> spget
?/dbs/spfile@.ora
ASMCMD> exit
[grid@db01 ~]$ srvctl add asm -h

Adds an ASM configuration to be managed by Oracle Restart.

Usage: srvctl add asm [-l <lsnr_name>] [-p ] [-d <asm_diskstring>]

-l <lsnr_name>           Listener name
-p <spfile>              Server parameter file path
-d <asm_diskstring>      ASM diskgroup discovery string
-h                       Print usage

[grid@db01 ~]$ srvctl config asm
ASM home: /u01/app/11.2.0/grid
ASM listener: LISTENER
Spfile: ?/dbs/spfile@.ora
ASM diskgroup discovery string: ++no-value-at-resource-creation--never-updated-through-ASM++

相关文章
|
Oracle 关系型数据库
oracle asm 磁盘显示offline
oracle asm 磁盘显示offline
1202 2
|
Oracle 关系型数据库 数据库
使用docker安装配置oracle 11g
使用docker安装配置oracle 11g
|
运维 Kubernetes 网络协议
基于虚拟服务配置的渐进式迁移实践:Istio集群至ASM集群的平滑切换
本文介绍了从Istio+k8s环境迁移到阿里云ASM+ACK环境的渐进式方法,通过配置虚拟服务和入口服务实现新老集群间的服务调用与流量转发,确保业务连续性与平滑迁移
1221 132
|
SQL Oracle 关系型数据库
如何在 Oracle 中配置和使用 SQL Profiles 来优化查询性能?
在 Oracle 数据库中,SQL Profiles 是优化查询性能的工具,通过提供额外统计信息帮助生成更有效的执行计划。配置和使用步骤包括:1. 启用自动 SQL 调优;2. 手动创建 SQL Profile,涉及收集、执行调优任务、查看报告及应用建议;3. 验证效果;4. 使用 `DBA_SQL_PROFILES` 视图管理 Profile。
|
存储 Oracle 关系型数据库
数据库数据恢复—Oracle ASM磁盘组故障数据恢复案例
Oracle数据库数据恢复环境&故障: Oracle ASM磁盘组由4块磁盘组成。Oracle ASM磁盘组掉线 ,ASM实例不能mount。 Oracle数据库故障分析&恢复方案: 数据库数据恢复工程师对组成ASM磁盘组的磁盘进行分析。对ASM元数据进行分析发现ASM存储元数据损坏,导致磁盘组无法挂载。
|
Ubuntu Oracle 关系型数据库
Oracle VM VirtualBox之Ubuntu 22.04LTS双网卡网络模式配置
这篇文章是关于如何在Oracle VM VirtualBox中配置Ubuntu 22.04LTS虚拟机双网卡网络模式的详细指南,包括VirtualBox网络概述、双网卡网络模式的配置步骤以及Ubuntu系统网络配置。
3190 3
|
机器学习/深度学习 Oracle 关系型数据库
Oracle 19c单机一键安装脚本分享
Oracle 19c单机一键安装脚本分享
1245 2
|
存储 Oracle 关系型数据库
【数据库数据恢复】Oracle数据库ASM磁盘组掉线的数据恢复案例
oracle数据库ASM磁盘组掉线,ASM实例不能挂载。数据库管理员尝试修复数据库,但是没有成功。
【数据库数据恢复】Oracle数据库ASM磁盘组掉线的数据恢复案例
|
存储 Oracle 关系型数据库
RAC创建ASM磁盘组时配置多路径和UDEV
RAC创建ASM磁盘组时配置多路径和UDEV
4342 7
|
存储 Oracle 关系型数据库
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例
手把手教你安装Oracle——以oracle 11g为例

推荐镜像

更多