Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common commands of ORACLE 11G RAC

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about ORACLE 11G RAC common command content. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

ORACLE 11G RAC Common Commands (grid user view)

1: Check OHAS status and cluster status

[root@rac1 ~]# crsctl check crs

CRS-4638: Oracle High Availability Services is online

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

2: Check all instances running status

[root@rac1 ~]# srvctl status database -d racdb

Instance racdb1 is running on node rac1

Instance racdb2 is running on node rac2

3: Check single instance status (instance names racdb1 and racdb2, database name racdb)

[root@rac1 ~]# srvctl status instance -d racdb -i racdb1

Instance racdb1 is running on node rac1

[root@rac1 ~]# srvctl status instance -d racdb -i racdb2

Instance racdb2 is running on node rac2

4: Node Application Status

[root@rac1 ~]# srvctl status nodeapps

VIP rac1-vip is enabled

VIP rac1-vip is running on node: rac1

VIP rac2-vip is enabled

VIP rac2-vip is running on node: rac2

Network is enabled

Network is running on node: rac1

Network is running on node: rac2

GSD is disabled

GSD is not running on node: rac1

GSD is not running on node: rac2

ONS is enabled

ONS daemon is running on node: rac1

ONS daemon is running on node: rac2

Node Application Configuration (VIP, GSD, ONS, Listeners)

[root@rac1 ~]# srvctl config nodeapps -a -g -s -l

Warning:-l option has been deprecated and will be ignored.

Network exists: 1/192.168.11.0/255.255.255.0/eth0, type static

VIP exists: /rac1-vip/192.168.11.201/192.168.11.0/255.255.255.0/eth0, hosting node rac1

VIP exists: /rac2-vip/192.168.11.211/192.168.11.0/255.255.255.0/eth0, hosting node rac2

GSD exists

ONS exists: Local port 6100, remote port 6200, EM port 2016

Name: LISTENER

Network: 1, Owner: grid

Home:

/u01/app/11.2.0/grid on node(s) rac2,rac1

End points: TCP:1521

5: List all configuration databases

[root@rac1 ~]# srvctl config database -d racdb -a

Database unique name: racdb

Database name: racdb

Oracle home: /u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile: +DATA/racdb/spfileracdb.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: racdb

Database instances: racdb1,racdb2

Disk Groups: DATA,FRA

Mount point paths:

Services:

Type: RAC

Database is enabled

Database is administrator managed

6: ASM status and ASM configuration

[root@rac1 ~]# srvctl status asm

ASM is running on rac2,rac1

[root@rac1 ~]# srvctl config asm -a

ASM home: /u01/app/11.2.0/grid

ASM listener: LISTENER

ASM is enabled.

[root@rac1 ~]#

7: TNS listener status and configuration

[root@rac1 ~]# srvctl status listener

Listener LISTENER is enabled

Listener LISTENER is running on node(s): rac2,rac1

[root@rac1 ~]# srvctl config listener -a

Name: LISTENER

Network: 1, Owner: grid

Home:

/u01/app/11.2.0/grid on node(s) rac2,rac1

End points: TCP:1521

[root@rac1 ~]#

8: SCAN status and configuration

[root@rac1 ~]# srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node rac1

[root@rac1 ~]# srvctl config scan

SCAN name: rac-scan, Network: 1/192.168.11.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /rac-scan/192.168.11.199

9: Status and configuration of VIP nodes

[root@rac1 ~]# srvctl status vip -n rac1

VIP rac1-vip is enabled

VIP rac1-vip is running on node: rac1

[root@rac1 ~]# srvctl status vip -n rac2

VIP rac2-vip is enabled

VIP rac2-vip is running on node: rac2

[root@rac1 ~]# srvctl config vip -n rac1

VIP exists: /rac1-vip/192.168.11.201/192.168.11.0/255.255.255.0/eth0, hosting node rac1

[root@rac1 ~]# srvctl config vip -n rac2

VIP exists: /rac2-vip/192.168.11.211/192.168.11.0/255.255.255.0/eth0, hosting node rac2

10: All running instances in the cluster (SQL)

SQL> select inst_id,instance_number,instance_name,parallel,status,database_status,active_state,host_name from gv$instance;

INST_ID INSTANCE_NUMBER INSTANCE_NAME PAR STATUS DATABASE_STATUS ACTIVE_ST HOST_NAME

---------- --------------- ---------------- --- ------------ ----------------- --------- --------------

1 1 racdb1 YES OPEN ACTIVE NORMAL rac1

2 2 racdb2 YES OPEN ACTIVE NORMAL rac2

Perform all of the following checks as root

1: Start or close database instance

[root@rac1 ~]# srvctl stop instance -d racdb -n rac1

[root@rac1 ~]#

[root@rac1 ~]# srvctl stop instance -d racdb -n rac2

[root@rac1 ~]#

[root@rac1 ~]# srvctl status database -d racdb

Instance racdb1 is not running on node rac1

Instance racdb2 is not running on node rac2

You can also check the status of each instance by issuing the following command

[root@rac1 ~]# srvctl status instance -d racdb -i racdb1

Instance racdb1 is not running on node rac1

[root@rac1 ~]# srvctl status instance -d racdb -i racdb2

Instance racdb2 is not running on node rac2

2: Start or close asm instance

[root@rac1 ~]# srvctl stop asm -n rac1

PRCR-1014 : Failed to stop resource ora.asm

PRCR-1065 : Failed to stop resource ora.asm

CRS-2529: Unable to act on 'ora.asm' because that would require stopping or relocating 'ora.DATA.dg', but the force option was not specified

[root@rac1 ~]#

You can check the status of cluster resources with crsctl status resource -t -init

3: Stop oracle clusterware on the local server using the crsctl stop cluster command. After this command is executed, if any of the resources managed by oracle clusterware are still running

The whole command fails. Use the-f option to unconditionally stop all resources and stop the oracle clusterware system.

Alternatively, you can stop the oracle clusterware system on all servers in the cluster by specifying the-all option, as follows:

crsctl stop cluster -all -f

You can also use crsctl cluster start-n rac1 rac2

Thank you for reading! About "ORACLE 11G RAC common command what" This article is shared here, I hope the above content can have some help for everyone, so that we can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report