IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

38
. . . . . . . . © Copyright IBM Corporation, 2012. All Rights Reserved. All trademarks or registered trademarks mentioned herein are the property of their respective holders Experiences with implementing Oracle Database with Oracle Extended RAC 11g Release 2 (11.2.0.2) on IBM AIX 6.1 Francisco Riccio IBM Peru May 31, 2012 In collaboration with the IBM Oracle International Competency Center

Transcript of IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Page 1: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

. . . . . . . .

© Copyright IBM Corporation, 2012. All Rights Reserved. All trademarks or registered trademarks mentioned herein are the property of their respective holders

Experiences with implementing Oracle Database with Oracle Extended RAC 11g

Release 2 (11.2.0.2) on IBM AIX 6.1

Francisco Riccio IBM Peru

May 31, 2012

In collaboration with the IBM Oracle International Competency Center

Page 2: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

Table of contents

Abstract..................................................................................................................................... 1

Introduction .............................................................................................................................. 1

1. Architecture .......................................................................................................................... 2 NFS Server ........................................................................................................................................ 6 NTP Server ........................................................................................................................................ 7

2. Configuration & Installing Oracle Grid Infrastructure 11.2.0.2 .......................................... 9

3. Configurating & Installing Oracle Database ..................................................................... 28

Summary................................................................................................................................. 33

Resources............................................................................................................................... 34

About the author..................................................................................................................... 34

Trademarks and special notices ........................................................................................... 35

Page 3: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

1

Abstract

This paper is based on our experiences implementing an Oracle Extended Real Application Clusters solution with Oracle Database 11.2.0.2 on an IBM AIX 6.1 ® platform. It is intended for IBM field support, IBM Business Partners and IBM customers planning to implement this offering from Oracle.

Introduction

Oracle Extended RAC is an architecture where the nodes in the cluster are separated by different Data Center. An Oracle Extended RAC is an architecture that provides extremely fast recovery from a site failure and allows for all nodes, at all sites, to actively process transactions as part of single database cluster.

For example, for a business that has a corporate campus, the Oracle Extended RAC configuration could consist of individual Oracle Real Application Clusters nodes located in separate buildings. Oracle Real Application Clusters on an extended cluster provides greater availability than a local Oracle Real Application Cluster due to the fact that if we have a disaster in a Data Center our solution can continue operating.

We recommend reading the following document to understand all the concepts and architectures that are involved in an implementation of Oracle Extended RAC.

http://www.oracle.com/technetwork/database/clustering/overview/extendedracversion11-435972.pdf

Page 4: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

2

1. Architecture

Our implementation had the following architecture:

Figure 1: General architecture

Each server must have two network cards, one for the public IP and the other for the private IP (known as interconnect). Each IP must work in a separate VLAN or a separate device network. The private IP must ensure a communication speed of at least 1 Gbit. Each node pings at an interval of between three msec to three sec to each node of the cluster through the private network. If a node pinge is not acknowledged within 30 seconds, the unresponsive node is forcibly removed from the cluster (evicted)..

Also we recommend setting up in each LPAR at least two core of POWER7® (in my case an IBM Power 750 server). If the server does not have enough CPU power then an eviction action may be initiated.

Oracle does not recommend having more than one LPAR on the same physical environment as a production node. If you need the processing power try to use a bigger LPAR per physical system.

We recommended review the following URL:

http://www.oracle.com/technetwork/database/clustering/tech-generic-unix-new-166583.html

Page 5: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

3

Figure 2 shows the architecture more detail.

Figure 2: Communication between switches

There should always be redundancy of communications between each device. If this is not possible, it presents a risk. In my implementation I have used Port Channel Cisco’s technology for providing redundancy.

Page 6: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

4

Replication by Oracle ASM – Normal Redundancy

Mirrroring Storage – Host Based Mirroring (Active/Active Storage)

VIOS

IBM Datacenter

La Molina

VIOS

IBM Datacenter

San Isidro

DS 5300

Array - RAID 5

DS 5300

Array – RAID 5

Figure 3: Configuration of storage between sites

Note: The VIOS shown in Figure 3 above means that the SAN storage is attached to the Host Base Adapter, which is owned by VIOS and the SAN LUNs are presented to the AIX LPARs through Virtual SCSI adapters.

