Professional Documents
Culture Documents
Lab Guide
TABLE OF CONTENTS
11gR2 Cluster Management with Enterprise Manager 11g Database Control ........................ 29
12c Cluster Management with Enterprise Manager 12c Database Express .......................... 164
Next step is to check if you have a VirtualBox Host-Only Ethernet Adapter, and the configuration should
be similar to the one in my example: IPv4 address 192.168.56.1,and IPv4 Network Mask 255.255.255.0
(this is the default configuration).
Once you add a VirtualBox Host-Only Ethernet Adapter, a virtual network interface is created on your
host machine, and on a Windows OS it should look like this.
Open Network Connections and see the Status of this adapter, click Details to see the IPv4 configuration
details.
OS oracle oracle
root oracle
Database sys oracle
system oracle
Both virtual machines have Oracle Grid Infrastructure 11gR2 and Oracle Database 11gR2 with Real
Applications Clusters installed and configured. For more information about installed products run Oracle
Universal Installer existing in one of the Oracle Homes available (Grid Infrastructure installer is located in
/u01/app/11.2.0/grid/oui/bin/runInstaller.sh), and click Installed Products.
VirtualBox Host-Only Ethernet adapter is called vboxnet0 in my VirtualBox installation on Linux, and the
Bridged adapter is connected to eth0 which is my Internet connection adapter. Add the shared disks one
by one to the SATA Controller, in the same order as in the following screenshots
Select the disks from the folder where you extracted the SharedDisks.zip archive. Dont forget to make a
copy of these SharedDiskXX.vdi files before, if you want to save an original copy of the virtual machine
image.
This should be the final result for both virtual machines Storage Settings
Note that all SharedDisks on virtual machine RAC1_opt are Shareable. This is mandatory before you can
add them to the RAC2_opt virtual machine, and start both of them.
Otherwise use the Virtual Media Manager and make them Shareable. Detach all SharedDisks from both
virtual machines before, in order to be able to modify them.
You may reduce the memory (down to 1664MB in a very low configuration). This will come also with
performance loss. Please test the configuration before delivering any demo. With low physical memory
configurations is mandatory to decrease the memory allocated to the database instance on both nodes. We
will explain more in detail this topic in a future section of this workshop. With low memory, both nodes will
increase disk I/O, so the performance will depend also on the type of hard drive you have on the physical
machine.
This is what you should see when both machines are started. Depending on your VirtualBox configuration,
once you click inside of any of these consoles, it catches the mouse pointer, and to release it you have to
press the Right Ctrl key on your keyboard (also shown in the status bar lower right corner).
I also got his message at startup: oracleoks: module license Proprietary taints kernel. Kernel tainting
is usually a way of indicating that a proprietary module has been loaded. I mean modules that are not
released under the General Public License "GPL" (or GPL compatible) license, and the source code for the
modules is not freely provided. The kernel developers cannot investigate any problems that are
encountered while the module is loaded, and the kernel is considered tainted.
In summary, ignore this message and continue with Oracle Real Application Clusters 12c discovery.
Click in the console, press Enter, and the login dialog appears: login as oracle/oracle on both machines. In
order to get access to GUI tools, we can connect to both machines using Putty and Xming Server. I will
explain how this works on the following slides.
The easiest way to launch graphical interface tools on the virtual machines is via SSH connection with X11
forwarding. If your host OS is Linux, use an ssh connection with X11 forwarding.
ssh -X <VM_public_IP_address>
I your host OS is Windows, download and install both Putty and Xming Server on your host computer.
Launch Putty and use the public IP address 192.168.56.21, Port 22, for the first node.
Click on the + next to SSH on the Category tree. Select Enable X11 forwarding, and go back to Session on
the Category tree. By enabling X11 forwarding we will be able to launch GUI interface tools on SSH
connections in Putty.
You can give it a name and save it for later use. Lets name this connection RAC1. Click Save, and then
launch Xming Server.
To make sure it is running, check the System Tray, and see if Xming icon is there. Now you may go back to
Putty Configuration window and click Open.
or
Login as oracle/oracle, and launch Mozilla Firefox.
It will appear in a new window, and to make sure it is running on the RAC1 virtual machine, you may
browse the /u01/app folder.
In my case I am using a third virtual machine, called ph_host0, running in the same VirtualBox environment
as my two RAC nodes. The password for user oracle is oracle.
Before installing other products, check the available space on the main disk, on both nodes, using the
command df -h. If necessary, increase the size of the main disk, for both machines.
In the original configuration, I set the values for most of the resources to minimum, but in many cases we
may need to increase some of those values, as the size of the main disks for example. This will allow us to
install more products in /u1/app folder, or add more files in Oracle home folder, for various purposes.
Select the virtual machine you want to modify first, and click Settings. I will perform all steps on RAC2_opt
virtual machine. On the other node the steps are identical.
We need to remove the main disk before editing its attributes. We may remove just the main disk, or all
disks, as I did in the example, and then re-add them keeping their original order in SATA Controller.
If the disk has a VMDK disk file type, we have to convert it to VDI, using Virtual Media Manager. The best
way is to make a copy.
We should name it the same as the original disk to avoid confusion, just adding the .vdi extension at the
end.
When finished, we may remove the VMDK disk from Virtual Media Manager, including the file, to avoid any
confusion and redundant data on disk.
Now we edit the same virtual machine again, and add the new VDI disk copy as the main disk.
Next step is to open a Terminal window, go to the folder where disk files are stored, and execute:
VBoxManage modifyhd RAC2_opt-disk1.dvi --resize 81920
The values for the new size are in MB. In my case, 81920 means 80GB.
You should see the new size of the disk, in Storage section. If new attributes do not refresh automatically,
restart VirtualBox console.
Use the same process to increase the virtual disk size for the second virtual machine. When finished
changing the virtual disks sizes in VirtualBox, add the rest of disks (shared disks), and start both machines.
Login on the machines directly, or via SSH (I use a SSH connection). I will perform all steps on RAC1_opt
machine first, and then repeat the entire process on the second node. First check the disk size and existing
partitions on the main disk.
fdisk l /dev/sda
Then we change our new partitions system id with the same value as sda2, 8e, the code for Linux LVM. In
the end we write the partition table to disk.
Now we may check the disk size and existing partitions on the main disk again. We need to reboot,
because the kernel is still using the old table (see the WARNING).
After reboot, we reconnect to the virtual machine and continue, creating a physical volume on /dev/sda3,
used later to extend the volume group.
We use the vgdisplay command to check the name of our volume group.
Next we add the newly created physical volume of /dev/sda3 to our volume group vg_rac1. With pvscan
command we can scan all physical volumes, and see our newly created physical volume /dev/sda3.
We use the lvdisplay command to check the name of our logical volume. Then, logical volume is then
extended using the lvextend command.
The last step is to resize the filesystem on-line with resize2fs, so that it can use the extra space we added,
and check the new values for free space on disk with df -h. For the other node, the procedure is identical.
To check the environments and Oracle Homes available on each node you may look in /etc/oratab. On
RAC2 we have +ASM2 which is the Grid Infrastructure, and flavia, which is the Cluster Database. In one
Oracle Home more than one product may exist.
To manage cluster resources from the command line, we can use either Server Control (SRVCTL) or
Cluster Ready Services Control (CRSCTL). When the grid environment is set up, we may check the status
of all resources running in the Clusterware, with crsctl stat res -t. Here we can see that the ASM has
started and the disk groups are mounted on both nodes, the status of all listeners, including SCANs, is
ONLINE, and the nodes on which they are running.
Still, the Cluster Database is no open on both nodes. This may take a while, depending on the resources
available for the virtual machines. Repeat the command until the Clustered Database ora.flavia.db is
Open on both nodes.
After the database is started, is useful to check the memory utilization. Depending on the initial memory
configuration, a low value may be our enemy, once the OS will start create too much swap.
For low memory, below 2048 MB per node, check the Swap used. Once it gets close to the total available,
the disk may start running for long periods, and the cluster may crash. If this happens, you need more
memory per node. Do the same on the other node.
Another way to check the reliability of the memory configuration is by executing the iostat command. With
low memory configurations, the system will use more the hard disk, and this may generate an I/O
bottleneck.
Immediately after the cluster is started, until all processes are started and the information updated at
engine level, we may experience a high %iowait, over 30%, which is not positive for the performance.
Repeat the command to see how %iowait decreases once the cluster stabilizes. Ideally is to have an
%iowait below 30%.
Once it started on both nodes, it gives the URL to the management console using the hostname. Unless
we specify this hostname in our /etc/hosts file, we will use the public IP address of RAC1 to access the
console.
Launch the web browser on your computer and connect to Enterprise Manager 11g Database Control. The
URL is https://192.168.56.21:1158/em
In the screenshot Im using the third virtual machine (running on the same VirtualBox server as RAC1 and
RAC2), but you may use the browser on your physical computer, all connection details are the same.
We may use also the SCAN IP address for the Enterprise Manager URL, only those running on RAC1. To
be able to check it, we need to set the grid environment. In this case for example SCAN2 and SCAN3 are
running on RAC1.
Or SCAN3 IP. If the URL havent been used in the browser before, we get this page which alerts us on
connecting to some untrusted URL over https. Click I understand the Risks and confirm the security
exception.
Here we have the console accessed using SCAN2 IP address in the URL.
The user is sys, and the password oracle. The main component of this cluster is the Cluster Database
flavia.mlg.oracle.com. Well have a look at all the console tabs of this target.
At the bottom of the Performance tab, there are other tabs where we can check the activity of each
instance of the Cluster Database.
Lets check the I/O to see what core functions are running.
To see more in detail the activity on the database, we will make a drill-down into Top Activity using the
Additional Monitoring Links.
Here we can see the top SQL sentences, and the top sessions currently running. Go back at the
Additional Monitoring Links and click SQL Monitoring.
This tool offers more details about every SQL sentence executed on the database.
Click on Cluster Database: flavia.mlg.oracle.com link in the breadcrumbs to go back to the main
console. Next tab is Availability. Lets check the Recovery Settings.
Go up and click on Cluster Database: flavia.mlg.oracle.com link in the breadcrumbs to go back to the
main console. Next tab is Server. All performance data for this database is stored in Automatic Workload
Repository.
You may not have too many snapshots, depending on the uptime. Click on the link which specifies
Snapshots number.
Select one snapshot and View Report in Actions drop-down list, and click Go. Make sure there is another
snapshot following, taken one hour after this one, with no downtime in between.
Select the immediate following snapshot, taken after one hour from the snapshot selected in the previous
step, and click OK.
When finished analyzing the report, click on Cluster Database: flavia.mlg.oracle.com link in the
breadcrumbs to go back to the main console. Open the Server tab, and click on Datafiles under the
Storage section. These are the datafiles currently existing in our Cluster Database.
Click on Cluster Database: flavia.mlg.oracle.com link in the breadcrumbs to go back to the main
console. Open the Server tab, and click on Automated Maintenance Tasks under the Oracle Scheduler
section. Lets configure the Automated Maintenance Tasks.
We will enable Automatic Implementation of SQL Profiles. Click Apply in the end.
Click on Cluster Database: flavia.mlg.oracle.com link in the breadcrumbs to go back to the main
console. Open the Server tab, and click on Getting Started under the Resource Manager section.
Click on Cluster Database: flavia.mlg.oracle.com link in the breadcrumbs to go back to the main
console. Lets see how a new instance is added. Open the Server tab, and click on Add Instance under
the Change Database section.
This is the wizard that guides through the entire process - Cluster Credentials: oracle/oracle; ASM
Credentials: sys/oracle as sysdba.
Before adding a new database instance, we need another virtual machine in the cluster. Well add this
later, for now just click Cancel.
Click Data Movement tab and explore all features available here.
Click Software and Support tab and explore all features available here.
Click on Cluster tab in the very first set of tabs. Have a look at all the console tabs, in the second set.
Click Targets tab. These are the targets which comprise this cluster. We will check each one of them
individually.
In the Administration tab we can access the cluster Resource Manager by clicking Manage Resources.
Click Show Oracle Resources to see the basic resources of the cluster.
Go up and click Cluster: mlg-rac link in the breadcrumbs of this page, and continue with the
Interconnects tab.
Click on the link rac1.mlg.oracle.com link in any of the tables on this page. This is one of the Host
components of this cluster. Well have a look at all the console tabs of this target.
In order to use the Administration tab we need to install YAST2 package on the operating system of our
nodes. Well do this in a later session.
In Configuration tab we have all the details about the hardware and Oracle software installed on this host.
Go back to Cluster > Targets tab, and click on LISTENER_rac1.mlg.oracle.com link. This is one of the
Listener components of this cluster. Well have a look at all the console tabs of this target.
Click on Cluster in the very first set of tabs. Then open Targets in the second set of tabs, and click on
LISTENER_SCAN2_mlg_rac target. This is one of the SCAN Listener components of this cluster. Well
have a look at all the console tabs of this target.
Click on Cluster in the very first set of tabs. Then open Targets in the second set of tabs, and click on
+ASM_rac2.mlg.oracle.com target. This is the ASM instance running on node RAC2. Well have a look at
all the console tabs of this target.
Go to Disk Groups tab, and click on diskgroup DATA to open the console for the Disk Group target.
This is one of the Disk Groups we have on this cluster. Well have a look at all the console tabs of this
target.
This is one of the Disk Groups we have on this cluster. Well have a look at all the console tabs of this
target.
Go to Templates tab.
Go to Files tab, and click on blue arrows to expand the folder structure until you see some of the files
stored on the Disk Group, and their attributes.
The last tab is ASM Cluster File System. On this configuration we dont have any file system with these
characteristics.
We will create and empty tablespace for the SOE schema we will generate later. SOE schema is the
sample schema used by Swingbench, our workload generation tool.
DiskGroup: DATA
File Size: 100 MB
Validate Automatically extend datafile when full (AUTOEXTEND) check box.
Increment: 50 MB
Click OK.
Now we have to generate the sample data that Swingbench will use to run the workload.
For Linux: Go to the bin folder of your Swingbench application. Execute ./oewizard
For Windows: Go to the winbin folder of your Swingbench application. Execute oewizard.bat
Validate Use Partitioning check box if you want your tables to be partitioned.
Make sure the Schemas Tablespace is SOE.
Select User Defined Scale radio button, and type 0.3 in the text field. Make sure OrderEntry tablespace
size does not overpass 1.0 GB. If it does, decrease the User Defined Scale.
Now we can launch Swingbench and generate the workload on our Cluster Database.
For Linux: Go to the bin folder of your Swingbench application. Execute ./swingbench
For Windows: Go to the winbin folder of your Swingbench application. Execute swingbench.bat
In the User Details tab, under the first group of tabs, set the following:
Username: soe
Password: soe
Connect String: 192.168.56.92:1521/flavia.mlg.oracle.com
In the Connect String we may use the IP address of any of the SCAN Listeners
In the Load tab, under the second group of tabs, set the following:
Number of Users: 10
Min. Delay Between Transactions (ms): 1,000
Max. Delay Between Transactions (ms): 2,000
Click the green Play button to Start Benchmark Run.
Go back to Enterprise Manager console. Click on Database in the very first set of tabs. Then open Server
in the second set of tabs. Click on Tablespaces under Storage section. Check the size of the SOE
tablespace. Click on the SOE link to drill down into more details about this tablespace.
Click on the Performance tab to check the charts and other performance values while the Swingbench
workload is running.
Click on the Instances tab to see the workload running on each one of the RAC instances.
Click on flavia.mlg.oracle.com_flavia2 instance name to drill down into the Performance console of that
particular Database Instance. From here you may switch between the instances using the Switch
Database Instance drop-down list.
Let drill down into the workload executed on this Database Instance. Click on Top Activity.
You may use to moving window in the top chart to get Top SQL and Top Sessions information in the two
reports below.
Here you may also switch between the instances using the Switch Database Instance drop-down list.
Click on one SQL ID in the Top SQL report to drill down into execution details on that particular sentence
Lets simulate a node failure. Go to RAC2 node connection, or open a new connection with SSH, login as
root/oracle, and execute the halt command. This will bring down the entire RAC2 virtual machine. The
connection is closed due to server shutdown procedure.
After a couple of minutes, depending on your virtual machines performance, on RAC1 node well check the
status of the cluster resources. Set the grid environment first. Then execute: crsctl stat res t. The
response should look like this.
The Swingbench application should continue to run, with some connections closed due to node failure.
Go back to Enterprise Manager console. Click on Cluster in the very first set of tabs. Click on Refresh until
you get the current status of the cluster: 1 node up, 1 node unreachable.
Open the Targets tab and check the status of all the cluster components.
Click on Database in the very first set of tabs. We get the same information: one instance is down.
Stop the Swingbench workload execution by clicking the red Stop button under the main menu.
Start up the RAC2_opt virtual machine, and wait until its reachable. Connect to RAC2 node using SSH,
and credentials oracle/oracle.
After a couple of minutes, depending on your virtual machines performance, on RAC1 node well check
again the status of the cluster resources.
Repeat the command execution until all resources are online on the appropriate cluster nodes.
Go back to Enterprise Manager console. On the Database tab we see that both nodes are up.
In the Instances tab below we see now that both instances are up.
To be able to fully monitor all the targets on the RAC2 node, we need to star the Enterprise Manager 11g
Database Control agent with the command: emctl start dbconsole. Set the environment first.
Go back to Enterprise Manager console. Click on Cluster in the very first set of tabs.
Storage Management
The first operation is to add new shared disks to the virtual machines, that will be later used to create new
disk groups, or to increase capacity of existing ones. Open Oracle VM VirtualBox Manager, select one of
the virtual machines, and click Settings.
Click Add Hard Disk icon on the same SATA controller where the rest of the disks are.
Select Fixed size. This attribute is mandatory if you want to make a disk Shareable in VirtualBox. That
means all the space will be allocated when disk is created, so make sure you have the necessary space on
your hard drive. All ASM disks have to be Fixed sized and Shareable.
Choose a location where you want the virtual disk to be created. If you plan to use these disks in a Normal
Redundancy ASM Disk Group, it is recommended to create smaller disks. ASM will reserve the amount of
the biggest disk in order to restore redundancy after a disk failure, by re-creating the lost data in another
failure group. I recommend you to specify no more than 4.00 GB as Size at this step (same size as the
other disks we already have in ASM disk group DATA).
Well temporary remove all newly created disks we just added, so their attributes can be changed.
Well use Virtual Media Manager to change the attributes for the new disks.
When finished, well re-add the new disks to both nodes, selecting Choose existing disk at the first step.
Connect to both nodes via SSH with X11 forwarding. In my case I am using a third virtual machine, called
ph_host0, running in the same VirtualBox environment as my two RAC nodes. If your VirtualBox
environment is running on Windows, you may use Putty with Xming Server.
Login to first node with credentials oracle/oracle, and check the new disks. You can see that user oracle
and group dba already owns them.
I have added these lines in 50-udev.rules file in /etc/udev/rules.d folder. If a new disk you add does not
have a line in this file to specify that user oracle, group dba owns the disk, it cannot be added to any ASM
disk group. Please check /etc/udev/rules.d/50-udev.rules and add the corresponding lines.
Note: I added here some lines in advance, so I can add new disks without worrying about user/group
permissions.
Set up the Oracle Grid Infrastructure environment, and check the status of the resources. The cluster
database ora.flavia.db should be Open on both nodes.
Login into Enterprise Manager Database Control using sys/oracle as SYSDBA credentials. At the bottom
of the first page, click on +ASM1_rac1.mlg.oracle.com link.
Go to Configuration tab.
After any modifications, click Apply, and then go to Disk Groups tab.
At the bottom of the page, where the list of Member Disks is, click Add.
Select the disks you want to add, and click OK. Specify ASM Disk Name similar to the existing disks, and
an already existing Failure Group (DATA_0001, DATA_0002, or DATA_0003). For Normal Redundancy,
a minimum of 2 failure groups are required (2 failure groups are enough to avoid unnecessary
redundancy).
Note: If you want to re-add a disk that previously was member of a disk group and removed for any reason,
you have to clean the disk header before with the command (on any of the nodes; replace X with the
appropriate disk letter):
dd if=/dev/zero of=/dev/sdX bs=1024 count=100
Copyright 2013, Oracle and/or its affiliates. All rights reserved 100
Oracle Database 11gR2/12c Real Application Clusters
Check the Member Disks list, and focus on the Used (GB) and Used (%) for all disks.
After some minutes, refresh the page and check those values again. ASM automatically redistributes data
evenly across all drives in the disk group.
Lets see how we can add new disks using the graphical console of Oracle ASM Configuration Assistant.
Launch ASMCA in the terminal window, connected to one of the nodes via SSH, with X11 forwarding, or
using Putty and Xming Server.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 101
Oracle Database 11gR2/12c Real Application Clusters
Oracle ASM Configuration Assistant (ASMCA) supports installing and configuring Oracle ASM instances,
disk groups, volumes, and Oracle Automatic Storage Management Cluster File System (Oracle ACFS).
Right click on one of the Disk Group Names, and select Add Disks.
I have no available disks to add, though the process is straight forward: select the disk, and optionally
specify Disk Name and Failure Group.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 102
Oracle Database 11gR2/12c Real Application Clusters
Lets see now how a new disk group is created using the graphical console of Oracle ASM Configuration
Assistant. Set up the Grid environment, and launch ASM Configuration Assistant.
Click Create.
Name the Disk Group DATA12c, choose External (None) for Redundancy, and select the disks you want
to add from Show Eligible disks list. Click OK.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 103
Oracle Database 11gR2/12c Real Application Clusters
Select the new Disk Group DATA12C, and click Mount All.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 104
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 105
Oracle Database 11gR2/12c Real Application Clusters
Memory Management
From the physical machine, on which Oracle VirtualBox server is running, or a third virtual machine running
on the same VirtualBox server as RAC1 and RAC2, connect to both nodes using SSH. I am using a third
virtual machine, called ph_host0, running in the same VirtualBox environment as my two RAC nodes. If
your VirtualBox environment is running on Windows, you may need an SSH client, like Putty.
Login to first node via SSH. The password for user oracle is oracle. Set up the Oracle Grid Infrastructure
environment.
Check the status of the resources. The cluster database ora.flavia.db should be Open on both nodes.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 106
Oracle Database 11gR2/12c Real Application Clusters
Login into Enterprise Manager Database Control using sys/oracle as SYSDBA credentials
At the bottom of the first page, click on flavia.mlg.oracle.com_flavia2 database instance link.
Go to Server tab, and click on Memory Advisors link under Database Configuration.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 107
Oracle Database 11gR2/12c Real Application Clusters
Go at the bottom of this page and set 256 for Total SGA Size (MB) and also for the Maximum SGA Size
(MB). Click Apply when finished.
Note: In some cases it is not possible to make drastic memory reductions, try reduce it incrementally with
smaller amounts, on both nodes, alternatively.
After you make memory changes, the database has to be restarted. You may choose not to restart the
database, make the changes on both nodes, and then restart the ora.flavia.db resource on both nodes,
using the commands:
crsctl stop res ora.flavia.db
crsctl start res ora.flavia.db
Or, you can choose to restart the database, and click Yes.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 108
Oracle Database 11gR2/12c Real Application Clusters
Go to the SSH connection to one of the nodes, set the Grid environment variables, and execute crsctl stat
res -t to check the status of the targets. The instance for which we just made the changes in the previous
step has the state Instance Shutdown.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 109
Oracle Database 11gR2/12c Real Application Clusters
Re-execute the command until both instances are Open. Now you may continue making changes on the
other instance, or other operations.
Repeat all the steps on the second instance, from the click on the database instance link at the bottom of
the first page of Enterprise Manager.
When we rich a memory configuration that satisfies our need, we may re-enable the Automatic Memory
Management. For that, login using sys/oracle as SYSDBA on Enterprise Manager, click on the database
instance link at the bottom of the first page, go to Server > Memory Advisors. Click Enable next to
Automatic Memory Management.
Set a value for for both Maximum Memory Size and Total Memory Size for Automatic Memory
Management. Do not use a value less than 256MB.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 110
Oracle Database 11gR2/12c Real Application Clusters
You will be asked again if you want to restart the database to invoke the static parameter(s). Click Yes if
you want to restart, or No if you want to restart the database service later using crsctl command.
Now we will change the memory settings for Automatic Storage Management instances. Before we can
alter the memory of our ASM instances, we need to stop some resources on the cluster, most important the
databases using the ASM instances to store data.
Then we connect to the first instance (set the environment with oraenv), and check the current memory
configuration.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 111
Oracle Database 11gR2/12c Real Application Clusters
The objective is to reduce memory usage to 256 MB per ASM instance. Here are the sqlplus commands I
used to achieve it:
alter system set memory_target=0 scope=both sid=+ASM1;
alter system set pga_aggregate_target=44M scope=both sid=+ASM1;
alter system set sga_target=212M scope=both sid=+ASM1;
First we disable the Automatic Memory Management. Then we set the PGA to 44MB and the SGA to
212MB (total 256MB). This should be enough for both ASM instances. Then check again the memory
target values.
Ignore the parameter memory_max_target. It will show the correct new value after asm instance is
restarted. Restart the first instance so changes can take effect.
srvctl stop asm n rac1 f
srvctl start asm n rac1
Copyright 2013, Oracle and/or its affiliates. All rights reserved 112
Oracle Database 11gR2/12c Real Application Clusters
Repeat the process on the second node. When finished, start all cluster resources stopped in the beginning
of this part. Changing the parameters on one instance, restart it to apply them, and then go to the next
instance is called Rolling Mode, and it allows you to keep the database running during the entire process.
Please give it a try, and see how it works.
To check if your internet connection works, just try to get the content of a usual web page
wget www.oracle.com
Copyright 2013, Oracle and/or its affiliates. All rights reserved 113
Oracle Database 11gR2/12c Real Application Clusters
In this screenshot I receive an error message Unable to connect to dbus. This is due to refresh-
packagekit that sends a dbus message to reload packages lists. To avoid it, use:
yum --disableplugin=refresh-packagekit install oracle-rdbms-server-12cR1-
preinstall.x86_64
We install oracle-rdbms-server-12cR1-preinstall on the second node too. Use the same commands. We
will do the same with the rest of the packages, so please repeat all steps on the second node when
finished on the first one.
All these packages will be required for future installations. We will upgrade 64bit ones (libXext.x86_64
libXtst.x86_64 libX11.x86_64 libXau.x86_64 libxcb.x86_64 libXi.x86_64) and install all 32bit.
yum upgrade libXext.x86_64 libXtst.x86_64 libX11.x86_64 libXau.x86_64
libxcb.x86_64 libXi.x86_64
Copyright 2013, Oracle and/or its affiliates. All rights reserved 114
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 115
Oracle Database 11gR2/12c Real Application Clusters
To make sure the cluster has sufficient temporary file storage, we need to increase the tmpfs size to at
least 2 GB. Due to some bugs in Red Hat Linux 6, inherited by Oracle Linux 6, we cannot specify it in
/etc/fstab. My choice was to add two lines inside Oracle High Availability Services startup file
/etc/init.d/init.ohasd:
# increase tmpfs
mount -o remount,size=2G /dev/shm
Add these lines as root, on both nodes. To make the changes effective immediately, you may execute the
mount command as root (second line).
Copyright 2013, Oracle and/or its affiliates. All rights reserved 116
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 117
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 118
Oracle Database 11gR2/12c Real Application Clusters
When asked to configure Grid Infrastructure Management Repository, I recommend selecting No for the
demo, if you are low on disks space, and want to save some of it on the ASM disks. We will not use Grid
Infrastructure Management Repository in any of the following steps of this workshop.
Oracle recommends that you create a Grid Infrastructure Management Repository. This repository is an
optional component, but if you do not select this feature during installation, then you lose access to Oracle
Database Quality of Service management, Memory Guard, and Cluster Health Monitor. You cannot enable
these features after installation except by reinstalling Oracle Grid Infrastructure.
(Oracle Grid Infrastructure Installation Guide 12c Release 1)
Copyright 2013, Oracle and/or its affiliates. All rights reserved 119
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 120
Oracle Database 11gR2/12c Real Application Clusters
On a production cluster we actually need different groups for OSASM, OSDBA, and OSOPER. For demo
purposes I selected the same group for all of them. Although, the groups are created on the OS, so you
may test the installation with different groups.
The previous version of Grid Infrastructure software was installed as root, and oracle user cannot create
the necessary folders.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 121
Oracle Database 11gR2/12c Real Application Clusters
Go to the terminal, login as root, and create folder 12.1.0 in /u01/app. Then set oracle:oinstall as owner.
Repeat the operation on RAC2.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 122
Oracle Database 11gR2/12c Real Application Clusters
Set different batches for each node to make the installer execute root script on one node at a time.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 123
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 124
Oracle Database 11gR2/12c Real Application Clusters
When asked to confirm the execution of configuration scripts as root, click Yes.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 125
Oracle Database 11gR2/12c Real Application Clusters
Because we separated this execution in two different batches, it will ask for confirmation before executing
the next batch.
Click Continue.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 126
Oracle Database 11gR2/12c Real Application Clusters
Click Details, and copy the log file complete path. Switch to the terminal window and read that log file using
more command.
Lets check the log and see why Cluster Verification Utility failed. Name resolution fails because I have
another RAC configuration in my demo environment, on the public network with different IP class, using
the same alias for SCAN IP addresses. You should not get this error message. For the purpose of the
demo we will ignore this error. I left this in the process just to show how to check errors that might appear
during the installation.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 127
Oracle Database 11gR2/12c Real Application Clusters
Click Next.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 128
Oracle Database 11gR2/12c Real Application Clusters
I will confirm also that I want to skip the failed configuration steps. You may not see this message.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 129
Oracle Database 11gR2/12c Real Application Clusters
The first things we do after the installation is to check /etc/oratab file for new entries, and their associated
Oracle Home. If you chose to install a Grid Infrastructure Management Repository, you will see MGMTDB
entry, which is the database for this repository. You will see this database also running as a resource on
the Oracle Clusterware.
What we are more interested to see in this file is the new Oracle Home for the ASM instance, which is
actually the Oracle Home for the new Grid Infrastructure we just upgraded. Notice the name of the folder
changed, showing the current version 12.1.0. Check the status of all cluster resources executing
crsctl stat res -t
Copyright 2013, Oracle and/or its affiliates. All rights reserved 130
Oracle Database 11gR2/12c Real Application Clusters
Set the database environment, and launch Enterprise Manager 11g Database Control on both nodes.
emctl start dbconsole
Copyright 2013, Oracle and/or its affiliates. All rights reserved 131
Oracle Database 11gR2/12c Real Application Clusters
Go to Cluster tab. Due to changes to ORACLE_HOME path and configuration files location for some
resources, after the upgrade we may get some Metric Collection Errors. Click on the error link if you want
to see more details.
Before fixing anything, we bounce both nodes to make sure there are no pending changes waiting for the
next reboot.
After reboot, check that all cluster resources are up and running, and then start the Enterprise Manager
Database Control on both nodes.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 132
Oracle Database 11gR2/12c Real Application Clusters
Login using sys/oracle as SYSDBA. Click Cluster tab. Click Monitoring Configuration at the bottom of
the page, under Related Links.
Click OK.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 133
Oracle Database 11gR2/12c Real Application Clusters
Back on Enterprise Manager, click on Database tab, and then on +ASM2_rac2.mlg.oracle.com at the
bottom of the page, under Instances.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 134
Oracle Database 11gR2/12c Real Application Clusters
Click Monitoring Configuration at the bottom of the page, under Related Links.
Make sure that Oracle home path is /u01/app/12.1.0/grid (new Grid Infrastructure home), and click Test
Connection.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 135
Oracle Database 11gR2/12c Real Application Clusters
On Cluster > Targets tab, we still have to check the listeners configuration, as they all appear as Down
after Grid Infrastructure upgrade. Click Setup link at the top of the page.
Click Agents.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 136
Oracle Database 11gR2/12c Real Application Clusters
Select one of the listeners under Monitored Targets, and click Configure.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 137
Oracle Database 11gR2/12c Real Application Clusters
Repeat last four steps for all listeners in the mlg-rac cluster. This should be the final result.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 138
Oracle Database 11gR2/12c Real Application Clusters
Note: If everything works fine, as root, you may delete the old Grid Infrastructure folder /u01/app/11.2.0, to
free up some space on the main disk.
Unzip both downloaded files in the same folder, and launch runInstaller.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 139
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 140
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 141
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 142
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 143
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 144
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 145
Oracle Database 11gR2/12c Real Application Clusters
Well choose claudia.mlg.oracle.com for the Global database name. The other text field gets its value
claudia automatically.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 146
Oracle Database 11gR2/12c Real Application Clusters
Set the Allocate memory to the lowest value possible. Depending on the available resources on your
virtual machines, you may set a higher value. I will come back to memory settings when well prepare the
Cluster Database for a Swingbench workload execution. Check the other tabs before clicking Next.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 147
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 148
Oracle Database 11gR2/12c Real Application Clusters
Check the box to Create database with sample schemas. The sample schemas will be available in the
Pluggable database PDB_C01.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 149
Oracle Database 11gR2/12c Real Application Clusters
Skip the Register with Enterprise Manager (EM) Cloud Control and Enable Recovery steps.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 150
Oracle Database 11gR2/12c Real Application Clusters
Select an empty Disk Group with at least 6.5GB of Available space. The disk group may be shared, but
only with another 12c Database as it requires the attribute of ASM Compatibility set to 12.1.0.0.0. If its
lower, it will be changed during the installation process.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 151
Oracle Database 11gR2/12c Real Application Clusters
I used the same password for the entire workshop oracle. It does not conform to the Oracle
recommended standards, but for demo purpose it is ok.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 152
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 153
Oracle Database 11gR2/12c Real Application Clusters
If should not get this failure during minimum requirements checks. I get it because I have multiple RAC
environments on the same network with the same SCAN names. It may be ignored, and click Next.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 154
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 155
Oracle Database 11gR2/12c Real Application Clusters
Run this script as root on both nodes, one at a time, in the specified order.
When asked, leave the default local bin directory, just press Enter. Same on RAC2.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 156
Oracle Database 11gR2/12c Real Application Clusters
During Oracle Database configuration step, if you receive an error related to ASM Disk Group compatibility
attribute, do not abort the installation. Make sure you have selected an empty Disk Group for the 12c
Database creation. Then go to the terminal window of one of the nodes, set the Grid environment, and
launch ASMCA. Select the Disk Group where you want to create the 12c Database, right-click, and choose
Edit Attributes. Set value of ASM Compatibility to 12.1.0.0.0, and click OK. Close ASMCA, go back to
the installation process and click Retry.
Optionally click Password Management to set the default password for one or more user accounts in the
database.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 157
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 158
Oracle Database 11gR2/12c Real Application Clusters
After the installation, you may check cluster resources and their status.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 159
Oracle Database 11gR2/12c Real Application Clusters
Optionally we may stop the 11gR2 Cluster Database to leave more computing resources available for the
new 12c one. This is done with the command
crsctl stop res ora.flavia.db
Copyright 2013, Oracle and/or its affiliates. All rights reserved 160
Oracle Database 11gR2/12c Real Application Clusters
Before continuing with the discovering and further testing, it is very important to perform a memory
configuration. This is the minimum configuration that worked well on my environment during the tests. In
the following screenshots you will find more details about how to change these values.
A very easy way to connect to one of the RAC instances is to set the environment for the Cluster Database,
and then export the environment variable ORACLE_SID using the name of the database instance. After
that you just need to run sqlplus / as sysdba. You may check the instance name and the parameters you
want to modify before performing the changes.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 161
Oracle Database 11gR2/12c Real Application Clusters
In this screenshot I modified (using the same value) the parameter SHARED_POOL_RESERVER_SIZE
and applied the changes only in the Spfile and just for the first instance, claudia1. Some of the parameters
will allow you to change the value also in memory, and for both instances at the same time (using
scope=both and without any value for sid). In order to be sure that all the changes are permitted, you may
use this formula. Execute the commands on all instances.
When finished, we need to restart ora.claudia.db resource on all nodes, so changes can take effect. You
may re-check the values.
Make sure you repeat the same procedures on the second instance, if you use the sid argument.
Our PDB called PDB_C01 is Mounted. By default, Oracle Database 12c does not open the PDBs
automatically at startup.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 162
Oracle Database 11gR2/12c Real Application Clusters
In order to set a Pluggable Database to be opened automatically at startup, we need to create a trigger.
Use this code to open all Pluggable Databases, or change it to open the ones you need.
CREATE or REPLACE trigger OPEN_ALL_PLUGGABLES
after startup
on database
BEGIN
execute immediate alter pluggable database all open;
END open_all_pdbs;
/
Exit from SQLplus, set the Grid environment, and re-bounce ora.claudia.db resource.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 163
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 164
Oracle Database 11gR2/12c Real Application Clusters
Launch Enterprise Manager Database Express 12c, and login using sys/oracle as sysdba credentials.
When it gets to load Resources area, you will notice a long delay.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 165
Oracle Database 11gR2/12c Real Application Clusters
Dont worry, this is a perfect opportunity to see how patches can be applied in Online mode, which means
no downtime for the database.
To fix this we have to apply Patch 16527374 EM EXPRESS HOME GOT IO ERROR, available on My
Oracle Support. Download the patch on one of the nodes, launching Mozilla using a SSH connection with X
Server support. Or download the patch on your host computer, place it in a Shared Folder, and then mount
it on one of the nodes.
mount t vboxsf o uid=oracle SharedFolderName /mnt
In my case, I downloaded the patch on the host machine, and added the folder as Shared Folder to the
RAC1_opt virtual machine (VirtualBox Settings) under the name Downloads. Make sure you are
connected as root when you mount the Shared Folder. Logout from root connection for the rest of the
process.
Copy the patch to Oracles home, or unzip it there in the mounted Shared Folder.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 166
Oracle Database 11gR2/12c Real Application Clusters
I recommend to read the Read Me file for this patch on My Oracle Support before continuing. The apply
process has some prerequisites, and I will detail here just the ones valid for my configuration: the $PATH
environment variable should include the $ORACLE_HOME/Opatch folder, and we need to verify the
Oracle Inventory.
In this Oracle Home we have just one product installed, Oracle Database 12c (12.1.0.1.0), and there are
no other patches, this is the first one to be installed. It also notifies us that this is a RAC database with
multiple nodes.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 167
Oracle Database 11gR2/12c Real Application Clusters
We will apply the patch in Online mode, with no downtime, on both nodes, using this command, executed
from the patch folder we just unzipped:
opatch apply online connectString
claudia1:oracle:oracle:rac1,claudia2:oracle:oracle:rac2
You can find the entire command explained in the Read Me file.
If everything was done correctly, you should get OPatch succeeded message.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 168
Oracle Database 11gR2/12c Real Application Clusters
Now you may launch Enterprise Manager Database Express 12c again, and login using sys/oracle as
sysdba credentials.
Everything works now. Notice in the upper left, at the beginning of the main menu, that we are connected to
CLAUDIA (12.1.0.1.0 CDB RAC), which means CDB$ROOT Container Database. Lets take a tour and
see what we have here.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 169
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 170
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 171
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 172
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 173
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 174
Oracle Database 11gR2/12c Real Application Clusters
You will notice that sample schema users are not shown in Common Users list. They are located in the
Pluggable Database. Click Security > Profiles.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 175
Oracle Database 11gR2/12c Real Application Clusters
I use a low resolution desktop, so I need to scroll in order to show all the graphs and diagrams on this
interactive page.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 176
Oracle Database 11gR2/12c Real Application Clusters
You may place the mouse pointer on any element of these graphs to get more details. The lower part of the
page has a set of tabs which gives even more monitoring and diagnostic information.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 177
Oracle Database 11gR2/12c Real Application Clusters
You may also use the interactive dropdown menus to change the metrics.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 178
Oracle Database 11gR2/12c Real Application Clusters
Monitored SQL report offers more details at mouse over, or a drill down report when clicking on SQL IDs.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 179
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 180
Oracle Database 11gR2/12c Real Application Clusters
Click on Alternative Plan link to see the execution plan. This is the Graphical representation of the plan.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 181
Oracle Database 11gR2/12c Real Application Clusters
Click on CLAUDIA (12.1.0.1.0 CDB RAC) button to go back to the main page.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 182
Oracle Database 11gR2/12c Real Application Clusters
We have access to any of the RAC instances directly from the main page, just click on RAC - 2instance(s)
up link in the Status region
Now we can choose what RAC instance we want to check. Click on any of the instance name links. This
way we access the Performance Hub for that RAC instance in particular.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 183
Oracle Database 11gR2/12c Real Application Clusters
Similar to the Performance Hub of the Cluster Database, all components on this page are interactive, and
there are different set of tabs for comprehensive monitoring and diagnostic.
Similar for the Pluggable Database PDB_C01, before we launch Enterprise Manager Database Express
12c, we need to check and adjust if necessary the configuration. Connect to the 12c Cluster Database
using SQLplus and check the status of the Pluggable Databases.
Connect to PDB_C01 Pluggable Database with the alter session command, and check the users. All
sample schemas should be there.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 184
Oracle Database 11gR2/12c Real Application Clusters
With Oracle Database 12c, every Pluggable Database plus the Container Database, in the same
installation, have their own Enterprise Manager 12c Database Express instance. If necessary, make sure
you are connected to the Pluggable Database PDB_C01 using the command show con_name, before
executing DBMS_XDB.SETHTTPPORT.
On PDB_C01 Pluggable Database we have to set the HTTP Port for Enterprise Manager Database
Express to an available value. Use 5505.
Enterprise Manager Database Express service is offered by the XDB on one of the nodes. If you try to
connect to it on the first node and it does not answer, try the second node.
In my case is running on the second node. Though, I need to install Flash plugin for my web browser to be
able to use it.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 185
Oracle Database 11gR2/12c Real Application Clusters
This is the Enterprise Manager Database Express console for the Pluggable Database PDB_C01. Login
with sys/oracle as sysdba.
Note: If you receive a Logon denied error, please remove everything after /em and press Enter, so the
page reloads, before reentering the correct username and password.
Notice in the upper left, at the beginning of the main menu, that we are connected to CLAUDIA/PDB_C01
(12.1.0.1.0 CDB RAC), which means PDB_C01 Pluggable Database. Lets take a tour and see what we
have here.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 186
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 187
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 188
Oracle Database 11gR2/12c Real Application Clusters
Here we may alter one of the sample schemas user account, for example HR. Go to Performance >
Performance Hub.
Use the interactive graphs and reports to see the performance during the last period of time. Click on a
SQL ID link to get more details.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 189
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 190
Oracle Database 11gR2/12c Real Application Clusters
Using the lsnrctl status command for LISTENER_SCAN2 works because this one is running on RAC1
node, and provides service for Cluster Database named claudia (which is the Container Database
CDB$ROOT), XDB (on which Enterprise Manager Database Express is running), and a service called
pdb_c01.mlg.oracle.com (which is the Pluggable Database PDB_C01 we created during the installation
process).
Copyright 2013, Oracle and/or its affiliates. All rights reserved 191
Oracle Database 11gR2/12c Real Application Clusters
This last service we use in the connection string for SQLplus to connect directly to a Pluggable Database.
In this case I connect to PDB_C01, which contains the sample schemas, set a new password for the user
HR, and unlock its account.
Now we test the connection to the HR sample schema, and query some data from it.
Next step is to prepare the storage for the Order Entry sample schema we will generate and use with the
Swingbench workload. First step is to check the available space on ASM Disk Groups. Our Oracle RAC
Database 12c is using the ORAC12C Disk Group, where I have 7748 Usable file MB. Make sure you have
at least 2400 Usable file MB if you want to use the same values I will specify for SOE schema generation.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 192
Oracle Database 11gR2/12c Real Application Clusters
ASMCMD is a command-line utility that you can use to manage Oracle ASM instances, disk groups, file
access control for disk groups, files and directories within disk groups, templates for disk groups, and
volumes. LSDG lists mounted disk groups and their information. For a complete reference, please read
Oracle Automatic Storage Management Administrator's Guide.
We can use Enterprise Manager Database Express to create the tablespace where all Swingbench sample
data will be stored. Click Storage > Tablespaces. Click Actions > Create.
Name it SOE.
Set 100M for File Size, enable Auto Extend, and set 20M for Increment.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 193
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 194
Oracle Database 11gR2/12c Real Application Clusters
Next step is to generate the data that will be used for workload execution.
For Linux: Go to the bin folder of your Swingbench application. Execute ./oewizard.
For Windows: Go to the winbin folder of your Swingbench application. Execute oewizard.bat.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 195
Oracle Database 11gR2/12c Real Application Clusters
Validate Use Partitioning check box if you want your tables to be partitioned. Make sure the Schemas
Tablespace is SOE.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 196
Oracle Database 11gR2/12c Real Application Clusters
Select User Defined Scale radio button, and type 0.3 in the text field. Make sure OrderEntry tablespace
size does not overpass 1.0 GB. If it does, decrease the User Defined Scale.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 197
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 198
Oracle Database 11gR2/12c Real Application Clusters
For Windows: Go to the winbin folder of your Swingbench application. Execute swingbench.bat.
In the User Details tab, under the first group of tabs, set the following:
Username: soe
Password: soe
Connect String: 192.168.56.91:1521/pdb_c01.mlg.oracle.com
In the Connect String we may use the IP address of any of the SCAN Listeners. In the Load tab, under the
second group of tabs, set the following:
Number of Users: 10
Min. Delay Between Transactions (ms): 1,000
Max. Delay Between Transactions (ms): 2,000
Click Run (the green round icon with Play sign below the main menu).
Copyright 2013, Oracle and/or its affiliates. All rights reserved 199
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 200
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 201
Oracle Database 11gR2/12c Real Application Clusters
Go back to Enterprise Manager Database Express console, and login with sys/oracle as sysdba. Click
Storage > Tablespaces. We can see that the datafile grew to a total of 2GB after sample data was
generated.
Next, we can check the SOE user account. Click Security > Users.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 202
Oracle Database 11gR2/12c Real Application Clusters
Use Performance > Performance Hub console to check the performance metrics while Swingbench
workload is running.
Use the interactive graphs and reports to see the metric values you are interested in.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 203
Oracle Database 11gR2/12c Real Application Clusters
For example here is the workload generated by SOE user from the Swingbench application.
And this is one of the SQL queries executed on the Cluster Database.
Copyright 2013, Oracle and/or its affiliates. All rights reserved 204
Oracle Database 11gR2/12c Real Application Clusters
Copyright 2013, Oracle and/or its affiliates. All rights reserved 205
Oracle Database 11gR2/12c Real Application Clusters
Oracle Database 11gR2/12c Real Application Copyright 2012, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the
Clusters contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
September 2013 warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or
Author: Valentin Leonard Tabacaru fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are
formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any
EMEA Presales Center
means, electronic or mechanical, for any purpose, without our prior written permission.
Bangalore | Bucharest | Malaga
Severo Ochoa, 55
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Campanillas-Malaga 29590
Spain
Copyright 2013, Oracle and/or its affiliates. All rights reserved 206