• 启动/关闭数据库、实例及服务


    【关闭集群顺序】
    1.使用crs_stat 命令查询RAC节点的服务状态是否正常
    [grid@ora01sh ~]$ crs_stat -t -v
    2.使用srvctl (service control)命令依次关闭集群服务
    关闭顺序:关闭数据库(实例)-->关闭ASM实例-->关闭节点服务
    1)关闭数据库
    [grid@ora01sh ~]$ srvctl status database -d rac
    --关闭数据库
    srvctl stop database -d rac1
    srvctl stop database -d rac2
    --关闭各节点ASM实例
    [grid@ora01sh ~]$ srvctl status asm -n ora01sh
    ASM is running on ora01sh
    [grid@ora01sh ~]$ srvctl status asm -n ora02sh
    ASM is running on ora02sh

    srvctl stop asm -n ora01sh
    srvctl stop asm -n ora02sh

    [grid@ora01sh ~]$ crs_stat -t -v

    关闭各节点服务:listener、gsd、ons、vip
    [grid@ora01sh ~]$ srvctl status nodeapps -n ora01sh
    VIP ora01sh-vip is enabled
    VIP ora01sh-vip is running on node: ora01sh
    Network is enabled
    Network is running on node: ora01sh
    GSD is disabled
    GSD is not running on node: ora01sh
    ONS is enabled
    ONS daemon is running on node: ora01sh

    [grid@ora01sh ~]$ srvctl status nodeapps -n ora02sh
    VIP ora02sh-vip is enabled
    VIP ora02sh-vip is running on node: ora02sh
    Network is enabled
    Network is running on node: ora02sh
    GSD is disabled
    GSD is not running on node: ora02sh
    ONS is enabled
    ONS daemon is running on node: ora02sh

    srvctl stop nodeapps -n ora01sh
    srvctl stop nodeapps -n ora02sh

    【启动集群顺序】
    启动顺序:启动节点服务-->启动ASM实例-->启动数据库实例
    1)启动各节点的服务
    srvctl start nodeapps -n ora01sh
    srvctl start nodeapps -n ora02sh
    2)启动ASM实例
    srvctl start asm -n ora01sh
    srvctl start asm -n ora02sh
    3)启动数据库及实例
    [grid@ora01sh ~]$ srvctl status instance -d rac -i rac1,rac2
    Instance rac1 is running on node ora01sh
    Instance rac2 is running on node ora02sh

    [grid@ora01sh ~]$ srvctl status database -d rac
    Instance rac1 is running on node ora01sh
    Instance rac2 is running on node ora02sh

    [grid@ora01sh ~]$ crs_stat -t -v

    ************************************************************************************************************/

    【关闭数据库、实例及服务】
    --关闭数据库
    srvctl stop database -d rac1
    srvctl stop database -d rac2

    --关闭各节点ASM实例
    srvctl stop asm -n ora01sh
    srvctl stop asm -n ora02sh

    --关闭各节点的服务包括:listener、gsd、ons、vip
    srvctl stop nodeapps -n ora01sh
    srvctl stop nodeapps -n ora02sh

    【启动数据库、实例及服务】
    --启动各节点的服务
    srvctl start nodeapps -n ora01sh
    srvctl start nodeapps -n ora02sh
    --启动ASM实例
    srvctl start asm -n ora01sh
    srvctl start asm -n ora02sh
    --启动数据库及实例
    srvctl start instance -d rac -i rac1,rac2

    srvctl start database -d rac1
    srvctl start database -d rac2

  • 相关阅读:
    Eureka系列---【Eureka配置详解】
    bat脚本系列---【自动以管理员身份运行bat脚本】
    bat脚本系列---【批量修改文件名】
    我爱java系列---【微信定时自动发送消息功能】
    我爱java系列---【idea中如何使用git】
    我爱java系列---【Java将字符串的首字母转换大小写】
    我爱java系列---【java对象比较器,用于记录修改操作时修改的具体详情】
    我爱java系列---【项目研发流程——一张图搞定】
    Majority Number III
    G面经prepare: Straight Partition of A Deck of Cards
  • 原文地址:https://www.cnblogs.com/ritchy/p/11883112.html
Copyright © 2020-2023  润新知