Oracle 10g RAC common maintenance commands

Source: Internet
Author: User

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

Node application status 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: vzwc2

ASM instance status

[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.

Displays the configuration of the RAC database.

[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 application 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.

Displays 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

Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

+ DATADG/zwc/controlfile/current.260.810684377

+ DATADG/zwc/datafile/example.264.810684397

+ DATADG/zwc/datafile/sysaux.257.810684333

+ 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/group_1.261.810684379

+ DATADG/zwc/onlinelog/group_2.262.810684383

+ DATADG/zwc/onlinelog/group_3.266.810684557

+ DATADG/zwc/onlinelog/group_4.267.810684559

+ DATADG/zwc/tempfile/temp.263.810684393

+ FLASHDG/zwc/controlfile/current.256.810684377

+ FLASHDG/zwc/onlinelog/group_1.257.810684381

+ FLASHDG/zwc/onlinelog/group_2.258.810684385

+ FLASHDG/zwc/onlinelog/group_3.259.810684559

+ FLASHDG/zwc/onlinelog/group_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

Storage path of VOTEDISK

[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 application 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

Stop an 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 = zwc1

Emctl stop dbconsole

Srvctl stop instance-d zwc-I zwc1

Srvctl stop asm-n vzwc1

Srvctl stop nodeapps-n vzwc1

Start the 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 = zwc1

Srvctl start nodeapps-n vzwc1

Srvctl start asm-n vzwc1

Srvctl start instance-d zwc-I zwc1

Emctl start dbconsole

Start/stop all instances and Their enabled services

Srvctl start database-d zwc

Srvctl stop database-d zwc

 

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.