zoukankan      html  css  js  c++  java
  • 重新配置grid(已经有数据库的情况)ocr没有备份

    场景:已经安装了数据库,没有orc备份,前提条件需要知道重新配置前的各种资源,重新配置grid会清楚掉OCR磁盘的信息,但是其他的磁盘比如DATA,REDO磁盘不会清除掉,后续把数据库加入到GRID中还可以使用.

     

     

    1.1.1     删除

     

    节点1(root账号下执行)

    /u01/grid/grid_home/11.2.0.4/crs/install/rootcrs.pl -deconfig -force -verbose

    [root@rac01 db_1]# /u01/grid/grid_home/11.2.0.4/crs/install/rootcrs.pl -deconfig -force -verbose

    Using configuration parameter file: /u01/grid/grid_home/11.2.0.4/crs/install/crsconfig_params

    Network exists: 1/192.168.58.0/255.255.255.0/enp0s3, type static

    VIP exists: /rac01-vip/192.168.58.121/192.168.58.0/255.255.255.0/enp0s3, hosting node rac01

    VIP exists: /rac02-vip/192.168.58.122/192.168.58.0/255.255.255.0/enp0s3, hosting node rac02

    ONS exists: Local port 6100, remote port 6200, EM port 2016

    PRKO-2312 : GSD does not exist.

    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac01'

    CRS-2673: Attempting to stop 'ora.crsd' on 'rac01'

    CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac01'

    CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac01'

    CRS-2673: Attempting to stop 'ora.cvu' on 'rac01'

    CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac01'

    CRS-2673: Attempting to stop 'ora.slnngk.service_s1.svc' on 'rac01'

    CRS-2673: Attempting to stop 'ora.oc4j' on 'rac01'

    CRS-2677: Stop of 'ora.cvu' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.cvu' on 'rac02'

    CRS-2676: Start of 'ora.cvu' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac01'

    CRS-2677: Stop of 'ora.slnngk.service_s1.svc' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac01'

    CRS-2677: Stop of 'ora.scan1.vip' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.scan1.vip' on 'rac02'

    CRS-2677: Stop of 'ora.rac01.vip' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.rac01.vip' on 'rac02'

    CRS-2676: Start of 'ora.scan1.vip' on 'rac02' succeeded

    CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac02'

    CRS-2676: Start of 'ora.rac01.vip' on 'rac02' succeeded

    CRS-2672: Attempting to start 'ora.slnngk.service_s1.svc' on 'rac02'

    CRS-2676: Start of 'ora.slnngk.service_s1.svc' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.OCR.dg' on 'rac01'

    CRS-2673: Attempting to stop 'ora.REDO.dg' on 'rac01'

    CRS-2673: Attempting to stop 'ora.slnngk.db' on 'rac01'

    CRS-2677: Stop of 'ora.slnngk.db' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac01'

    CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.REDO.dg' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.DATA.dg' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.OCR.dg' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.asm' on 'rac01'

    CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.oc4j' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.oc4j' on 'rac02'

    CRS-2676: Start of 'ora.oc4j' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.ons' on 'rac01'

    CRS-2677: Stop of 'ora.ons' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.net1.network' on 'rac01'

    CRS-2677: Stop of 'ora.net1.network' on 'rac01' succeeded

    CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed

    CRS-2677: Stop of 'ora.crsd' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.ctssd' on 'rac01'

    CRS-2673: Attempting to stop 'ora.evmd' on 'rac01'

    CRS-2673: Attempting to stop 'ora.asm' on 'rac01'

    CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac01'

    CRS-2677: Stop of 'ora.evmd' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.mdnsd' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.ctssd' on 'rac01' succeeded

    CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac01'

    CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.cssd' on 'rac01'

    CRS-2677: Stop of 'ora.cssd' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.crf' on 'rac01'

    CRS-2677: Stop of 'ora.crf' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.gipcd' on 'rac01'

    CRS-2677: Stop of 'ora.gipcd' on 'rac01' succeeded

    CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac01'

    CRS-2677: Stop of 'ora.gpnpd' on 'rac01' succeeded

    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac01' has completed

    CRS-4133: Oracle High Availability Services has been stopped.

    Successfully deconfigured Oracle clusterware stack on this node

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    节点2 我这里是2个节点的rac,节点2就是最后一个节点

    [root@rac02 /]# /u01/grid/grid_home/11.2.0.4/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode

    Using configuration parameter file: /u01/grid/grid_home/11.2.0.4/crs/install/crsconfig_params

    CRS resources for listeners are still configured

    Network exists: 1/192.168.58.0/255.255.255.0/enp0s3, type static

    VIP exists: /rac01-vip/192.168.58.121/192.168.58.0/255.255.255.0/enp0s3, hosting node rac01

    VIP exists: /rac02-vip/192.168.58.122/192.168.58.0/255.255.255.0/enp0s3, hosting node rac02

    ONS exists: Local port 6100, remote port 6200, EM port 2016

    PRKO-2312 : GSD does not exist.

    CRS-2673: Attempting to stop 'ora.crsd' on 'rac02'

    CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac02'

    CRS-2673: Attempting to stop 'ora.oc4j' on 'rac02'

    CRS-2673: Attempting to stop 'ora.slnngk.service_s1.svc' on 'rac02'

    CRS-2673: Attempting to stop 'ora.slnngk.service_s2.svc' on 'rac02'

    CRS-2673: Attempting to stop 'ora.cvu' on 'rac02'

    CRS-2677: Stop of 'ora.slnngk.service_s1.svc' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.cvu' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.slnngk.service_s2.svc' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.rac02.vip' on 'rac02'

    CRS-2673: Attempting to stop 'ora.OCR.dg' on 'rac02'

    CRS-2673: Attempting to stop 'ora.REDO.dg' on 'rac02'

    CRS-2673: Attempting to stop 'ora.slnngk.db' on 'rac02'

    CRS-2677: Stop of 'ora.rac02.vip' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac02'

    CRS-2677: Stop of 'ora.REDO.dg' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.slnngk.db' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac02'

    CRS-2677: Stop of 'ora.rac01.vip' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.DATA.dg' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.oc4j' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.OCR.dg' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.asm' on 'rac02'

    CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.ons' on 'rac02'

    CRS-2677: Stop of 'ora.ons' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.net1.network' on 'rac02'

    CRS-2677: Stop of 'ora.net1.network' on 'rac02' succeeded

    CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac02' has completed

    CRS-2677: Stop of 'ora.crsd' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.ctssd' on 'rac02'

    CRS-2673: Attempting to stop 'ora.evmd' on 'rac02'

    CRS-2673: Attempting to stop 'ora.asm' on 'rac02'

    CRS-2677: Stop of 'ora.evmd' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.ctssd' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac02'

    CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.cssd' on 'rac02'

    CRS-2677: Stop of 'ora.cssd' on 'rac02' succeeded

    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac02'

    CRS-2676: Start of 'ora.cssdmonitor' on 'rac02' succeeded

    CRS-2672: Attempting to start 'ora.cssd' on 'rac02'

    CRS-2672: Attempting to start 'ora.diskmon' on 'rac02'

    CRS-2676: Start of 'ora.diskmon' on 'rac02' succeeded

    CRS-2676: Start of 'ora.cssd' on 'rac02' succeeded

    CRS-4611: Successful deletion of voting disk +OCR.

    ASM de-configuration trace file location: /tmp/asmcadc_clean2020-12-11_02-59-38-AM.log

    ASM Clean Configuration START

    ASM Clean Configuration END

    ASM with SID +ASM1 deleted successfully. Check /tmp/asmcadc_clean2020-12-11_02-59-38-AM.log for details.

    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac02'

    CRS-2673: Attempting to stop 'ora.crf' on 'rac02'

    CRS-2673: Attempting to stop 'ora.ctssd' on 'rac02'

    CRS-2673: Attempting to stop 'ora.asm' on 'rac02'

    CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac02'

    CRS-2677: Stop of 'ora.mdnsd' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.crf' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.ctssd' on 'rac02' succeeded

    CRS-2677: Stop of 'ora.asm' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac02'

    CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.cssd' on 'rac02'

    CRS-2677: Stop of 'ora.cssd' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.gipcd' on 'rac02'

    CRS-2677: Stop of 'ora.gipcd' on 'rac02' succeeded

    CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac02'

    CRS-2677: Stop of 'ora.gpnpd' on 'rac02' succeeded

    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac02' has completed

    CRS-4133: Oracle High Availability Services has been stopped.

    Successfully deconfigured Oracle clusterware stack on this node

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    1.1.2     执行root.sh重新配置

    节点1

    [root@rac01 db_1]# /u01/grid/grid_home/11.2.0.4/root.sh

    Performing root user operation for Oracle 11g

    The following environment variables are set as:

        ORACLE_OWNER= grid

        ORACLE_HOME=  /u01/grid/grid_home/11.2.0.4

    Enter the full pathname of the local bin directory: [/usr/local/bin]:

    The contents of "dbhome" have not changed. No need to overwrite.

    The contents of "oraenv" have not changed. No need to overwrite.

    The contents of "coraenv" have not changed. No need to overwrite.

    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.

    Using configuration parameter file: /u01/grid/grid_home/11.2.0.4/crs/install/crsconfig_params

    User ignored Prerequisites during installation

    Installing Trace File Analyzer

    OLR initialization - successful

    Adding Clusterware entries to oracle-ohasd.service

    CRS-2672: Attempting to start 'ora.mdnsd' on 'rac01'

    CRS-2676: Start of 'ora.mdnsd' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.gpnpd' on 'rac01'

    CRS-2676: Start of 'ora.gpnpd' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac01'

    CRS-2672: Attempting to start 'ora.gipcd' on 'rac01'

    CRS-2676: Start of 'ora.cssdmonitor' on 'rac01' succeeded

    CRS-2676: Start of 'ora.gipcd' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.cssd' on 'rac01'

    CRS-2672: Attempting to start 'ora.diskmon' on 'rac01'

    CRS-2676: Start of 'ora.diskmon' on 'rac01' succeeded

    CRS-2676: Start of 'ora.cssd' on 'rac01' succeeded

    ASM created and started successfully.

    Disk Group OCR created successfully.

    clscfg: -install mode specified

    Successfully accumulated necessary OCR keys.

    Creating OCR keys for user 'root', privgrp 'root'..

    Operation successful.

    Successful addition of voting disk 4a1b196c0a914f5dbfe0525dbecf2b9a.

    Successfully replaced voting disk group with +OCR.

    CRS-4266: Voting file(s) successfully replaced

    ##  STATE    File Universal Id                File Name Disk group

    --  -----    -----------------                --------- ---------

     1. ONLINE   4a1b196c0a914f5dbfe0525dbecf2b9a (/dev/asm-diskb) [OCR]

    Located 1 voting disk(s).

    CRS-2672: Attempting to start 'ora.asm' on 'rac01'

    CRS-2676: Start of 'ora.asm' on 'rac01' succeeded

    CRS-2672: Attempting to start 'ora.OCR.dg' on 'rac01'

    CRS-2676: Start of 'ora.OCR.dg' on 'rac01' succeeded

    Preparing packages...

    cvuqdisk-1.0.9-1.x86_64

    Configure Oracle Grid Infrastructure for a Cluster ... succeeded

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    节点2:

    [root@rac02 /]# /u01/grid/grid_home/11.2.0.4/root.sh

    Performing root user operation for Oracle 11g

    The following environment variables are set as:

        ORACLE_OWNER= grid

        ORACLE_HOME=  /u01/grid/grid_home/11.2.0.4

    Enter the full pathname of the local bin directory: [/usr/local/bin]:

    The contents of "dbhome" have not changed. No need to overwrite.

    The contents of "oraenv" have not changed. No need to overwrite.

    The contents of "coraenv" have not changed. No need to overwrite.

    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.

    Using configuration parameter file: /u01/grid/grid_home/11.2.0.4/crs/install/crsconfig_params

    User ignored Prerequisites during installation

    Installing Trace File Analyzer

    OLR initialization - successful

    Adding Clusterware entries to oracle-ohasd.service

    CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac01, number 1, and is terminating

    An active cluster was found during exclusive startup, restarting to join the cluster

    Preparing packages...

    cvuqdisk-1.0.9-1.x86_64

    Configure Oracle Grid Infrastructure for a Cluster ... succeeded

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     


    1.31.3    查看当前的资源情况

    [grid@rac02 ~]$ crsctl stat resource -t
    --------------------------------------------------------------------------------
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.OCR.dg
                   ONLINE  ONLINE       rac01                                        
                   ONLINE  ONLINE       rac02                                        
    ora.asm
                   ONLINE  ONLINE       rac01                    Started             
                   ONLINE  ONLINE       rac02                    Started             
    ora.gsd
                   OFFLINE OFFLINE      rac01                                        
                   OFFLINE OFFLINE      rac02                                        
    ora.net1.network
                   ONLINE  ONLINE       rac01                                        
                   ONLINE  ONLINE       rac02                                        
    ora.ons
                   ONLINE  ONLINE       rac01                                        
                   ONLINE  ONLINE       rac02                                        
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       rac01                                        
    ora.cvu
          1        ONLINE  ONLINE       rac01                                        
    ora.oc4j
          1        ONLINE  ONLINE       rac01                                        
    ora.rac01.vip
          1        ONLINE  ONLINE       rac01                                        
    ora.rac02.vip
          1        ONLINE  ONLINE       rac02                                        
    ora.scan1.vip
          1        ONLINE  ONLINE       rac01           


    发现本地监听器资源,磁盘组资源,服务资源都没有了,下面需要逐一添加(前提是需要知道这些资源)

     

     

     

     

     

     

     

     

     

     

    1.1.1     手工挂载磁盘

    当前的数据盘data和redo都是在dismount状态的,我们需要手工进行挂载

    SQL> set linesize 1000;

    SQL> select name,state from v$asm_diskgroup;

    NAME                                                         STATE

    ------------------------------------------------------------ ----------------------

    OCR                                                          MOUNTED

    REDO                                                         DISMOUNTED

    DATA                                                         DISMOUNTED

     

     

     

     

     

     

     

     

     

     

     

     

    节点1 上进行mount

    SQL> alter diskgroup data mount;

     

    Diskgroup altered.

     

    SQL> alter diskgroup redo mount;

     

    Diskgroup altered.

     

    节点2上发现还是dismount,尝试手工mount

    SQL> select name,state from v$asm_diskgroup;

     

    NAME                                                         STATE

    ------------------------------------------------------------ ----------------------

    OCR                                                          MOUNTED

    DATA                                                         DISMOUNTED

    REDO                                                         DISMOUNTED

     

    SQL> alter diskgroup data mount;

     

    Diskgroup altered.

     

    SQL> alter diskgroup redo mount;

     

    Diskgroup altered.

     

     

     

     

     

     

     

    1.1.2     注册数据库

    注册数据库资源

    oracle账号下操作,在其中一个节点上执行,我这里在节点1上执行

    [oracle@rac01 ~]$srvctl add database -d slnngk -o /u01/oracle/app/product/11.2.0/db_1

     

    [oracle@rac01 ~]$srvctl add instance -d slnngk -i slnngk1 -n rac01

    [oracle@rac01 ~]$srvctl add instance -d slnngk -i slnngk2 -n rac02

     

    启动数据库

    [oracle@rac01 ~]$srvctl start database -d slnngk

     

     

     

     

     

    1.1.3     注册本地监听器

     

    登陆数据库查看本地监听器的参数配置

    节点1:

    [oracle@rac01 ~]$ sqlplus /nolog

     

    SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 14 03:25:35 2020

     

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

     

    SQL> connect / as sysdba

    Connected.

    SQL> show parameters listener;

     

    SQL> show parameters listener;

     

    NAME                                 TYPE        VALUE

    ------------------------------------ ----------- ------------------------------

    listener_networks                    string

    local_listener                       string

    remote_listener                      string      rac-scan:1521

     

     

    节点2:

    SQL> show parameters listener;

     

    NAME                                 TYPE        VALUE

    ------------------------------------ ----------- ------------------------------

    listener_networks                    string

    local_listener                       string

    remote_listener                      string      rac-scan:1521

     

     

    添加监听器,在其中一个节点上执行即可,我这里是在节点1上执行:

    [grid@rac01 ~]$ srvctl add listener

    [grid@rac01 ~]$ srvctl start listener

     

    或是指定其他的端口

    [grid@rac01 ~]$ srvctl add listener -p 1522

    [grid@rac01 ~]$ srvctl start listener

     

     

    节点1和节点2分别查看监听器的状态

    节点1:

    [grid@rac01 ~]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-DEC-2020 03:29:20

    Copyright (c) 1991, 2013, Oracle.  All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))

    STATUS of the LISTENER

    ------------------------

    Alias                     LISTENER

    Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

    Start Date                14-DEC-2020 03:28:02

    Uptime                    0 days 0 hr. 1 min. 20 sec

    Trace Level               off

    Security                  ON: Local OS Authentication

    SNMP                      OFF

    Listener Parameter File   /u01/grid/grid_home/11.2.0.4/network/admin/listener.ora

    Listener Log File         /u01/grid/grid_home/11.2.0.4/log/diag/tnslsnr/rac01/listener/alert/log.xml

    Listening Endpoints Summary...

      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.58.111)(PORT=1521)))

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.58.121)(PORT=1521)))

    Services Summary...

    Service "+ASM" has 1 instance(s).

      Instance "+ASM1", status READY, has 1 handler(s) for this service...

    Service "slnngk" has 1 instance(s).

      Instance "slnngk1", status READY, has 1 handler(s) for this service...

    Service "slnngkXDB" has 1 instance(s).

      Instance "slnngk1", status READY, has 1 handler(s) for this service...

    The command completed successfully

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    节点2:

    [grid@rac02 ~]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-DEC-2020 03:29:31

    Copyright (c) 1991, 2013, Oracle.  All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))

    STATUS of the LISTENER

    ------------------------

    Alias                     LISTENER

    Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

    Start Date                14-DEC-2020 03:28:01

    Uptime                    0 days 0 hr. 1 min. 31 sec

    Trace Level               off

    Security                  ON: Local OS Authentication

    SNMP                      OFF

    Listener Parameter File   /u01/grid/grid_home/11.2.0.4/network/admin/listener.ora

    Listener Log File         /u01/grid/grid_home/11.2.0.4/log/diag/tnslsnr/rac02/listener/alert/log.xml

    Listening Endpoints Summary...

      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.58.112)(PORT=1521)))

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.58.122)(PORT=1521)))

    Services Summary...

    Service "+ASM" has 1 instance(s).

      Instance "+ASM2", status READY, has 1 handler(s) for this service...

    Service "slnngk" has 1 instance(s).

      Instance "slnngk2", status READY, has 1 handler(s) for this service...

    Service "slnngkXDB" has 1 instance(s).

      Instance "slnngk2", status READY, has 1 handler(s) for this service...

    The command completed successfully

    [grid@rac02 ~]$

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    1.1.4     注册服务

     

    注册服务

    oracle下其中一个节点上操作,我这里在节点1上操作

    [oracle@node1 ~]$ srvctl add service -d slnngk -s service_s1 -r "slnngk1" -a "slnngk2" -P BASIC -y AUTOMATIC -e SELECT -z 180 -w 5

    [oracle@node1 ~]$ srvctl add service -d slnngk -s service_s2 -r "slnngk2" -a "slnngk1" -P BASIC -y AUTOMATIC -e SELECT -z 180 -w 5

     

    oracle@host01 ~]$ srvctl config service -d slnngk

     

    启动服务

    grid账号下操作,在其中一个节点上操作,我这里是在节点1上操作

    [grid@rac01 ~]$ srvctl start service -d slnngk -s service_s1

    [grid@rac01 ~]$ srvctl start service -d slnngk -s service_s2

     

     

     

     

     

     

     

    1.1.5     最后查看资源情况

    [grid@rac02 admin]$ crsctl stat resource -t

    --------------------------------------------------------------------------------

    NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

    --------------------------------------------------------------------------------

    Local Resources

    --------------------------------------------------------------------------------

    ora.DATA.dg

                   ONLINE  ONLINE       rac01                                       

                   ONLINE  ONLINE       rac02                                       

    ora.LISTENER.lsnr

                   ONLINE  ONLINE       rac01                                       

                   ONLINE  ONLINE       rac02                                       

    ora.OCR.dg

                   ONLINE  ONLINE       rac01                                       

                   ONLINE  ONLINE       rac02                                       

    ora.REDO.dg

                   ONLINE  ONLINE       rac01                                       

                   ONLINE  ONLINE       rac02                                        

    ora.asm

                   ONLINE  ONLINE       rac01                    Started            

                   ONLINE  ONLINE       rac02                    Started            

    ora.gsd

                   OFFLINE OFFLINE      rac01                                        

                   OFFLINE OFFLINE      rac02                                       

    ora.net1.network

                   ONLINE  ONLINE       rac01                                       

                   ONLINE  ONLINE       rac02                                        

    ora.ons

                   ONLINE  ONLINE       rac01                                       

                   ONLINE  ONLINE       rac02                                       

    --------------------------------------------------------------------------------

    Cluster Resources

    --------------------------------------------------------------------------------

    ora.LISTENER_SCAN1.lsnr

          1        ONLINE  ONLINE       rac01                                       

    ora.cvu

          1        ONLINE  ONLINE       rac01                                       

    ora.oc4j

          1        ONLINE  ONLINE       rac01                                       

    ora.rac01.vip

          1        ONLINE  ONLINE       rac01                                        

    ora.rac02.vip

          1        ONLINE  ONLINE       rac02                                       

    ora.scan1.vip

          1        ONLINE  ONLINE       rac01                                       

    ora.slnngk.db

          1        ONLINE  ONLINE       rac01                    Open               

          2        ONLINE  ONLINE       rac02                    Open               

    ora.slnngk.service_s1.svc

          1        ONLINE  ONLINE       rac01                                       

    ora.slnngk.service_s2.svc

          1        ONLINE  ONLINE       rac02 

     

     

     

     

     

     

  • 相关阅读:
    webpack 性能优化
    Bert模型实现垃圾邮件分类
    基于SKLearn的SVM模型垃圾邮件分类——代码实现及优化
    sklearn中,数据集划分函数 StratifiedShuffleSplit.split() 使用踩坑
    mysql5.7安装教程【转载】
    Postman 使用小技巧/指南
    如何知道 window 的 load 事件已经触发
    前端常用库 CDN
    使用 rollup 打包可按需加载的 NPM 包
    webpack 4 快速搭建
  • 原文地址:https://www.cnblogs.com/hxlasky/p/14134071.html
Copyright © 2011-2022 走看看