User Tools

Site Tools


rac

This is an old revision of the document!


Table of Contents

RAC

Oracle RAC Overview

Real Application Clusters (RAC) is an clustering solution whereby multiple Oracle instances can communicate with one database located on shared storage.<br /> Datafiles and controlfiles are shared but each instance will have its own redo log files and undo tablespace.<br /> Use crsctl to manage the clusterware<br /> Use srvctl to manage the cluster<br /> <br />

Know nothing about RAC? Go through the RAC Attack labs step-by-step installation for 11g RAC_Attack!<br /> or 12c RACAttack for an excellent (hands on) introduction.<br />

How to Backup and Restore a RAC Database

RAC components

Virtual IP

A virtual IP address is an IP address setup to “float” between the real IP addresses associated with each instance in the cluster. If the IP address assigned to the virtual IP becomes unavailable, the IP address from the still available instance will be assigned to the virtual IP thus maintaining database availability for the users.

Voting Disk

A Voting Disk is a file on a shared filesystem. It maintains a list of available cluster nodes and can resolve split-brain scenarios.<br /> All instances write to the voting disk to indicate that they are still active.

Cluster Registry

The Cluster Registry (OCR) is used to store cluster wide settings and status information such as node names, IP and VIP addresses, voting disk locations, node applications, database names, instance names, listener names, etc.

Clusterware processes

A RAC cluster consists of the following daemons<br />

  • crsd – Cluster Resource Services Daemon
  • cssd – Cluster Synchronisation Services Daemon
  • evmd – Event Manager Daemon

RAC commands

Location of Oracle Local Registry configuration file (olr.loc)

This file points to the clusters local node repository and depending on the OS, it is in one of these 2 locations

0@@

This file is managed by OHASD and will point to the olrconfig_loc and the crs_home

Location of cluster config files

1@@

Some cluster control commands to check the status / health of the clusterware

2@@

List network interfaces available to this cluster node

3@@

Is Oracle Restart (High Availability Service) enabled?

4@@

Is ASM autostart enabled?

5@@

Are diskgroups registered?

6@@

Is database registered and autostart enabled?

7@@

if not…

8@@

Set ASM diskgroups to be used by database

9@@

Stop and start the clusterware services

To set the correct home, can also search /etc/oratab for the relevant ASM instance and use . oraenv

10@@

Prevent cluster services from starting up on boot

11@@

Re-enable clusterware services

12@@

List the resources under cluster control

13@@

or

14@@

Find the ORACLE_HOME from a database cluster metadata file

15@@

Stop all the cluster resources for a particular ORACLE_HOME

If all resources for a home need to go down (e.g. for patching), this should do it.<br /> Save the state so that the start command knows what to start and what not to.

16@@

Before running the startup, the state file can be edited and instances added/removed as it is a simple text file

17@@

General syntax for starting and stopping a RAC instance

18@@

Stop one instance of a RAC database

19@@

Start an ASM instance on a specific node

20@@

Stop all instances of a RAC database

21@@

Start all instances of a RAC database

22@@

Start a database in mount mode

23@@

Stop ASM on a RAC node

24@@

Start / Stop all node applications on a RAC node

25@@

Start / Stop a listener on a RAC node

26@@

Start / Stop services on a RAC node

srvctl stop database command implicity does a srvctl stop services (because services are dependent on database).<br /> However, a subsequent srvctl start database requires an explicit srvctl start service

  • service name list is optional and if not provided, the SRVCTL starts all of the database's services<br />
  • -c connect_str Connect string (default: / as sysdba)<br />
  • -q Query connect string from standard input
27@@

Status of an ASM instance on a RAC node

28@@

Status of the database, all instances and all services

29@@
30@@

Status of named instances with their current services (if on local node)

31@@
32@@
33@@
34@@

Add a new node

35@@

Add a new database

36@@

Add named instances to an existing database

37@@

Add a service to an existing database with preferred instances (-r) and available instances (-a). Use basic failover to the available instances

38@@

Add a service to an existing database with preferred instances (-r) and available instances (-a). Use preconnect at the available instances

39@@

Remove the applications for a database

40@@

Remove the applications for named instances of an existing database

41@@

Remove the service

42@@

Remove the service from the instances

43@@

Remove all node applications from a node

44@@

Modify an instance to execute on another node

45@@

Modify a service to execute on another node

46@@

Modify an instance to be a preferred instance for a service

47@@

Relocate a service from one instance to another

48@@

Switchover / failover a database from one node (server) to another

49@@

Enable CRS resources (resources can be up or down when these commands are issued)

Enable the database

50@@

Enable the named instances

51@@

Enable the service

52@@

Enable the service at the named instance

53@@

Disable CRS resources (resources must be down when these commands are issued)

Disable the database globally

54@@

Disable the named instances

55@@

Disable the service(s) globally

56@@

Disable the service on the named instance

57@@

Status of a named services

58@@

Status of all nodes supporting database applications

59@@

How to tell if database is a RAC cluster

This will be TRUE if RAC database

60@@

or, the GV$ views will show more than 1 record

61@@

or

62@@

or

63@@

or

64@@

Show session distribution across the RAC nodes

65@@
rac.1544273361.txt.gz · Last modified: 2018/12/08 12:49 by 0.0.0.0

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki