Hybrid Columnar Compression (hcc) is quite a new feature of oracle database, that was introduced in revision 22.214.171.124, where it was available if the tablespaces resided on an Exadata storage.
With 126.96.36.199, oracle made it possible to use hcc also on ZFS Appliances. That’s nice, because now you don’t have to sell your house any more just to afford an exadata to get the benefit of hcc.
In this lab, we will setup a testing environment and see, what you can achieve with hcc.
4.1.) Get yourself a database
In this section, you will install an oracle database 188.8.131.52 in your virtual linux machine.
I will keep this section as briefly as possible, because it exceeds the scope of this lab. If you already have a (virtual) machine running at least oracle 184.108.40.206, you can skip this part and head to 4.2 on the next page.
4.1.1.) Prepare the virtual machine
220.127.116.11.) Network connection
To be able to download the software and patches, the virtual linux machine will need a connection to the internet.
Inside the virtual machine, go to system -> preferences -> network connections
Select eth1 and click edit. Switch to the IP4-Settings Tab, click add and set Method to “Automatic(DHCP)”:
In the Virtual Box main window, select your machine and click Config. Go to network and set adapter 1 to “Bridged Network”
Reboot the machine and login as root. you should now be able to connect to the internet.
18.104.22.168.) Add a bigger disk
Remember the third disk, we created in Lab1 for the linux machine? Now, we are going to mount it inside the machine.
Login to your machine as user root, open a shell window and identify the disk using fdisk. You will see several entrys, but only one with the size of 20GB. This should be /dev/sdd
[root@oraclelinux6 ~]# fdisk -l Disk /dev/sdd: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Create a filesystem on this disk:
[root@oraclelinux6 ~]# mkfs -t ext3 /dev/sdd mke2fs 1.41.12 (17-May-2010) /dev/sdd is entire device, not just one partition! Proceed anyway? (y,n) y
Mount the disk to /u01:
[root@oraclelinux6 ~]# mkdir /u01 [root@oraclelinux6 ~]# echo "/dev/sdd /u01 ext3 defaults 0 0" >> /etc/fstab [root@oraclelinux6 ~]# mount /u01 [root@oraclelinux6 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sdd 20G 173M 19G 1% /u01
22.214.171.124.) Meet prerequirements for the oracle installation
If you ever have installed an oracle database in your life before, you will remember, that there is a ton of stuff to be done, before actually running the installer.
Luckily, most of those prerequirements are already implemented in the linux machine, but some things you will have to do anyway.
Just run the following commands from a shell:
[root@oraclelinux6 ~]# groupadd oinstall [root@oraclelinux6 ~]# groupadd dba [root@oraclelinux6 ~]# usermod -g oinstall -G dba oracle [root@oraclelinux6 ~]# id -a oracle uid=500(oracle) gid=502(oinstall) groups=502(oinstall),503(dba) [root@oraclelinux6 ~]# mkdir -p /u01/app [root@oraclelinux6 ~]# mkdir -p /u01/downloads [root@oraclelinux6 ~]# chown -R oracle:oinstall /u01/app [root@oraclelinux6 ~]# chmod 775 /u01/app [root@oraclelinux6 ~]# echo "192.168.56.200 oraclelinux6 oraclelinux6.localdomain" >> /etc/hosts [root@oraclelinux6 ~]# yum install compat-libcap1 compat-libstdc++-33 libstdc++-devel gcc-c++ ksh libaio-devel
That will create the necessary folders and groups as well as download some additional packages, that are needed for the installer.
4.1.2.) Download and install oracle binaries
Inside the linux machine, open firefox and browse to “http://support.oracle.com”
Download patch 13390677 (only disk 1 and 2) for linux x86-64
To do this, go to “patches&updates”, insert the patch number and the plattform (Linux86-64) and click “search”.
You will get exactly onw result from that qeury. Click the link and click “download”. A window will pop up, where you can select the first two disks. If you want to benchmark your internet connection, you may download the remaining five disks as well, but you won’t need them for this lab.
Download both files to /u01/downloads and make them accessible for the oracle user
[root@oraclelinux6 ~]# chown -R oracle:oinstall /u01/downloads [root@oraclelinux6 ~]# chmod -R 775 /u01/downloads
Become user oracle, unzip the downloaded files and start the installer
[root@oraclelinux6 ~]# ssh oracle@localhost (password oracle) [oracle@oraclelinux6 downloads]$ cd /u01/downloads [oracle@oraclelinux6 downloads]$ unzip p13390677_112040_Linux-x86-64_1of7.zip [oracle@oraclelinux6 downloads]$ unzip p13390677_112040_Linux-x86-64_2of7.zip [oracle@oraclelinux6 downloads]$ cd database [oracle@oraclelinux6 downloads]$ ./runInstaller.sh
I won’t add any screenshots of the installer here, but these are the settings, you should make on the single pages. Basically, leave almost everything on default and keep hitting “next“:
- do not wish to receive security updates
- skip software updates
- create and configure a database
- server class
- single instance database
- advanced install
- selected language: english
- enterprise edition
- oracle base: /u01/app/oracle
- oracle inventory: /u01/app/oraInventory
- general purpose
- database name and SID: orcl
- enable automatic memory management
- use oracle enterprise manager
- file system location: /u01/app/oracle/oradata
- not enable automatic backups
- same password for all accounts (set it to… you guessed it, “oracle”)
- set all groups to dba
software location: /u01/app/oracle/product/11.2.0/dbhome_1
group name: oinstall
set the slide to 400MB (should be default)
in tab Character Sets –> Use unicode (AL32UTF8)
You will most certainly get some failed prerequisite checks. Click “fix and check again“. A popup will open and tell you to run a script as root – user. Leave the popoup open, start a shell as user root and run the script.
[root@oraclelinux6 ~]# /tmp/CVU_126.96.36.199.0_oracle/runfixup.sh
After the script is done, click ok in the popup.
The installer will do his checks again and most certainly still have some complaints about the physical memory. Since this is just a test installation, we can ignore these. Mark the checkbox "ignore all" in the upper right and click next.
Finally click install and...
You might receive an error because oracle net configuration assistant failed. In a real installation, this would be reason for concern, but in our testing environment, you can just ignore this and just click on "skip".
At the end of the installation, you will be asked to run two more scripts as the root user. Again, do not close the popup, but start a shell as root and run the scripts..
[root@oraclelinux6 ~]# /u01/app/oraInventory/orainstRoot.sh [root@oraclelinux6 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
When you are done, hit ok in the popup window.
And you are done.
4.1.3.) Finish the installation
Well... almost done.
There are just two additional steps, before you can start the actual lab.
First, add the following lines to the bash_profile of the oracle user
[oracle@oraclelinux6 downloads]$ vi ~/.bash_profile ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 ORACLE_BASE=/u01/app/oracle ORACLE_SID=orcl PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH export PATH export ORACLE_HOME export ORACLE_BASE
When you open a shell and become the user oracle, you now should be able to login to your shiny new database.
[root@oraclelinux6 ~]# su - oracle [oracle@oraclelinux6 ~]$ sqlplus / as sysdba
Second, you have to reset the network settings to the original state.
Inside your linux machine, go to system -> preferences -> network connections
Select eth1 and click edit
In the tab ipv4-settings, set the following:
In the virtualBox main window, select your machine and click Config. Go to network and set adapter 1 to "Host-only".
Restart the machine and you should be able to connect to the virtual ZFS Appliance again.