We can use two kinds of mirroring of storage, Host Based Mirroring (Active/Active Storage) and Array Based Mirroring (Active/Failover Storage). In this test case I implemented with Host Based Mirroring for each pair of disks (one at each data center). Normal redundancy is provided through Oracle Automatic Storage Management (Oracle ASM)

When using Host Based Mirroring we should not have both storage separated by more than 100 Km. Also, if the distance is greater than ten kilometers, we should use dark fiber.

For each two Km of separation we recommend creating one buffer credit. The buffer credit allows data communication in a Fibre Channel storage area network (SAN) where there are long spans of fiber optic cable.

Page 7: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

5

Figure 4: Storage configuration at each site

It is very important that we can establish redundancy between the SAN switches, HBA’s and the path’s to the storage as shown in Figure 4.

Also, it is important to determine the transfer of data (throughput) sent to each device to identify potential bottlenecks in the general architecture.

DNS Server

In Oracle Real Application Clusters (RAC) 11g Release 2, we need a DNS server that can resolve the Single Client Access Name (SCAN) of the cluster. The SCAN provides a single name to the clients connecting to Oracle Real Application Clusters. It does not change throughout the life of the cluster, even if you add or remove nodes from the cluster. Clients connecting with SCAN can use a simple connection string, such as a thin JDBC URL or EZConnect, and still achieve the load balancing and client connection failover. If we want to use all features of SCAN, we must use Oracle client 11g Release 2.

It is important to highlight that the network administrator must create a single name that resolves to three separate IP addresses using round-robin algorithms.

In the test implementation we used a DNS server running on Microsoft® Windows 2008 R2®.

Page 8: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

6

Figure 5

Note: In our test case, the DNS server is a Microsoft DNS and the clients are on AIX. With this configuration it is necessary in the DNS to register in the Forward Lookup Zones section and in the Reverse Lookup Zones section.

Also the server DNS must have some mechanisms to ensure high availability. In Microsoft DNS, we can have high availability through replication DNS (Active/Active) or zone transfers (Active/Passive - the replication is one way). For our testing we used the zone transfer method.

Also our DNS clients (Oracle Database Server – AIX) must register both DNS servers as primary and secondary, respectively.

NFS Server

In an extended cluster we need a NFS server where each server on every site can mount a folder. In this folder a voting file will exist to host the quorum disk. This voting file will be a witness between both sites. The quorum voting file allows greater latency.

We must remember that if a node can’t read its local voting file (it makes pings to the voting file every interval of three ms to three sec), it then takes a timeout of 200 seconds by default when I use Oracle Clusterware and 600 seconds may at the most be the CSS timeout when third party cluster software is

Page 9: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

7

used; if this time is completed and the server can’t read the voting file so the servers get into an evicted state and then the clusterware reboots the server.

The recommendation is to have the NFS server in a third data center or else it is risk due to the fact a problem such as unavailable data center, where the NFS Server reside; all our solution of our cluster will not be working. Two of three voting files always must be available to be read for each node in the cluster.

Always each node in the cluster must able to read 50 percent of our total of voting files created.

In our test implementation, each node has a folder mounted to the NFS Server.

Example:

In the file /etc/filesystems of each node:

The following options for the mount command should be used for IBM AIX:

cio,rw,bg,hard,intr,rsize=32768,wsize=32768,timeo=600,vers=3,proto=tcp,noac,sec=sys

In the following document, we can see the correct mount parameters that the clusterware needs for each platform:

http://www.oracle.com/technetwork/database/clusterware/overview/grid-infra-thirdvoteonnfs-131158.pdf

Note 1: The document linked to above does not show use of the “cio” parameter for an AIX environment, but if it is omitted it will give an error condition.

Note 2: The directory in the AIX NFS client must have the user “oracle” as owner before and after it is mounted with the published NFS server.

NTP Server

In previous releases of Oracle Real Application Clusters an NTP server was required, but with Oracle Grid Infrastructure 11g Release 2 an NTP server is no longer required. Oracle Grid Infrastructure 11g Release 2 automatically provides this service for the nodes that belong to the cluster solution. This service is now named “Oracle Cluster Time Synchronization Service” and is provided through the “ctssd” daemon.

If we want to use the NTP of our company, we must execute the following steps:

a) Open the /etc/rc.tcpip file, and locate the following line: start /usr/sbin/xntpd "$src_running"

