• No results found

Prepare the Environment Overview

In document D89113GC10_ag (Page 65-75)

Practices for Lesson 4: Overview Practices Overview

Practice 4-1: Prepare the Environment Overview

In this practice, you make sure that no wastage of resources is occurring on the system so that the maximum available memory can be allocated to the Virtual Machines running the Oracle cluster.

Tasks

1. Open a terminal shell and check if the DWNSTR Oracle RDBMS instance is running. Use the UNIX/Linux ps –ef command to check if the pmon processes are running. You should see a pmon process for the CDB12c instance. If you also determine that the DWNSTR instance is running, you must shut it down because that instance is not used and it takes up valuable memory space, which reduces the memory available for VirtualBox. If you must stop DWNSTR, set the Oracle environment variable to point to DWNSTR and use sqlplus connecting as sysdba to shut down the instance. After the instance has been shut down, exit sqlplus and terminate the window:

[OS prompt]$ ps -ef | grep pmon

oracle 4223 1 0 12:54 ? 00:00:00 ora_pmon_CDB12c oracle 4575 1 0 12:56 ? 00:00:00 ora_pmon_DWNSTR oracle 4908 4194 0 12:58 pts/0 00:00:00 grep pmon

[OS prompt]$ export ORACLE_SID=DWNSTR [OS prompt]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Mar 29 13:10:51 2015

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> shutdown immediate Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

[OS prompt]$ exit

Oracle University and Error : You are not a Valid Partner use only

2. Launch Oracle VirtualBox by selecting Applications->System Tools->Oracle VM Virtual Box.

3. When the Oracle VirtualBox window appears on the screen, select the first virtual machine (ol6-121-rac1) and click the "Start" green arrow icon:

Oracle University and Error : You are not a Valid Partner use only

4. Repeat the same process for the second virtual machine (ol6-121-rac2) as soon as VirtualBox returns control to your mouse:

5. Align the two virtual machines on your desktop:

6. Connect as the "oracle" user on both nodes. Note: If you are running this practice in a physical classroom and have access to a real workstation, you can use the terminal shells inside the virtual machines. If, on the other hand, you are in an LVC environment where you are connected to the workstation over an Internet connection, it is better to open an ssh session from your client computer to the remote machine, and another ssh session to the virtual machine managed by VirtualBox. The amount of flickering during screen refreshes soon renders the environment unworkable. An ssh terminal window is under those circumstances more reliable.

Oracle University and Error : You are not a Valid Partner use only

Verifying the RAC configuration

7. Open a terminal on the host computer (remember, host computer, not any of the virtual machines) and perform some ping and nslookup operations to verify that networking is operating optimally. You want to make sure that the SCAN address is properly resolved through nslookup, and that you can ping the virtual machines:

[OS prompt]$ nslookup ol6-121-scan Server: 192.168.56.1 Address: 192.168.56.1#53

[OS prompt]$ ping ol6-121-rac1

PING ol6-121-rac1.localdomain (192.168.56.101) 56(84) bytes of data.

64 bytes from ol6-121-rac1.localdomain (192.168.56.101):

icmp_seq=1 ttl=64 time=0.519 ms

64 bytes from ol6-121-rac1.localdomain (192.168.56.101):

icmp_seq=2 ttl=64 time=0.120 ms

64 bytes from ol6-121-rac1.localdomain (192.168.56.101):

icmp_seq=3 ttl=64 time=0.123 ms

^C

--- ol6-121-rac1.localdomain ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2725ms rtt min/avg/max/mdev = 0.120/0.254/0.519/0.187 ms

[OS prompt]$ ping ol6-121-rac2

PING ol6-121-rac2.localdomain (192.168.56.102) 56(84) bytes of data.

64 bytes from ol6-121-rac2.localdomain (192.168.56.102):

icmp_seq=1 ttl=64 time=1.27 ms

64 bytes from ol6-121-rac2.localdomain (192.168.56.102):

icmp_seq=2 ttl=64 time=0.131 ms

^C

--- ol6-121-rac2.localdomain ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1650ms rtt min/avg/max/mdev = 0.131/0.700/1.270/0.570 ms

[OS prompt]$

Oracle University and Error : You are not a Valid Partner use only

8. If the SCAN was properly resolved via DNS and the public IP address of the virtual machine responded to the ping commands, it is now time to check the private and the virtual IP addresses:

[OS prompt]$ ping ol6-121-rac1-priv

PING ol6-121-rac1-priv.localdomain (192.168.57.101) 56(84) bytes of data.

64 bytes from ol6-121-rac1-priv.localdomain (192.168.57.101):

icmp_seq=1 ttl=64 time=0.442 ms

64 bytes from ol6-121-rac1-priv.localdomain (192.168.57.101):

icmp_seq=2 ttl=64 time=0.178 ms

^C

--- ol6-121-rac1-priv.localdomain ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1580ms rtt min/avg/max/mdev = 0.178/0.310/0.442/0.132 ms

[OS prompt]$ ping ol6-121-rac2-priv

