Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching

Oracle Engineered System


当前位置: 首页 » 技术文章 » Oracle 12c+

在OEL6.8上安装12.2 RAC

Oracle Cluster Domain

Oracle Cluster Domain是Oracle Clusterware 12c Release 2中的一个新功能,包含了下面的组件


Oracle Domain Services Cluster
Oracle Member Cluster for Oracle Database
Oracle Member Cluster for Applications.



Oracle Cluster Domain enables you to standardize, centralize, and optimize your Oracle Real Application Clusters (Oracle RAC) deployment for the private database cloud. Multiple cluster configurations are grouped under an Oracle Cluster Domain for management purposes and make use of shared services available within that Oracle Cluster Domain. The cluster configurations within that Oracle Cluster Domain include Oracle Domain Services Cluster and Oracle Member Clusters.

The Oracle Domain Services Cluster provides centralized services to other clusters within the Oracle Cluster Domain. These services include:

    A centralized Grid Infrastructure Management Repository (housing the MGMTDB for each of the clusters within the Oracle Cluster Domain)

    Trace File Analyzer (TFA) services, for targeted diagnostic data collection for Oracle Clusterware and Oracle Database

    Consolidated Oracle ASM storage management service

    An optional Rapid Home Provisioning (RHP) Service to install clusters, and provision, patch, and upgrade Oracle Grid Infrastructure and Oracle Database homes. When you configure the Oracle Domain Services Cluster, you can also choose to configure the Rapid Home Provisioning Server.


和之前安装方式的不同

12.2之前,我们通过runInstaller命令去安装集群软件,安装文件包含很多的jar文件,安装的时候需要再次解压。在12.2中,集群软件是已经打包好的,只需要解压,然后共同gridSetup.sh脚本去安装就好。其中gridSetup.sh所在的目录就是GI_HOME的目录。

[orgrid@ohs1 122]$ cd $ORACLE_HOME
[orgrid@ohs1 122]$ pwd
/pgold/orgrid/oracle/product/122
[orgrid@ohs1 122]$ ls -l gridSetup.sh 
-rwxr-x---. 1 orgrid oinstall 5395 Jul 21  2016 gridSetup.sh
[orgrid@ohs1 122]$ ./gridSetup.sh

安装多样性
支持不同类型的安装方式,包括Extended Cluster

注意:支持NFS,之前的版本,没有明确标识

OCR和MGMT数据库可以放在同一个磁盘组或者不同的磁盘组

注意:选择YES,将放在不同的磁盘组,选择No将放在同一磁盘组

支持Configure Oracle ASM Filter Driver

注意:支持ASMFD,但不支持和ASMLIB一起使用,本次实验使用了ASMLIB,故不支持

指定GRID_BASE,无需指定GRID_HOME

注意:由于软件解压后的目录就是GRID_HOME,所以安装时不会让你再次指定


ASMCMD

[orgrid@ohs1 ~]$ asmcmd
ASMCMD> showversion
ASM version         : 12.2.0.1.0
ASMCMD> showclustermode
ASM cluster : Flex mode enabled
ASMCMD> showclusterstate
Normal
ASMCMD> showpatches
---------------

List of Patches

===============

ASMCMD> 

crsctl

[orgrid@ohs1 ~]$ crsctl query crs administrator
CRS Administrator List: orgrid root

[orgrid@ohs1 ~]$ crsctl query crs activeversion -f
Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [0].

[orgrid@ohs1 ~]$ crsctl query crs releaseversion
Oracle High Availability Services release version on the local node is [12.2.0.1.0]

[orgrid@ohs1 ~]$ crsctl query crs softwareversion -all
Oracle Clusterware version on node [ohs1] is [12.2.0.1.0]
Oracle Clusterware version on node [ohs2] is [12.2.0.1.0]

[orgrid@ohs1 ~]$ crsctl query crs releasepatch
Oracle Clusterware release patch level is [0] and no patches have been applied on the local node.

[orgrid@ohs1 ~]$ crsctl query crs softwarepatch
Oracle Clusterware patch level on node ohs1 is [0].