b) Change the line to the following: start /usr/sbin/xntpd "$src_running" "-x

c) Save the file

The option –x insures that the NTP clients never back off time. In previous releases of Oracle Real Application Clusters this event caused a reboot of the node.

Page 10: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

8

In the test implementation, we used the Oracle Cluster Time Synchronization Service because the set up is automatic.

Page 11: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

9

2. Configuration & Installing Oracle Grid

Infrastructure 11.2.0.2

The Oracle Grid Infrastructure 11g Release 2 software includes a set of products (ORACLE ASM, Oracle Restart and Oracle Clusterware) that need to be installed on each node of the cluster first.

Is important that we make an inventory of each configuration done, an example is showed in the page 35.

1. The following hardware requirements must be met: a. Review My Oracle Support (MOS) Note: 1306539.1 (Core Oracle Database Certification

Information). b. The Oracle Grid Infrastructure needs: 1.5 times the RAM if the RAM is between 1.5GB and

2GB, equal to the size of RAM if the RAM size is between 2GB to 16GB or 16GB if RAM size is more than 16GB.

c. Temporary space (at least 1 GB) available in /tmp. d. All servers that will be used in the cluster have the same chip architecture, for example, all

32-bit processors or all 64-bit processors. e. Disk space for software installation locations. You will need at least 13GB GB of available

disk space for the Grid home directory, which includes both the binary files for Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM) and their associated log files, and at least 7.5GB of available disk space for the Oracle Database home directory.

f. Shared disk space. g. Each node has at least two network interface cards (NIC), or network adapters. h. One public IP address for each node. i. One virtual IP address for each node. j. Three single client access name (SCAN) addresses for the cluster is recommended, it could

also work with a single client access name. k. If we are using VIOS, we must ensure the version is certified by Oracle. Certification status is

documented in the following link: http://www.oracle.com/technetwork/database/virtualizationmatrix-172995.html In this test case we have the following version of VIOS:

2. All requirements shown in My Oracle Support Note: 282036.1 should be met (Minimum Software

Versions and Patches Required to Support Oracle Products on IBM Power Systems).

3. The character devices (raw devices) shared must not have the PVID set in the operating system. Example:

Page 12: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

10

The value “none” shows that it is not set up in the PVID. If we need to clean the value PVID assigned to a disk, we can use the following command:

4. The reserve_policy property must be set up as “no_reserve”. Example:

If it doesn’t have the value of “no_reserve”, we can use this command:

5. The shared folder must be mounted in the NFS Server with the correct properties explained earlier in the document. Then, in the shared folder we must create a file of 800 MB with the “dd” command. Example:

Page 13: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

11

6. The following values should be set up in the kernel, these parameters are related to network tuning:

tcp_ephemeral_low = 9000 (Specifies the smallest port number to allocate for TCP ephemeral ports)

tcp_ephemeral_high = 65535 (Specifies the largest port number to allocate for TCP ephemeral ports)

udp_ephemeral_low = 9000 (Specifies the smallest port number to allocate for UDP ephemeral ports)

udp_ephemeral_high = 65535 (Specifies the largest port number to allocate for UDP ephemeral ports)

ipqmaxlen = 512 (Specifies the number of received packets that can be queued on the IP protocol input queue)

rfc1323 = 1 (Enables TCP enhancements as specified by RFC 1323, TCP Extensions for High Performance)

sb_max = 4194304 (Specifies the maximum buffer size allowed for a TCP and UDP socket. Limits setsockopt, udp_sendspace, udp_recvspace, tcp_sendspace, and tcp_recvspace)

tcp_recvspace = 65536 (Specifies the system default socket buffer size for receiving data. This affects the window size used by TCP)

tcp_sendspace = 65536 (Specifies the system default socket buffer size for sending data)

udp_recvspace = 655360 (Specifies the system default socket buffer size for receiving UDP data)

udp_sendspace = 65536 (Specifies the system default socket buffer size (in bytes) for sending UDP data)

Example to review the value of a parameter: /usr/sbin/no -a | fgrep ephemeral

Example to change the value to a parameter: /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500

The following parameters are related to I/O disk tuning:

aio_maxreqs = 65536 (It is the current maximum of asynchronous I/O requests that can be either waiting to be processed or are currently processed, we can review its value with the following command: ioo -o aio_maxreqs)

The following parameters are related to virtual memory tuning:

lru_file_repage = 0

strict_maxclient = 1

strict_maxperm = 0

page_steal_method = 1

minperm% = 3

Page 14: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

12

maxperm% = 90

maxclient% = 90

Example to review the value of a parameter: vmo -Fa | grep maxclient

We recommend reviewing the parameter “queue_depth” for each disk, this should be done together with a storage specialist to ensure selection of the correct values.

In the VIOS apply the following disk tuning parameters:

chdev -l hdiskX -a reserve_policy=no_reserve

chdev -l hdiskX -a queue_depth=64

chdev -l hdiskx -a algorithm=round_robin

The following link is a useful tuning reference for AIX 6.1: http://www.ibm.com/developerworks/aix/library/au-aix6tuning/

7. Execute the following to create the core files: lsattr -El sys0 -a fullcore 8. Next, add the following entries in the “/etc/hosts” for each node of the cluster:

In this test case, we have Oracle Extended RAC created with two nodes; each node must have three IP’s added in the “hosts” file. The public IP addresses must have a gateway IP, and the private IP addresses do not need to have a gateway.

Example:

In node one has three IP’s: 10.78.1.3 / 10.78.1.103 / 1.2.9.8.

Where:

10.78.1.3 => Is the public IP

10.78.1.103 => Is the virtual IP, it should be in the same subnet as the host public IP.

1.2.9.8 => Is the private IP.

When we do a ping, only the public and private IP must give an answer.

9. To configure the client DNS, it must be set up in the “/etc/resolv.conf” file. Then, we must resolve the address of our SCAN in three IP’s in a round robin algorithm. Example:

Page 15: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

13

10. We must create a user with the groups oinstall, asmadmin, asmdba and asmoper. For the case of asmdba, we have used the name dba and for sysoper we have used the name oper. Both the ID of the users and groups must be same in all nodes. Example.

11. Next we must execute the following commands: a. chuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE

<username> b. /usr/sbin/chdev -l sys0 -a maxuproc=16384

12. The user must have the variable umask set with the value of 022, as follows: $HOME /.profile Add this line: umask 022

13. The users “grid and oracle” must have the following values limits file: fsize = -1 core = 2097151 cpu = -1 data = -1 rss = -1 stack = -1 nofiles = -1

This is set up in the file “/etc/security/limits”.

Example:

Page 16: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

14

14. In the file “/etc/ssh/sshd_config” uncomment the parameter “LoginGraceTime” and set up the value of zero.

For example:

15. Before launching the “runInstaller” command of Oracle Grid Infrastructure, we must unset this environment variable: unset JAVA_COMPILER

16. The Oracle Grid Infrastructure includes a file named “rootpre.sh”. This file must be executed before executing “runInstaller”. Also the cluster verification script should be run as it will check for any missed pre-installation setup steps for the Oracle Grid Infrastructure software.

17. Execute the “runInstaller”. a. On the second screen, select the option “Install and Configure Grid Infrastructure for a

Cluster”.

Page 17: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

15

Figure 6

b. On the third screen, select the option “Advanced Installation”.

Figure 7

c. On the fifth screen, we must enter the Cluster Name, the SCAN Name and the SCAN Port of the Listener SCAN. Do not enable the checkbox of Configure GNS, it is not necessary. The SCAN name must be resolved by the DNS server.

Figure 8

Page 18: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

16

d. On the sixth screen, we must add the servers that belong to the cluster.

Figure 9

As we haven’t yet configured the SSH connectivity click the “SSH Connectivity” button next. The installer then helps with this configuration.

e. On the seventh screen, choose the network interfaces for the public and private network.

Figure 10

The name of the network interface names must be the same in each node.

Notes:

e.1) It is highly recommended that the “Jumbo Frame” option be enabled on the private network interfaces for Oracle Real Application Clusters nodes and our private network should work at least 1 Gbit. This allows the sending and receiving of large data frames between the nodes. The “Jumbo Frame” option should also be enabled in the ethernet switch port.

e.2) If “Jumbo Frame” is not enabled in both the Oracle Real Application Cluster node private interface port and the corresponding switch port, the Cluster Verification tool will show a failure of ping test between the nodes.

e.3) Since we are using Oracle Grid Infrastructure version 11.2.0.2, we must enable multicast-based communication on the private interconnect. The default address of 230.0.1.0 (port 42424) on the private interconnect network is used for multicasting.

