RAC Important Commands (SecureCRT)
Dear Readers,
In this article, we will see the Oracle : Important Commands for RAC (SecureCRT)
Menu Bar : RAC
Button : VD_Location
1 |
crsctl query css votedisk |
1 2 3 4 5 |
## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 970d29b0fdca4fb3bfa2210f71ebf828 (VIN:SSD_E0_S00_XXYZ41896P1) [DATA] 2. ONLINE 1422365a8a334f2fbfda2a8e9a348d78 (VIN:SSD_E0_S02_XXYZ41868P1) [DATA] 3. ONLINE 2752bc1b291a4f97bf904ff37b43c19b (VIN:SSD_E0_S04_XXYZ41948P1) [DATA] |
Button : ocrcheck
1 |
ocrcheck |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Status of Oracle Cluster Registry is as follows : Version : 4 Total space (kbytes) : 491684 Used space (kbytes) : 85328 Available space (kbytes) : 406356 ID : 496404425 Device/File Name : +DATA Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user |
Button : ConfigDB
1 |
srvctl config database -d ORCL |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Database unique name: ORCL Database name: ORCL Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1 Oracle user: oracle Spfile: +DATA/ORCL/PARAMETERFILE/spfile.266.1005927959 Password file: +DATA/ORCL/PASSWORD/pwdorcl.260.1005927685 Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: Disk Groups: DATA,REDO Mount point paths: Services: orcl_app_svc,orcl_int_svc Type: RAC Start concurrency: Stop concurrency: OSDBA group: dba OSOPER group: dbaoper Database instances: orcl11,orcl12 Configured nodes: server03,server04 Database is administrator managed |
Button : config service
1 |
srvctl config service -d ORCL |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
Service name: orcl_app_svc Server pool: Cardinality: 2 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Global: false Commit Outcome: false Failover type: Failover method: TAF failover retries: TAF failover delay: Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: NONE Edition: Pluggable database name: Maximum lag time: ANY SQL Translation Profile: Retention: 86400 seconds Replay Initiation Time: 300 seconds Session State Consistency: GSM Flags: 0 Service is enabled Preferred instances: orcl1,orcl2 Available instances: Service name: orcl_int_svc Server pool: Cardinality: 2 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Global: false Commit Outcome: false Failover type: Failover method: TAF failover retries: TAF failover delay: Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: NONE Edition: Pluggable database name: Maximum lag time: ANY SQL Translation Profile: Retention: 86400 seconds Replay Initiation Time: 300 seconds Session State Consistency: GSM Flags: 0 Service is enabled Preferred instances: orcl1,orcl2 Available instances: |
Button : status service
1 |
srvctl status service -d ORCL |
1 2 |
Service orcl_app_svc is running on instance(s) orcl1,orcl2 Service orcl_int_svc is running on instance(s) orcl1,orcl2 |
Button : Stop instance
1 |
# srvctl stop instance -d ORCL1 -i ORCL -o immediate (config output) |
Button : Relocate service
1 |
# srvctl relocate service -d rag11g -s serv_1 -i rag11g1 -t rag11g2 |
Button : Stop Service
1 |
##srvctl stop service -d <db Unique Name> -s serv_task -i ORCL_2 |
Button : Disable DB
1 |
####srvctl disable database -d rag11g |
Button : Status ASM
1 |
srvctl status asm |
1 |
ASM is running on server04,server03 |
Button : All DB’s status in FOR Loop
1 |
for i in `srvctl config`; do echo $i; srvctl status database -d $i; done; |
1 2 3 4 5 6 7 8 9 10 11 12 |
ORCL Instance orcl11 is running on node server03 Instance orcl12 is running on node server04 DEMO Instance demo11 is running on node server03 Instance demo12 is running on node server04 CREDIT Instance credit11 is not running on node server03 Instance credit12 is not running on node server04 DEBIT Instance debit11 is running on node server03 Instance debit12 is running on node server04 |
Button : All DB’s service in FOR Loop
1 |
for i in `srvctl config`; do echo $i; srvctl status service -d $i; done; |
1 2 3 4 5 6 7 8 9 10 11 |
ORCL Service orcl_1 is running on instance(s) orcl11 Service orcl_2 is running on instance(s) orcl11 Service orcl_3 is running on instance(s) orcl11 DEMO Service demo1 is running on instance(s) demo11,demo12 CREDIT Service credit_app_svc is not running. DEBIT Service debit_app_svc is running on instance(s) debit11,debit12 Service debit_int_svc is running on instance(s) debit11,debit12 |
Button : config scan
1 |
srvctl config scan |
1 2 3 4 5 6 7 8 9 10 11 |
SCAN name: Server-scan-tr2, Network: 1 Subnet IPv4: XX.XXX.000.0/255.255.255.0/jtbond1, static Subnet IPv6: SCAN 0 IPv4 VIP: XX.XXX.XXX.XXX SCAN VIP is enabled. SCAN VIP is individually enabled on nodes: SCAN VIP is individually disabled on nodes: SCAN 1 IPv4 VIP: XX.XXX.XXX.XXX SCAN VIP is enabled. SCAN VIP is individually enabled on nodes: SCAN VIP is individually disabled on nodes: |
Button : status scan
1 2 |
srvctl status scan srvctl status scan_listener |
1 2 3 4 5 6 7 8 9 |
SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node server03 SCAN VIP scan2 is enabled SCAN VIP scan2 is running on node server04 #######scan_listener output ############## SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node server03 SCAN Listener LISTENER_SCAN2 is enabled SCAN listener LISTENER_SCAN2 is running on node server04 |
Button : add service syntax
1 |
#srvctl add service -d rag11g -s serv_1 -r rag11g1 -a rag11g2 |
Button : Start service
1 |
#srvctl start service -s serv_1 -d rag11g |
Button : show_OCR_Bkup
1 |
ocrconfig -showbackup |
1 2 3 4 5 6 7 8 9 |
server04 2021/10/06 08:27:24 +DATA:/serverxy-c/OCRBACKUP/backup00.ocr.399.1085214437 1234568098 server04 2021/10/06 04:27:15 +DATA:/serverxy-c/OCRBACKUP/backup01.ocr.270.1085200029 1234568098 server04 2021/10/06 00:27:06 +DATA:/serverxy-c/OCRBACKUP/backup02.ocr.386.1085185619 1234568098 server04 2021/10/05 00:26:15 +DATA:/serverxy-c/OCRBACKUP/day.ocr.379.1085099177 1234568098 server04 2021/09/23 00:16:15 +DATA:/serverxy-c/OCRBACKUP/week.ocr.365.1083975377 1234568098 |
Button : Service Details
1 |
srvctl config service -d <DB Uniq Name> | egrep 'Service|Preferred' |
Button : Stop Service
1 |
##srvctl stop service -s app_ser -d ORCL_DBUni |
Button : Remove Service
1 |
#srvctl remove service -d ORCL_DBUni -s app_ser |
Button : Status Specific Service
1 |
#srvctl status service -s app_ser -d ORCL_DBUni |
Button : Start instance
1 |
###srvctl start instance -d ORCL -i ORCL1 |
Button : Modify Service
1 2 |
###srvctl modify service -s prod_svc -n -d ORCLDB -i ORCLDB1 ###srvctl start service -s prod_svc -d ORCLDB -i ORCLDB2 |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform