rac操作
rac操作:
怎样获得集群的名字
[grid@lxtrac05 ~]$ cemutlo -n
tstrac2
[grid@lxtrac05 ~]$
[grid@lxtrac03 ~]$ crsctl get cluster name <<<获取集群的名字 12.2之后才有的
CRS-6724: Current cluster name is 'ora12c-cluster'
[grid@lxtrac03 ~]$
查看是否运行了flex asm。flex的asm默认会建立3个ASM实例,而不管集群中节点的数量
[grid@lxtrac03 ~]$ crsctl get cluster mode status
Cluster is running in "flex" mode
[grid@lxtrac03 ~]$
一个ASM实例可以为本地和远端数据库提供服务。如果一个ASM实例crash,数据库实例会fail over到另一个ASM实例,而不会crash。
验证两个节点间的时间是否等效:
[grid ]$ cluvfy comp clocksync -n all -verbose
停止某个资源:
[grid@lxtrac05 ~]$ crsctl stop res ora.cvu
CRS-2673: Attempting to stop 'ora.cvu' on 'lxtrac06'
CRS-2677: Stop of 'ora.cvu' on 'lxtrac06' succeeded
[grid@lxtrac05 ~]$
停止init显示的某个资源:
[grid@lxtrac05 ~]$ crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'lxtrac05'
CRS-2677: Stop of 'ora.crf' on 'lxtrac05' succeeded
[grid@lxtrac05 ~]$
查看某个资源的依赖性。例如crsd强依赖的资源ora.asm,ora.cssd,ora.ctssd,ora.gipcd
[grid@lxtrac05 ~]$ crsctl stat res ora.crsd -init -p|grep START_DEPENDENCIES
START_DEPENDENCIES=hard(ora.asm,ora.cssd,ora.ctssd,ora.gipcd)pullup(ora.asm,ora.cssd,ora.ctssd,ora.gipcd)
[grid@lxtrac05 ~]$
修改某个资源的属性
[root@lxtrac05 bin]# ./crsctl modify res ora.crf -attr ENABLED=0 -init
[root@lxtrac05 bin]# ./crsctl modify res ora.lxtrac06.vip -attr USR_ORA_VIP=lxtrac16-vip 修改vip属性
[oracle@lxtrac04 ~]$ srvctl config database -db orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/12.2.0.1/dbhome_1
Oracle user: oracle
Spfile: /u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/spfileorcl.ora <<<<<<<<<
Password file: /u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/orapworcl <<<<<<<<<
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: orcl1
Configured nodes: lxtrac04
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@lxtrac04 ~]$
[oracle@lxtrac04 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +OCR/orapwASM
Backup of Password file:
ASM listener: LISTENER
ASM instance count: 3
Cluster ASM listener: ASMNET1LSNR_ASM
[oracle@lxtrac04 ~]$