We recommend reading My Oracle Support (MOS) Note: 1212703.1 (Oracle Grid Infrastructure 11.2.0.2 Installation or Upgrade may fail due to Multicasting Requirement).

Page 19: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

17

f. On the eighth screen, we can choose between two kinds of storage for the voting and Oracle Cluster Registry (OCR) files.

Figure 11

For the test scenario, the architecture used Oracle ASM for both Oracle Cluster files and database files. With Oracle Database 11gR2 raw devices cannot be used (character devices) for saving the voting and OCR files.

g. On the ninth screen, we must create the disk group that will save the voting and OCR files.

Figure 12

Note: The redundancy must be set to “normal” for replication of storage arrays as used in our test scenario. Also, this screen requires that only physically attached disks be listed.

h. On the eleventh screen choose the correct groups.

Figure 13

i. On the twelfth screen choose the folders for ORACLE_BASE and ORACLE_HOME_GRID. The ORACLE_HOME_GRID’s path must be below that of the ORACLE_BASE’s.

Page 20: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

18

The directory “/u01/app” is the ORACLE_BASE’s path and “/u01/grid” is the ORACLE_HOME_GRID’s path.

j. On the following screens click “next”.

Figure 14

Figure 15

Page 21: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

19

k. The following screen appears next:

Figure 16

The scripts must be executed as user “root”. They must be executed in the order indicated. For example: first execute the script “orainstRoot.sh” in the node “pucphdbprd” and then in the node “pucphdbprd2”, etc.

The results of executing the scripts are shown below.

Figure 17- orainstRoot.sh

Page 22: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

20

Root.sh:

Figure 18

Figure 19

l. To complete “runInstaller”, initiate a VNC session using the command “asmca” with the environment variables of Oracle Grid Infrastructure.

Page 23: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

21

This will bring up the following screen:

Figure 20

Next add the name of the file created in the NFS server. It was created in secton 2.5 of this paper which was the step for adding a voting file stored in the NFS server in the ASM diskgroup:

i. Right click on the Diskgroup.

Page 24: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

22

Figure 21

ii. Click the button “Change Disk Discovery Path” and add the path of the voting file folder.

Figure 22

Page 25: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

23

iii. Choose the voting file, and mark as “quorum”.

Figure 23

iv. Then remove the disk used in the installation to create the diskgroup.

Page 26: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

24

Figure 24

v. Choose the disk to remove.

Figure 25

Page 27: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

25

Figure 26

vi. Then validate the voting disks:

This is where each one of the two disks must be in different storage systems in the different data centers and the third voting file must be at the third site in our NFS server.

Next execute tests to validate the cluster. The environment variables needed for the Oracle Grid Infrastructure must be loaded.

crsctl check crs

olsnodes

Page 28: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

26

ocrcheck (run in each node):

Note: Oracle recommends having a second DG with a second OCR.

Page 29: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

27

crsctl status res –t

Next check to be sure the three SCAN VIPs generated for the three IP’s are registered in the DNS server.

Page 30: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

28

3. Configurating & Installing Oracle Database

First, execute the script “rootpre.sh”. It is included as part of the Oracle Database 11g Release 2 software package.

Next, execute the “runInstaller” command.

1. For this test scenario, on the third installation screen we’ve chosen to install the database software only without creating a database.

2. On the fourth screen, choose Oracle Real Application Cluster database installation and select the nodes that will belong to the cluster.

Figure 27

The remaining installation screens are similar to Single Instance Database installation. In addition there is a screen for executing the script “root.sh” which must be executed on both nodes.

The following steps are an overview of the database creation process:

� Creating the Oracle Real Application Cluster environment (extended cluster) � Clone the single instance database using RMAN � Converting the cloned single Instance database into an Oracle Real Application Cluster database

in the Extended Cluster environment.

For the test scenario we used the “Duplicate Active Database” feature for cloning the single database used in a PeopleSoft Enterprise application environment (Financial, Campus and Human Resources) to the new cluster environment in ASM storage. The target database in the cloning process must be a

Page 31: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

29

single instance. In the test environment the single instance was in another server with Oracle Grid Infrastructure in ASM storage. In the following lines I will show some lines how to do this steps.

First copy the script in RMAN used for Active Database Cloning.