PING ol6-121-rac2-priv.localdomain (192.168.57.102) 56(84) bytes of data.

64 bytes from ol6-121-rac2-priv.localdomain (192.168.57.102):

icmp_seq=1 ttl=64 time=0.381 ms

64 bytes from ol6-121-rac2-priv.localdomain (192.168.57.102):

icmp_seq=2 ttl=64 time=0.149 ms

^C

--- ol6-121-rac2-priv.localdomain ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1418ms rtt min/avg/max/mdev = 0.149/0.265/0.381/0.116 ms

[OS prompt]$ ping ol6-121-rac1-vip

PING ol6-121-rac1-vip.localdomain (192.168.56.103) 56(84) bytes of data.

64 bytes from ol6-121-rac1-vip.localdomain (192.168.56.103):

icmp_seq=1 ttl=64 time=0.130 ms

64 bytes from ol6-121-rac1-vip.localdomain (192.168.56.103):

icmp_seq=2 ttl=64 time=0.094 ms

^C

--- ol6-121-rac1-vip.localdomain ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1853ms rtt min/avg/max/mdev = 0.094/0.112/0.130/0.018 ms

[OS prompt]$ ping ol6-121-rac2-vip

PING ol6-121-rac2-vip.localdomain (192.168.56.104) 56(84) bytes of data.

64 bytes from ol6-121-rac2-vip.localdomain (192.168.56.104):

icmp_seq=1 ttl=64 time=0.261 ms

64 bytes from ol6-121-rac2-vip.localdomain (192.168.56.104):

icmp_seq=2 ttl=64 time=0.146 ms

^C

Oracle University and Error : You are not a Valid Partner use only

2 packets transmitted, 2 received, 0% packet loss, time 1396ms rtt min/avg/max/mdev = 0.146/0.203/0.261/0.059 ms

9. Click the VirtualBox window that contains the first virtual machine (ol6-121-rac1) and open a shell terminal. Repeat all the tests that you performed on the host computer, specifically:

10. Click the VirtualBox window that contains the second virtual machine (ol6-121-rac2) and open a terminal shell. Repeat all the tests that you performed on the host computer and in ol6-121-rac1.

IMPORTANT: If any of the tests fails, either on the host or any of the VMs, contact your instructor and seek help. If any of the network addresses is not reachable, the likelihood of the cluster being operational is very slim.

11. After you have verified that the network that is supporting the cluster is operational, you can assess the state of the cluster from an Oracle Clusterware point of view. Click the

VirtualBox window that contains the first virtual machine (ol6-121-rac1) and open or reuse a terminal shell. In the /home/oracle directory, you find two shell files that set the environment for either the database (db_env) or the grid environment (grid_env). Your shell defines two aliases for grid_env and db_env, which take care of sourcing the shell files, so at the prompt, you just invoke either db_env (if you want to set up the variables to use the database) or grid_env (if you want to have access to the Clusterware

environment). Source the grid_env shell file by entering grid_env and enter the crsctl command, requesting for cluster statistics:

[OS prompt]$ grid_env

[OS prompt]$ crsctl stat res -t

Oracle University and Error : You are not a Valid Partner use only

ONLINE ONLINE ol6-121-rac1 Started,STABLE

Oracle University and Error : You are not a Valid Partner use only

The output shows that all the components of the cluster are fine, except for the database (ora.oggrac.db), which is currently shut down. IMPORTANT: If any of the components of the cluster is in a state different from this output, inform your instructor and seek help, as you will not be able to continue the practice.

12. Click the VirtualBox window that contains the second virtual machine (ol6-121-rac2) and open or reuse a terminal shell. Source the grid_env shell file and submit the crsctl command crsctl stat res -t. Verify the output. All components should show a STABLE status, with the exception of ora.oggrac.db, which has yet to be started.

13. Start the RAC instance OGGRAC. Click the VirtualBox window that contains the first virtual machine (ol6-121-rac1) and open or reuse a terminal shell. Source the db_env shell file and use the srvctl command utility to start the database:

[OS prompt]$ db_env

[OS prompt]$ srvctl start database -d OGGRAC

14. When the control returns to the shell after srvctl executes, you should have a RAC instance up and running. On the host computer, launch Firefox and enter the URL:

https://ol6-121-rac1:5500/em

15. Firefox displays a popup window with the alert that you are requesting an untrusted connection. Select the "I Understand the Risks" option:

Oracle University and Error : You are not a Valid Partner use only

16. The window expands and an "Add Exception" button appears:

17. Click the "Add Exception" button. The "Add Security Exception" window appears:

Oracle University and Error : You are not a Valid Partner use only

18. Click the "Confirm Security Exception" button. The Oracle Enterprise Manager finally appears. Log in as the "system" user (ask your instructor for the password if you do not know it).

19. The OEM main page is displayed:

This last step concludes Practice 4-1. Continue with Practice 4-2.

Oracle University and Error : You are not a Valid Partner use only

Practice 4-2: Configuring DBFS

In document D89113GC10_ag (Page 65-75)