High Availability Services - Tests and Checks
Oracle Database 19c RAC on Oracle Linux 7 https://www.youtube.com/watch?v=_FNKBrOBbHI
[root@ol7-19-rac1 scripts]# /u01/app/19.0.0/grid/bin/crsctl stat res -t # How to identify which version of Clusterware is running : [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# /u01/app/19.0.0/grid/bin/crsctl query crs activeversion Oracle Clusterware active version on the cluster is [19.0.0.0.0] [root@ol7-19-rac1 ~]# # check SCAN - Single Client Access Name : /u01/app/19.0.0/grid/bin/cluvfy comp scan [oracle@ol7-19-rac1 ~]$ /u01/app/19.0.0/grid/bin/cluvfy comp scan # Verification of node reachability /u01/app/19.0.0/grid/bin/cluvfy comp nodereach -n ol7-19-rac1 /u01/app/19.0.0/grid/bin/cluvfy comp nodereach -n ol7-19-rac2 [oracle@ol7-19-rac1 ~]$ /u01/app/19.0.0/grid/bin/cluvfy comp nodereach -n ol7-19-rac2 [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/cluvfy comp nodereach -n ol7-19-rac1 # Verification of node connectivity /u01/app/19.0.0/grid/bin/cluvfy comp nodecon -n ol7-19-rac1 -verbose /u01/app/19.0.0/grid/bin/cluvfy comp nodecon -n ol7-19-rac2 -verbose [oracle@ol7-19-rac1 ~]$ /u01/app/19.0.0/grid/bin/cluvfy comp nodecon -n ol7-19-rac2 -verbose [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/cluvfy comp nodecon -n ol7-19-rac1 -verbose # check OCR Integrity /u01/app/19.0.0/grid/bin/cluvfy comp ocr -n all -verbose [oracle@ol7-19-rac1 ~]$ /u01/app/19.0.0/grid/bin/cluvfy comp ocr -n all -verbose # check backups for Oracle Cluster Registry : /u01/app/19.0.0/grid/bin/ocrconfig -showbackup [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/ocrconfig -showbackup /u01/app/19.0.0/grid/bin/ocrconfig -showbackuploc /u01/app/19.0.0/grid/bin/asmcmd lsdg asmcmd lsdsk -k # create backup for Oracle Cluster Registry : /u01/app/19.0.0/grid/bin/ocrconfig -manualbackup [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/ocrconfig -manualbackup # Config & Status of Oracle Cluster Registry /u01/app/19.0.0/grid/bin/ocrcheck [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/ocrcheck [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/ocrcheck -config # # How do I identify the voting disk location /u01/app/19.0.0/grid/bin/ocrcheck -config # # Oracle Local Registry configuration : /u01/app/19.0.0/grid/bin/ocrcheck -local -config [oracle@ol7-19-rac1 ~]$ /u01/app/19.0.0/grid/bin/ocrcheck -local -config # nodeapps : /u01/app/19.0.0/grid/bin/srvctl status nodeapps /u01/app/19.0.0/grid/bin/srvctl status nodeapps -n ol7-19-rac1 ( /u01/app/19.0.0/grid/bin/srvctl config nodeapps -a -s ) [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/srvctl status nodeapps [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/srvctl config nodeapps -a -s [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/srvctl status nodeapps -n ol7-19-rac1 [oracle@ol8-21-rac1 ~]$ srvctl config nodeapps -s # check Oracle Cluster Health Analysis Service : /u01/app/19.0.0/grid/bin/srvctl status cha [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/srvctl status cha [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl stop cluster -all [root@ol7-19-rac1 ~]# /u01/app/19.0.0/grid/bin/crsctl stop has [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl stop has ps -elf | egrep "PID|d.bin|ohas|oraagent|orarootagent|cssdagent|cssdmonitor" | grep -v grep ---------------------------------------------------------------------------------------------- Mallik034 - Nov 5, 2020 Basic Cluster Health Checks - Oracle 12c : Clusterware Administration https://www.youtube.com/watch?v=nlnxiBLmLI4 Oracle Clusterware Administration Basics - crsctl & srvctl - Basic Cluster Health Checks ---------------------------------------------------------------------------------------------- /u01/app/19.0.0/grid/bin/srvctl status cha [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl check crs [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl check css [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl check evm [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl check cluster -all [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status ons [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status asm [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status scan [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl config scan [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status scan_listener [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status database -d cdbrac [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl config database [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl config database -d cdbrac [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status nodeapps [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl config nodeapps -a crsctl query css votedisk Lists the voting files ( location ) used by Cluster Synchronization Services [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl query css votedisk [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl query crs activeversion [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status diskgroup -diskgroup CRS [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status diskgroup -diskgroup DATA [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status diskgroup -diskgroup RECO [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/srvctl status diskgroup -diskgroup CRS -node ol7-19-rac1 /u01/app/19.0.0/grid/bin/olsnodes -------------------------------------------------------------------------------------- https://heliosguneserol.com/2020/11/04/how-to-manage-crs-and-rac-services/ https://heliosguneserol.com/2020/11/04/how-to-manage-crs-and-rac-services/ -------------------------------------------------------------------------------------- << Use the “crsctl enable/disable has” command to disable automatic startup of the Oracle High Availability Services stack when the server boots up. >> # To see current settings for Oracle High Availability Services stack when the server boots up: /u01/app/19.0.0/grid/bin/crsctl config has [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# /u01/app/19.0.0/grid/bin/crsctl config has CRS-4621: Oracle High Availability Services autostart is disabled. [root@ol7-19-rac1 ~]# -------------------------------------------------------------------------------------- https://heliosguneserol.com/2020/11/04/how-to-manage-crs-and-rac-services/ -------------------------------------------------------------------------------------- https://niteshdba.wordpress.com/rac/ Usage: srvctl start diskgroup -g <dg_name> [-n “<node_list>”] Usage: srvctl stop diskgroup -g <dg_name> [-n “<node_list>”] [-f] Usage: srvctl status diskgroup -g <dg_name> [-n “<node_list>”] [-a] Usage: srvctl enable diskgroup -g <dg_name> [-n “<node_list>”] Usage: srvctl disable diskgroup -g <dg_name> [-n “<node_list>”] Usage: srvctl remove diskgroup -g <dg_name> [-f] https://niteshdba.wordpress.com/rac/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Oracle RAC Service Concept and Live Demo ------------------------------------------- https://www.youtube.com/watch?v=WvX0G3O5dFU /u01/app/21.0.0/grid/bin/srvctl add service -d ocdbrac -s ocdbracsvc -preferred ocdbrac1 -available ocdbrac2 /u01/app/21.0.0/grid/bin/srvctl relocate service -d ocdbrac -s ocdbracsvc -oldinst ocdbrac1 -newinst ocdbrac2 /u01/app/21.0.0/grid/bin/srvctl status service -d ocdbrac /u01/app/21.0.0/grid/bin/srvctl start service -d ocdbrac [oracle@ol8-21-rac2 ~]$ /u01/app/21.0.0/grid/bin/srvctl add service -d ocdbrac -s ocdbracsvc2 -preferred ocdbrac1,ocdbrac2 [oracle@ol8-21-rac2 ~]$ /u01/app/21.0.0/grid/bin/srvctl remove service -d ocdbrac -s ocdbracsvc2 ============================================================================ High Availability TeST : ------------------------------------ ------------------------------------ /u01/app/19.0.0/grid/bin/srvctl add service -d cdbrac -s cdbracsvc -preferred cdbrac1 -available cdbrac2 srvctl add service -d cdbrac -s cdbracsvc -preferred cdbrac1 -available cdbrac2 srvctl relocate service -d cdbrac -s cdbracsvc -oldinst cdbrac1 -newinst cdbrac2 srvctl relocate service -d cdbrac -s cdbracsvc -oldinst cdbrac2 -newinst cdbrac1 srvctl status service -d cdbrac srvctl start service -d cdbrac srvctl stop service -d cdbrac srvctl remove service -d cdbrac -s cdbracsvc #1 creating cdbracsvc database Service with both instances as preferred : [oracle@ol7-19-rac2 admin]$ srvctl add service -d cdbrac -s cdbracsvc -preferred cdbrac1,cdbrac2 # srvctl add service -d cdbrac -s cdbracsvc -preferred cdbrac1,cdbrac2 # srvctl config service -d cdbrac #2 : connecting into cdbracsvc database Service : [oracle@ol7-19-rac2 admin]$ sqlplus sys/SysPassword1@cdbracsvc as sysdba #3 " checking in which instance the service is connected : SQL> select host_name,instance_name from v$instance; HOST_NAME ---------------------------------------------------------------- INSTANCE_NAME ---------------- ol7-19-rac1.localdomain cdbrac1 #4 : stopping the instance in which last connection was made ( cdbrac1 / ol7-19-rac1 ) : srvctl stop instance -d cdbrac -i cdbrac1 -f #5 : disconnect , reconnect and check again : [oracle@ol7-19-rac2 admin]$ sqlplus sys/SysPassword1@cdbracsvc as sysdba SQL> select host_name,instance_name from v$instance; HOST_NAME ---------------------------------------------------------------- INSTANCE_NAME ---------------- ol7-19-rac2.localdomain cdbrac2 SQL> ============================================================================ srvctl stop instance -d cdbrac -i cdbrac1 srvctl status instance -d cdbrac -i cdbrac1 srvctl status database -d cdbrac [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac2 ~]$ lsnrctl status | grep r.ora Listener Parameter File /u01/app/19.0.0/grid/network/admin/listener.ora [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac2 ~]$ lsnrctl services [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac2 ~]$ cd $ORACLE_HOME/network/admin/ [oracle@ol7-19-rac2 admin]$ [oracle@ol7-19-rac2 admin]$ ll *tns* -rw-r-----. 1 oracle oinstall 334 Dec 26 16:45 ini.tnsnames.ora.bak -rw-r-----. 1 oracle oinstall 527 Dec 26 16:47 tnsnames.ora [oracle@ol7-19-rac2 admin]$ [oracle@ol7-19-rac2 admin]$ diff tnsnames.ora ini.tnsnames.ora.bak 13,21d12 < CDBRACSVC = < (DESCRIPTION = < (ADDRESS = (PROTOCOL = TCP)(HOST = ol7-19-scan)(PORT = 1521)) < (CONNECT_DATA = < (SERVER = DEDICATED) < (SERVICE_NAME = cdbracsvc) < ) < ) < [oracle@ol7-19-rac2 admin]$ [oracle@ol7-19-rac2 admin]$ cat $ORACLE_HOME/network/admin/ini.tnsnames.ora.bak # tnsnames.ora Network Configuration File: /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. CDBRAC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ol7-19-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdbrac) ) ) [oracle@ol7-19-rac2 admin]$ [oracle@ol7-19-rac2 admin]$ [oracle@ol7-19-rac2 admin]$ tnsping cdbracsvc TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 26-DEC-2022 16:49:21 Copyright (c) 1997, 2019, Oracle. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ol7-19-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdbracsvc))) OK (0 msec) [oracle@ol7-19-rac2 admin]$ SQL > select host_name,instance_name from v$instance; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2022-12.24 :=> /u01/app/21.0.0/grid/bin/olsnodes -n /u01/app/21.0.0/grid/bin/olsnodes /u01/app/21.0.0/grid/bin/crsctl check has Shutdown and Start sequence of Oracle RAC https://valehagayev.wordpress.com/tag/srvctl/ To print private interconnect address for the local node : [oracle@ol8-21-rac1 ~]$ [oracle@ol8-21-rac1 ~]$ /u01/app/21.0.0/grid/bin/olsnodes -l -p ol8-21-rac1 192.168.1.101 [oracle@ol8-21-rac1 ~]$ [oracle@ol8-21-rac1 ~]$ srvctl status listener # To display the status services running in the database : [oracle@ol8-21-rac1 ~]$ srvctl status service -d ocdbrac Service ocdbracsvc is not running. [oracle@ol8-21-rac1 ~]$ # https://valehagayev.wordpress.com/tag/srvctl/ # To stop or start SCAN listener and the SCAN VIP resources : # https://valehagayev.wordpress.com/tag/srvctl/ [oracle@test4 ~]$ srvctl stop scan_listener [oracle@test4 ~]$ srvctl start scan_listener [oracle@test4 ~]$ srvctl stop scan [oracle@test4 ~]$ srvctl start scan ++++++++++++++++++++++++ Oracle SQLPlus The Definitive Guide 2nd Edition https://resources.oreilly.com/examples/9780596007461/-/blob/master/SQLPlusData.tar.gz https://resources.oreilly.com/examples/9780596007461/ Creating and Loading the Sample Tables https://flylib.com/books/en/2.525.1/creating_and_loading_the_sample_tables.html#fastmenu_1 https://resources.oreilly.com/examples/9780596007461/-/blob/master/SQLPlusData.tar.gz ++++++++++++++++++++++++ [oracle@ol7-19-rac2 ~]$ sqlplus / as sysdba SQL> show con_name SQL> show pdbs SQL> ALTER SESSION SET CONTAINER=PDB1; SQL> ALTER PLUGGABLE DATABASE OPEN READ WRITE; CREATE TABLE PROFILE( ID INTEGER, NAME VARCHAR2(100), GENDER CHAR(10), COUNTRY VARCHAR2(100) DEFAULT 'USA' ); insert into profile values ( 101,'John' , 'M', 'USA') ; insert into profile values ( 102,'Mary' , 'F', 'USA'); describe PROFILE insert into profile values ( 103,'Marc' , 'M', 'USA'); insert into profile values ( 104,'Anna' , 'M', 'USA') ; SQL> select * from profile; commit; <<== || 2022-12.24 https://ocptechnology.com/drop-database-manually/ $export ORACLE_SID=orcl $sqlplus / as sysdba SQL> shu immediate SQL> startup mount exclusive restrict; SQL> drop database; - - - SQL> select name from v$database; <<--- check database name SQL> select name from v$datafile; SQL> select name from v$controlfile; SQL> select member from v$logfile; - - - env | grep ORA [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac2 ~]$ env | grep ORA ORACLE_UNQNAME=cdbrac ORACLE_SID=cdbrac2 ORACLE_BASE=/u01/app/oracle ORACLE_HOSTNAME=ol7-19-rac2.localdomain ORA_INVENTORY=/u01/app/oraInventory ORACLE_TERM=xterm ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1 [oracle@ol7-19-rac2 ~]$ - - - https://www.thegeekdiary.com/oracleasm-command-examples/ https://dbaclass.com/article/oracleasm-utility-asmlib/ [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# yum install oracleasm-support Loaded plugins: ulninfo Package oracleasm-support-2.1.11-2.el7.x86_64 already installed and latest version Nothing to do [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# oracleasm status Checking if ASM is loaded: no Checking if /dev/oracleasm is mounted: no [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# /sbin/blkid /dev/sda1: UUID="8da902df-d8f3-4a1c-be3b-1d4eee1516c3" TYPE="xfs" /dev/sda2: UUID="6a55898a-b4f5-4f2a-ab83-1cf6b9fff18b" TYPE="swap" /dev/sda3: UUID="311e2f43-9882-4b6f-bbd4-b7ca186771c8" TYPE="xfs" /dev/sdc1: TYPE="oracleasm" /dev/sdb1: UUID="fcfed228-4244-42bd-8812-7612b571eba4" TYPE="xfs" /dev/sdf1: TYPE="oracleasm" /dev/sdd1: TYPE="oracleasm" /dev/sdg1: TYPE="oracleasm" /dev/sde1: TYPE="oracleasm" [root@ol7-19-rac1 ~]# [oracle@ol7-19-rac1 ~]$ [oracle@ol7-19-rac1 ~]$ asmcmd lsdsk -k Total_MB Free_MB OS_MB Name Failgroup Site_Name Site_GUID Site_Status Failgroup_Type Library Label Failgroup_Label Site_Label UDID Product Redund Path 2047 1788 2047 CRS_0000 CRSFG1 00000000000000000000000000000000 REGULAR System UNKNOWN /dev/oracleasm/asm-crs-disk1 2047 1789 2047 CRS_0001 CRSFG2 00000000000000000000000000000000 REGULAR System UNKNOWN /dev/oracleasm/asm-crs-disk2 2047 1791 2047 CRS_0002 CRSFG3 00000000000000000000000000000000 REGULAR System UNKNOWN /dev/oracleasm/asm-crs-disk3 40959 37093 40959 DATA_0000 DATA_0000 00000000000000000000000000000000 REGULAR System UNKNOWN /dev/oracleasm/asm-data-disk1 20479 20146 20479 RECO_0000 RECO_0000 00000000000000000000000000000000 REGULAR System UNKNOWN /dev/oracleasm/asm-reco-disk1 [oracle@ol7-19-rac1 ~]$ [oracle@ol7-19-rac1 ~]$ [oracle@ol7-19-rac1 ~]$ asmcmd lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED NORMAL N 512 512 4096 1048576 6141 5368 2047 1660 0 Y CRS/ MOUNTED EXTERN N 512 512 4096 1048576 40959 37093 0 37093 0 N DATA/ MOUNTED EXTERN N 512 512 4096 1048576 20479 20146 0 20146 0 N RECO/ [oracle@ol7-19-rac1 ~]$ - - - https://db.geeksinsight.com/dbahelper/oracle-rac-interview-questions-10g/ How do you backup the OCR There is an automatic backup mechanism for OCR. The default location is : $ORA_CRS_HOMEcdata"clustername" To display backups : #ocrconfig -showbackup To restore a backup : #ocrconfig –restore With Oracle RAC 10g Release 2 or later, you can also use the export command: #ocrconfig -export -s online, and use -import option to restore the contents back. With Oracle RAC 11g Release 1, you can do a manaual backup of the OCR with the command: # ocrconfig –manualbackup https://db.geeksinsight.com/dbahelper/oracle-rac-interview-questions-10g/ What is the purpose of Private Interconnect ? Clusterware uses the private interconnect for cluster synchronization (network heartbeat) and daemon communication between the the clustered nodes. This communication is based on the TCP protocol. RAC uses the interconnect for cache fusion (UDP) and inter-process communication (TCP). Cache Fusion is the remote memory mapping of Oracle buffers, shared between the caches of participating nodes in the cluster. What are Oracle Clusterware Components Voting Disk - Oracle RAC uses the voting disk to manage cluster membership by way of a health check and arbitrates cluster ownership among the instances in case of network failures. The voting disk must reside on shared disk. Oracle Cluster Registry (OCR) — Maintains cluster configuration information as well as configuration information about any cluster database within the cluster. The OCR must reside on shared disk that is accessible by all of the nodes in your cluster Oracle Cluster Interconnect — In other words also called as private interconnect, with high speed gigabit channel , low latency network connection attached to private switches rather the public interfaces. This will be used by cluster to provide node membership and also inter cluster communication (aka global cache services , transfer of blocks from one node to another) ========================================================================== # Get Private interconnect IP address ------------------------------------------------------ [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/oifcfg getif eth1 192.168.56.0 global public eth2 192.168.1.0 global cluster_interconnect,asm [oracle@ol7-19-rac2 ~]$ ------------------------------------------------------ https://dbaclass.com/article/oracle-rac-interview-questions/ 31. What is the purpose of Voting disk? Voting disk stores information about the nodes in the cluster and their heartbeat information. Also stores information about cluster membership. 32. Why we need voting disk? Oracle Clusterware uses the VD to determine which nodes are members of a cluster. Oracle Cluster Synchronization Service daemon (OCSSD) on each cluster node updates the VD with the current status of the node every second. The VD is used to determine which RAC nodes are still in the cluster should the interconnect heartbeat between the RAC nodes fail. https://orahow.com/oracle-rac-clusterware-startup-sequence/ Voting Disk The voting disk manage node membership information. It is a shared disks that will be accessed by all the member of the nodes in the cluster. It is used as central reference for all the nodes and keeps the heartbeat information between the nodes. If any of the node is unable to ping the voting disk, cluster immediately recognize the communication failure and evicts the node from the cluster. [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# /u01/app/19.0.0/grid/bin/asmcmd lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED NORMAL N 512 512 4096 1048576 6141 5368 2047 1660 0 Y CRS/ MOUNTED EXTERN N 512 512 4096 1048576 40959 37103 0 37103 0 N DATA/ MOUNTED EXTERN N 512 512 4096 1048576 20479 20146 0 20146 0 N RECO/ [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# /u01/app/19.0.0/grid/bin/asmcmd ASMCMD> pwd + ASMCMD> ls CRS/ DATA/ RECO/ ASMCMD> cd DATA ASMCMD> ASMCMD> pwd +DATA ASMCMD> ASMCMD> ls CDBRAC/ ASMCMD> ASMCMD> cd CDBRAC/ ASMCMD> ASMCMD> ls 86B637B62FE07A65E053F706E80A27CA/ CONTROLFILE/ DATAFILE/ F0805BD1B3E77F03E0536538A8C07CB3/ F08097DB1052325AE0536538A8C0F39A/ ONLINELOG/ PARAMETERFILE/ PASSWORD/ TEMPFILE/ ASMCMD> ASMCMD> cd DATAFILE/ ASMCMD> ASMCMD> pwd +DATA/CDBRAC/DATAFILE ASMCMD> ASMCMD> ls SYSAUX.258.1124200845 SYSTEM.257.1124200809 UNDOTBS1.259.1124200859 UNDOTBS2.269.1124201819 USERS.260.1124200861 ASMCMD> ASMCMD> exit [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# ps -ef | grep d.bin root 13010 6103 0 14:18 pts/0 00:00:00 grep --color=auto d.bin root 19896 1 1 12:05 ? 00:01:43 /u01/app/19.0.0/grid/bin/ohasd.bin reboot root 20000 1 0 12:05 ? 00:00:41 /u01/app/19.0.0/grid/bin/orarootagent.bin oracle 20079 1 0 12:05 ? 00:01:16 /u01/app/19.0.0/grid/bin/oraagent.bin oracle 20102 1 0 12:05 ? 00:00:16 /u01/app/19.0.0/grid/bin/mdnsd.bin oracle 20104 1 0 12:05 ? 00:00:47 /u01/app/19.0.0/grid/bin/evmd.bin oracle 20134 1 0 12:06 ? 00:00:19 /u01/app/19.0.0/grid/bin/gpnpd.bin oracle 20187 20104 0 12:06 ? 00:00:17 /u01/app/19.0.0/grid/bin/evmlogger.bin -o /u01/app/19.0.0/grid/log/[HOSTNAME]/evmd/evmlogger.info -l /u01/app/19.0.0/grid/log/[HOSTNAME]/evmd/evmlogger.log oracle 20204 1 0 12:06 ? 00:00:52 /u01/app/19.0.0/grid/bin/gipcd.bin root 20238 1 0 12:06 ? 00:00:24 /u01/app/19.0.0/grid/bin/cssdmonitor root 20243 1 1 12:06 ? 00:02:38 /u01/app/19.0.0/grid/bin/osysmond.bin root 20271 1 0 12:06 ? 00:00:25 /u01/app/19.0.0/grid/bin/cssdagent oracle 20289 1 1 12:06 ? 00:02:02 /u01/app/19.0.0/grid/bin/ocssd.bin root 20716 1 0 12:06 ? 00:00:49 /u01/app/19.0.0/grid/bin/octssd.bin reboot root 20816 1 1 12:06 ? 00:02:08 /u01/app/19.0.0/grid/bin/ologgerd -M root 21101 1 1 12:07 ? 00:01:58 /u01/app/19.0.0/grid/bin/crsd.bin reboot oracle 21322 1 2 12:07 ? 00:02:39 /u01/app/19.0.0/grid/bin/oraagent.bin root 21335 1 3 12:07 ? 00:04:05 /u01/app/19.0.0/grid/bin/orarootagent.bin oracle 21504 1 0 12:07 ? 00:00:03 /u01/app/19.0.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit oracle 21506 1 0 12:07 ? 00:00:20 /u01/app/19.0.0/grid/bin/scriptagent.bin oracle 21720 1 0 12:07 ? 00:00:00 /u01/app/19.0.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit oracle 21779 1 0 12:07 ? 00:00:00 /u01/app/19.0.0/grid/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit oracle 21798 1 0 12:07 ? 00:00:00 /u01/app/19.0.0/grid/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit root 25403 20243 0 12:08 ? 00:00:13 /u01/app/19.0.0/grid/perl/bin/perl /u01/app/19.0.0/grid/bin/diagsnap.pl start [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# /u01/app/19.0.0/grid/bin/olsnodes ol7-19-rac1 ol7-19-rac2 [root@ol7-19-rac1 ~]# sqlplus / as sysdba <<EOF set echo on select INST_ID, CON_ID, name, OPEN_MODE from gv\$pdbs where con_id!=2 order by name, inst_id; exit EOF https://niteshdba.wordpress.com/rac/ [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac2 ~]$ /u01/app/19.0.0/grid/bin/srvctl config asm ASM home: <CRS home> Password file: +CRS/orapwASM Backup of Password file: +CRS/orapwASM_backup ASM listener: LISTENER ASM instance count: 3 Cluster ASM listener: ASMNET1LSNR_ASM [oracle@ol7-19-rac2 ~]$ [oracle@ol7-19-rac1 ~]$ [oracle@ol7-19-rac1 ~]$ /u01/app/19.0.0/grid/bin/srvctl config asm -a ASM home: <CRS home> Password file: +CRS/orapwASM Backup of Password file: +CRS/orapwASM_backup ASM listener: LISTENER ASM is enabled. ASM is individually enabled on nodes: ASM is individually disabled on nodes: ASM instance count: 3 Cluster ASM listener: ASMNET1LSNR_ASM [oracle@ol7-19-rac1 ~]$ <<== || 2022-12.26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ??? /u01/app/21.0.0/grid/bin/crsctl disable crs /u01/app/21.0.0/grid/bin/crsctl disable has ??? [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl start has CRS-4123: Oracle High Availability Services has been started. [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl start crs CRS-4640: Oracle High Availability Services is already active CRS-4000: Command Start failed, or completed with errors. [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# /u01/app/19.0.0/grid/bin/crsctl start cluster CRS-4691: Oracle Clusterware is already running CRS-4000: Command Start failed, or completed with errors. [root@ol7-19-rac2 ~]# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STOP , START & CHECK - clusterware : ( as root ) -------------------------------------- /u01/app/19.0.0/grid/bin/crsctl stop cluster -all ( in one node ) /u01/app/19.0.0/grid/bin/crsctl stop has ( in all nodes ) ------------------------------------------------------------------------------- /u01/app/19.0.0/grid/bin/crsctl start has ( in all nodes ) /u01/app/19.0.0/grid/bin/crsctl start cluster -all ( in one node ) ------------------------------------------------------------------------------- /u01/app/19.0.0/grid/bin/crsctl check cluster -all ------------------------------------------------------------------------------- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [root@ol7-19-rac1 scripts]# [root@ol7-19-rac1 scripts]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # Public 192.168.56.101 ol7-19-rac1.localdomain ol7-19-rac1 192.168.56.102 ol7-19-rac2.localdomain ol7-19-rac2 # Private 192.168.1.101 ol7-19-rac1-priv.localdomain ol7-19-rac1-priv 192.168.1.102 ol7-19-rac2-priv.localdomain ol7-19-rac2-priv # Virtual 192.168.56.103 ol7-19-rac1-vip.localdomain ol7-19-rac1-vip 192.168.56.104 ol7-19-rac2-vip.localdomain ol7-19-rac2-vip # SCAN 192.168.56.105 ol7-19-scan.localdomain ol7-19-scan 192.168.56.106 ol7-19-scan.localdomain ol7-19-scan 192.168.56.107 ol7-19-scan.localdomain ol7-19-scan [root@ol7-19-rac1 scripts]# [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # Public 192.168.56.101 ol7-19-rac1.localdomain ol7-19-rac1 192.168.56.102 ol7-19-rac2.localdomain ol7-19-rac2 # Private 192.168.1.101 ol7-19-rac1-priv.localdomain ol7-19-rac1-priv 192.168.1.102 ol7-19-rac2-priv.localdomain ol7-19-rac2-priv # Virtual 192.168.56.103 ol7-19-rac1-vip.localdomain ol7-19-rac1-vip 192.168.56.104 ol7-19-rac2-vip.localdomain ol7-19-rac2-vip # SCAN 192.168.56.105 ol7-19-scan.localdomain ol7-19-scan 192.168.56.106 ol7-19-scan.localdomain ol7-19-scan 192.168.56.107 ol7-19-scan.localdomain ol7-19-scan [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# cat /etc/resolv.conf search localdomain nameserver 192.168.56.100 nameserver 192.168.56.101 nameserver 8.8.8.8 [root@ol7-19-rac2 ~]# [root@ol7-19-rac2 ~]# ip a | grep glo inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute eth0 inet 192.168.56.102/24 brd 192.168.56.255 scope global noprefixroute eth1 inet 192.168.1.102/24 brd 192.168.1.255 scope global noprefixroute eth2 [root@ol7-19-rac2 ~]# [root@ol7-19-rac1 scripts]# cat /etc/resolv.conf search localdomain nameserver 192.168.56.100 nameserver 192.168.56.102 nameserver 8.8.8.8 [root@ol7-19-rac1 scripts]# [root@ol7-19-rac1 scripts]# ip a | grep glo inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute eth0 inet 192.168.56.101/24 brd 192.168.56.255 scope global noprefixroute eth1 inet 192.168.1.101/24 brd 192.168.1.255 scope global noprefixroute eth2 [root@ol7-19-rac1 scripts]# [root@ol7-19-rac2 ~]# ssh ol7-19-rac1 [root@ol7-19-rac1 ~]# [root@ol7-19-rac1 ~]# ssh ol7-19-rac2 Last login: Mon Dec 19 17:08:07 2022 [root@ol7-19-rac2 ~]# [root@ol7-19-rac1 ~]# su - oracle Last login: Mon Dec 19 17:20:51 UTC 2022 [oracle@ol7-19-rac1 ~]$ [oracle@ol7-19-rac1 ~]$ ssh ol7-19-rac2 Last login: Mon Dec 19 17:07:37 2022 [oracle@ol7-19-rac2 ~]$ ssh ol7-19-rac1 Last login: Mon Dec 19 17:33:39 2022 [oracle@ol7-19-rac1 ~]$
No comments:
Post a Comment