1. In the target database we must create the diskgroup DG_HR91PRD in normal redundancy. 2. Create a pfile in the target database with the following “db_name=HR91PRD” then start the

instance in mode “nomount”. 3. The following commands must be executed in the source environment: rman

target=sys/oracle10g@HR91SYS auxiliary=sys/oracle10g@HR91PRD (The password of user “SYS” must be the same in both databases and we must have correctly configured the Oracle Network entries in the tnsnames.ora in the source server).

4. Previous we must have created the diskgroups that stored our database. In my case the diskgroup has redundancy normal.

5. Then we execute the RMAN command for duplicating our database:

RMAN> duplicate target database to HR91PRD from active database

spfile

set db_unique_name='HR91PRD'

set control_files='+DG_HR91PRD'

set db_create_file_dest='+DG_HR91PRD'

set db_file_name_convert='+DG_HR91SYS','+DG_HR91PRD/'

set log_file_name_convert='+DG_HR91SYS ','+DG_HR91PRD/'

nofilenamecheck;

If you are implementing the Oracle Database with Peoplesoft Enterprise applications we recommend reading My Oracle Support (MOS) Note: 1100831.1 (Required Interim Patches for the Oracle Database with PeopleSoft).

The following recommended parameters are specified in the document:

_gby_hash_aggregation_enabled=false

_unnest_subquery = false

Also we must execute the following grants:

GRANT SELECT_CATALOG_ROLE to <SCHEMA_PEOPLESOFT>;

GRANT EXECUTE_CATALOG_ROLE to < SCHEMA_PEOPLESOFT >;

Then, as part of cloning process, change the single instance to an Oracle Real Application Cluster instance. When doing this set up the following parameters:

1. cluster_database_instances 2. cluster_database 3. instance_number 4. thread 5. undo_tablespace

Page 32: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

30

For example, this is the parameter file for the HR91PRD1 instance.

Next startup the instance in each node with this new parameter file configuration and register it as a resource in the cluster with the “srvctl” command.

For example:

srvctl add database -d <DATABASE_NAME> -o <ORACLE_HOME>

srvctl add instance –d <DATABASE_NAME> -i <INSTANCE_NAME> -n <NODE>

Next validate the registeration with the following command:

srvctl config database –d <DATABASE_NAME>

Page 33: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

31

Then register the service by issuing this command:

srvctl add service -d HR91PRD -s HR91PRD.srv -r "HR91PRD1,HR91PRD2" -P PRECONNECT -B THROUGHPUT

Validate the information for this new service with the following command:

srvctl config service -d <DATABASE_NAME> -s <SERVICE_NAME>

To use the default service, ensure that the LBA (Load Balance Advisor) is enabled. This is done through the package DBMS_SERVICE.

Example:

Page 34: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

32

SQL> execute DBMS_SERVICE.MODIFY_SERVICE(service_name=>'HR91PRD',goal=>DBMS_SERVICE.GOAL_THROUGHPUT,clb_goal=>DBMS_SERVICE.CLB_GOAL_LONG,aq_ha_notifications=>TRUE,failover_method=>DBMS_SERVICE.FAILOVER_METHOD_BASIC,failover_type=>DBMS_SERVICE.FAILOVER_TYPE_SELECT,failover_retries=>10,failover_delay=>1);

Next set up the parameter LOCAL_LISTENER and REMOTE_LISTENER correctly.

LOCAL_LISTENER must be set to the IP VIP and the REMOTE_LISTENER to the SCAN.

Example:

It is important to use “Preferred Read Failure Groups” (a new feature in Oracle Database 11g), it allows us that for each ASM instance ASM can read its own array disks that belongs to its Datacenter to local storage as first order. To configure preferred read failure groups the disk group compatibility attributes must be set to 11.1 or higher and in each instance the ASM parameter “asm_preferred_read_failure_groups” must be set.

The syntax is as follows:

ASM_PREFERRED_READ_FAILURE_GROUPS = <diskgroup_name>.<failure_group_name>, ...

For example:

alter system set asm_preferred_read_failure_groups= 'DG_VOTING_OCR.FG_DG_VOTING_OCR_LM','DG_FRA.FG_DG_FRA_LM','DG_HR91PRD.FG_DG_HR91PRD_LM' sid='+ASM1';

