Oracle 10g RAC common maintenance commands

Source: Internet
Author: User

Common maintenance commands for Oracle 10g RAC: status of all instances and services [oracle @ vzwc1 ~] $ Srvctl status database-d zwc Instance zwc1 is running on node vzwc1 Instance zwc2 is running on node vzwc2 status of a single Instance [oracle @ vzwc1 ~] $ Srvctl status instance-d zwc-I zwc1 Instance zwc1 is running on node vzwc1 [oracle @ vzwc1 ~] $ Srvctl status instance-d zwc-I zwc2 Instance zwc2 is running on node vzwc2 status of node applications on a specific node [oracle @ vzwc1 ~] $ Srvctl status nodeapps-n vzwc1 VIP is running on node: vzwc1 GSD is running on node: vzwc1 Listener is running on node: vzwc1 ONS daemon is running on node: vzwc1 [oracle @ vzwc1 ~] $ [Oracle @ vzwc1 ~] $ Srvctl status nodeapps-n vzwc2 VIP is running on node: vzwc2 GSD is running on node: vzwc2 Listener is running on node: vzwc2 ONS daemon is running on node: status of the vzwc2 ASM instance [oracle @ vzwc1 ~] $ Srvctl status asm-n vzwc1 ASM instance + ASM1 is running on node vzwc1. [oracle @ vzwc1 ~] $ [Oracle @ vzwc1 ~] $ Srvctl status asm-n vzwc2 ASM instance + ASM2 is running on node vzwc2. display RAC Database Configuration [oracle @ vzwc1 ~] $ Srvctl config database-d zwc vzwc1 zwc1/u01/app/oracle/product/10.2.0/db_1 vzwc2 zwc2/u01/app/oracle/product/10.2.0/db_1 display node applications configuration-(VIP, GSD, ONS, listener) [oracle @ vzwc1 ~] $ Srvctl config nodeapps-n vzwc1-a-g-s-l VIP exists. :/vzwc1-vip/192.168.1.151/255.255.255.0/eth0 GSD exists. ONS daemon exists. listener exists. [oracle @ vzwc1 ~] $ [Oracle @ vzwc1 ~] $ Srvctl config nodeapps-n vzwc2-a-g-s-l VIP exists. :/vzwc2-vip/192.168.1.152/255.255.255.0/eth0 GSD exists. ONS daemon exists. listener exists. display the configuration of the ASM instance [oracle @ vzwc1 ~] $ Srvctl config asm-n vzwc1 + ASM1/u01/app/oracle/product/10.2.0/db_1 [oracle @ vzwc1 ~] $ [Oracle @ vzwc1 ~] $ Srvctl config asm-n vzwc2 + ASM2/u01/app/oracle/product/10.2.0/db_1 RAC running instance SQL> SELECT 2 inst_id, instance_number inst_no, instance_name inst_name, parallel 6, status 7, database_status db_status 8, active_state state 9, host_name host 10 FROM gv $ instance 11/INST_ID INST_NO INST_NAME par status DB_STATUS state host ---------------------------------------------------------------- ---- --------- ---------- 1 1 zwc1 yes open active normal vzwc1 2 2 zwc2 yes open active normal vzwc2 all data files in the disk group SQL> select name from v $ datafile 2 union 3 select member from v $ logfile 4 union 5 select name from v $ controlfile 6 union 7 select name from v $ tempfile 8/NAME limit ------------------------------------------------------------------------------------------------------------------------------- Latency + DATADG/zwc/controlfile/latency + DATADG/zwc/datafile/system.256.810684333 + DATADG/zwc/datafile/ undotbs1.258.810684333 + DATADG/zwc/datafile/undotbs2.265.810688243 + DATADG/zwc/datafile/users.259.810684333 + DATADG/zwc/onlinelog/gr Latency + DATADG/zwc/onlinelog/latency + DATADG/zwc/tempfile/latency + FLASHDG/zwc/controlfile/ release + FLASHDG/zwc/onlinelog/release + FLASHDG/zwc/onlinelog/gro Up_4.260.810684561 OCR storage path [oracle @ vzwc1 ~] $ Ocrcheck Status of Oracle Cluster Registry is as follows: Version: 2 Total space (kbytes): 1043916 Used space (kbytes): 3832 Available space (kbytes): 1040084 ID: 1906841437 Device/File Name:/dev/raw/raw1 Device/File integrity check succeeded Device/File not configured Cluster registry integrity check succeeded VOTEDISK storage path [oracle @ vzwc1 ~] $ Crsctl query css votedisk 0. 0/dev/raw/raw2 located 1 votedisk (s). clusterware version [oracle @ vzwc1 ~] $ Crsctl query crs activeversion CRS active version on the cluster is [10.2.0.5.0] view RAC resources [oracle @ vzwc1 ~] $ Crs_stat-t Name Type Target State Host ------------------------------------------------------------ ora .... SM1.asm application ONLINE vzwc1 ora .... c1.lsnr application ONLINE vzwc1 ora. vzwc1.gsd application ONLINE vzwc1 ora. vzwc1.ons application ONLINE vzwc1 ora. vzwc1.vip application ONLINE vzwc1 ora .... SM2.asm application ONLINE vzwc2 ora .... c2.lsnr appl Ication ONLINE vzwc2 ora. vzwc2.gsd application ONLINE vzwc2 ora. vzwc2.ons application ONLINE vzwc2 ora. vzwc2.vip application ONLINE vzwc2 ora. zwc. db application ONLINE vzwc2 ora .... c1.inst application ONLINE vzwc1 ora .... c2.inst application ONLINE vzwc2 stops the Oracle instance. When the instance (and related services) is closed, the ASM instance is closed. Finally, close the node application (virtual IP, GSD, TNS Listener, and ONS ). Export ORACLE_SID = zwc1emctl stop dbconsolesrvctl stop instance-d zwc-I zwc1srvctl stop asm-n vzwc1srvctl stop nodeapps-n vzwc1 Start Node application (virtual IP, GSD, TNS Listener, and ONS ). After the node application is successfully started, start the ASM instance. Finally, start the Oracle instance (and related services) and EM. Export ORACLE_SID = zwc1srvctl start nodeapps-n vzwc1srvctl start asm-n restart start instance-d zwc-I zwc1emctl start dbconsole start/stop all instances and Their enabled services srvctl start database-d zwcsrvctl stop database-d zwc

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.