[orgrid@ohs1 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   8ac3823032c84fb8bff3abcdfc8e4cf9 (ORCL:SYSTEMDG) [SYSTEMDG]
Located 1 voting disk(s).

[orgrid@ohs1 ~]$ crsctl query dns -servers
CRS-10018: the following configuration was found on the system:
CRS-10019: There are 2 domains in search order. They are:
ohsdba.cn
us.ohsdba.cn
CRS-10022: There are 1 name servers. They are:
10.0.2.10
CRS-10020: number of retry attempts for name lookup is: 3
CRS-10021: timeout for each name lookup is: 2
[orgrid@ohs1 ~]$


集群状态
[orgrid@ohs1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       ohs1                     STABLE
               ONLINE  ONLINE       ohs2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       ohs1                     STABLE
               ONLINE  ONLINE       ohs2                     STABLE
ora.SYSTEMDG.dg
               ONLINE  ONLINE       ohs1                     STABLE
               ONLINE  ONLINE       ohs2                     STABLE
ora.chad
               ONLINE  ONLINE       ohs1                     STABLE
               ONLINE  ONLINE       ohs2                     STABLE
ora.net1.network
               ONLINE  ONLINE       ohs1                     STABLE
               ONLINE  ONLINE       ohs2                     STABLE
ora.ons
               ONLINE  ONLINE       ohs1                     STABLE
               ONLINE  ONLINE       ohs2                     STABLE
ora.proxy_advm
               OFFLINE OFFLINE      ohs1                     STABLE
               OFFLINE OFFLINE      ohs2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ohs1                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ohs2                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ohs2                     STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       ohs1                     169.254.115.204 172.
                                                             16.0.21,STABLE
ora.asm
      1        ONLINE  ONLINE       ohs1                     Started,STABLE
      2        ONLINE  ONLINE       ohs2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       ohs2                     STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       ohs1                     Open,STABLE
ora.ohs1.vip
      1        ONLINE  ONLINE       ohs1                     STABLE
ora.ohs2.vip
      1        ONLINE  ONLINE       ohs2                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ohs2                     STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ohs1                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       ohs2                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       ohs2                     STABLE
--------------------------------------------------------------------------------
[orgrid@ohs1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....SM.lsnr ora....er.type ONLINE    ONLINE    ohs1        
ora....ER.lsnr ora....er.type ONLINE    ONLINE    ohs1        
ora....AF.lsnr ora....er.type OFFLINE   OFFLINE               
ora....N1.lsnr ora....er.type ONLINE    ONLINE    ohs1        
ora....N2.lsnr ora....er.type ONLINE    ONLINE    ohs2        
ora....N3.lsnr ora....er.type ONLINE    ONLINE    ohs2        
ora.MGMTLSNR   ora....nr.type ONLINE    ONLINE    ohs1        
ora....EMDG.dg ora....up.type ONLINE    ONLINE    ohs1        
ora.asm        ora.asm.type   ONLINE    ONLINE    ohs1        
ora.chad       ora.chad.type  ONLINE    ONLINE    ohs1        
ora.cvu        ora.cvu.type   ONLINE    ONLINE    ohs2        
ora.mgmtdb     ora....db.type ONLINE    ONLINE    ohs1        
ora....network ora....rk.type ONLINE    ONLINE    ohs1        
ora....S1.lsnr application    ONLINE    ONLINE    ohs1        
ora.ohs1.ons   application    ONLINE    ONLINE    ohs1        
ora.ohs1.vip   ora....t1.type ONLINE    ONLINE    ohs1        
ora....S2.lsnr application    ONLINE    ONLINE    ohs2        
ora.ohs2.ons   application    ONLINE    ONLINE    ohs2        
ora.ohs2.vip   ora....t1.type ONLINE    ONLINE    ohs2        
ora.ons        ora.ons.type   ONLINE    ONLINE    ohs1        
ora.proxy_advm ora....vm.type OFFLINE   OFFLINE               
ora.qosmserver ora....er.type ONLINE    ONLINE    ohs2        
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    ohs1        
ora.scan2.vip  ora....ip.type ONLINE    ONLINE    ohs2        
ora.scan3.vip  ora....ip.type ONLINE    ONLINE    ohs2

监听信息

[orgrid@ohs1 ~]$ ps -ef|grep tns
root        15     2  0 16:03 ?        00:00:00 [netns]
orgrid   24643     1  0 20:45 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
orgrid   24887     1  0 20:45 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr LISTENER -no_crs_notify -inherit
orgrid   24937     1  0 20:45 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
orgrid   28817     1  0 20:46 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
orgrid   31180 29759  0 20:51 pts/1    00:00:00 grep tns
[orgrid@ohs1 ~]$

[orgrid@ohs2 ~]$ ps -ef|grep tn
root        15     2  0 16:03 ?        00:00:00 [netns]
orgrid    8481  1516  0 20:51 pts/0    00:00:00 grep tn
orgrid   28735     1  0 20:44 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
orgrid   28904     1  0 20:44 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit
orgrid   28905     1  0 20:44 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit
orgrid   28924     1  0 20:44 ?        00:00:00 /pgold/orgrid/oracle/product/122/bin/tnslsnr LISTENER -no_crs_notify -inherit
[orgrid@ohs2 ~]$


relocate MGMTDB

[root@ohs1 ~]# ps -ef|grep pmon
orgrid   25344     1  0 20:45 ?        00:00:00 asm_pmon_+ASM1

[root@ohs2 ~]# ps -ef|grep pmon
orgrid   28291     1  0 20:44 ?        00:00:00 asm_pmon_+ASM2
orgrid   29229     1  0 20:44 ?        00:00:00 mdb_pmon_-MGMTDB
root     31624 27748  0 20:45 pts/0    00:00:00 grep pmon

[root@ohs2 ~]# su - orgrid
[orgrid@ohs2 ~]# srvctl relocate mgmtdb -node ohs1
[orgrid@ohs2 ~]# ps -ef|grep pmon
orgrid   28291     1  0 20:44 ?        00:00:00 asm_pmon_+ASM2

[root@ohs1 ~]# ps -ef|grep pmon
orgrid   25344     1  0 20:45 ?        00:00:00 asm_pmon_+ASM1
orgrid   28968     1  0 20:46 ?        00:00:00 mdb_pmon_-MGMTDB
root     29110 21360  0 20:47 pts/1    00:00:00 grep pmon
[root@ohs1 ~]#


Reference

http://docs.oracle.com/database/122/CWLIN/understanding-cluster-configuration-options.htm


关键词:asmcmd 12c rac 

相关文章

关于max_string_size
在Oracle数据库19c中使用JSON
Oracle 19c新特性之RAC Automatic Failback Service
Install Oracle RAC Database 19c Step by Step
保障业务连续性的神器
Oracle事务卫士(Transaction Guard)和应用连续性(Application Continuity)
容器数据库(CDB)和可插拔数据库(PDB)概述
Install Oracle Domain Service Cluster Step by Step
Oracle RAC and Third Party Cloud
How to generate AWR on PDB and ADG(12.2 afterwards)
ORA-12514 During DataPump Export/Import In RAC
在12c上使用wm_concat
Top