alter system set asm_preferred_read_failure_groups= 'DG_VOTING_OCR.FG_DG_VOTING_OCR_SI','DG_FRA.FG_DG_FRA_SI','DG_HR91PRD.FG_DG_HR91PRD_SI' sid='+ASM2';

All of these steps in the implementation must be completed for each database.

Finally, we recommend making an inventory of each component used in the implementation for easier maintenance.

For example, the test scenario inventory has the following entries:

Page 35: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

33

Example - Oracle Extend RAC’s Inventory

The field “Location” in my inventory has two values: San Isidro and La Molina; where each one of them refers a datacenter so we can identify each disk which is its SAN location.

Summary

The purpose of this document is to show an example of an Oracle Extended RAC implementation to help others who may be implementing this scenario.

Page 36: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

34

Resources

These Web sites provide useful references to supplement the information contained in this document:

� IBM PowerVM Virtualization Introduction and Configuration

http://www.redbooks.ibm.com/abstracts/sg247940.html � IBM System p Information Center

http://publib.boulder.ibm.com/infocenter/pseries/index.jsp

� IBM Publications Center

www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi?CTY=US

� IBM Redbooks www.redbooks.ibm.com

� Oracle Real Application Clusters on IBM AIX : Best Practices in Memory Tuning and Configuring

for System Stability http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP101513

� Tuning IBM AIX 5.3 and AIX 6.1 for Oracle Database

http://www-304.ibm.com/partnerworld/wps/servlet/ContentHandler/whitepaper/aix/oracle/performance_analysis

About the author

Francisco Riccio Chávez is an IBM Senior IT Specialist recognized at Oracle ACE since 2011. His current Oracle Certification levels are: OCP 11i Applications Database Administrator, OCP Oracle Database 10g/11g, OCA OAS 10g, OCA Oracle PLSQL Developer, Oracle RAC 11g and Grid Infrastructure Administrator Expert, Oracle Database 10g RAC Certified Administrator Expert, Managing Oracle Database 10g on Linux, Oracle Database SQL Expert and Oracle Database 11g Essentials for Implementers. He also teaches Oracle’s certification at Peruvian universities. He works at IBM Global Technology Services SSO Peru Multi country SSA LA with the role SSO Data Management Service Line Owner for SSA.

Please send an e-mail to the IBM Oracle International Competency Center at [email protected] or to the author at [email protected] with any questions you may have about this paper.

Page 37: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

35

Trademarks and special notices

© Copyright. IBM Corporation 1994-2012. All rights reserved.

References in this document to IBM products or services do not imply that IBM intends to make them available in every country.

IBM, the IBM logo, AIX, Power Systems, PowerVM™, POWER6® and POWER7® are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both:

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Microsoft, Windows, Windows Server, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

Intel and Xeon are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

AMD and AMD Opteron are trademarks of Advanced Micro Devices, Inc.

Red Hat, the Red Hat "Shadow Man" logo, and all Red Hat-based trademarks and logos are trademarks or registered trademarks of Red Hat, Inc., in the United States and other countries.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Linux is a trademark of Linus Torvalds in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

The information provided in this document is distributed “AS IS” without any warranty, either express or implied.

The information in this document may include technical inaccuracies or typographical errors.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer.

Information concerning non-IBM products was obtained from a supplier of these products, published announcement material, or other publicly available sources and does not constitute an endorsement of such products by IBM. Sources for non-IBM list prices and performance numbers are taken from publicly available information, including vendor announcements and vendor worldwide homepages. IBM has not tested these products and cannot confirm the accuracy of performance, capability, or any other claims related to non-IBM products. Questions on the capability of non-IBM products should be addressed to the supplier of those products.

All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller for the full text of the specific Statement of Direction.

Some information addresses anticipated future capabilities. Such information is not intended as a definitive statement of a commitment to specific levels of performance, function or delivery schedules with

Page 38: IBM Power Oracle Extended RAC 11gR2 - Francisco Riccio

Experiences with implementing Oracle Database Extended RAC 11.2.0.2 on IBM AIX http://www.ibm.com/support/techdocs © Copyright 2012, IBM Corporation

36

respect to any future products. Such commitments are only made in IBM product announcements. The information is presented here to communicate IBM's current investment and development activities as a good faith effort to help with our customers' future planning.

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here.

Photographs shown are of engineering prototypes. Changes may be incorporated in production models.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.