Archive

Archive for the ‘Oracle 11g Release 2’ Category

Oracle 11g Release 2 – RMAN compression comparison

November 4th, 2009 Ronny Egner 3 comments

Starting with Oracle 11g Oracle added several compression algorithms to compress data. They can be used for compressing tables, LOBs , compressed data pump exports or even RMAN backups. Unfortunately for some compression algorithms you need to purchase the “Advanced Compression Option”. The following table lists the available RMAN compression options, the most likely compression algorithm being used and states if an additional license is required:

RMAN Compression TypeCompression Algorithm usedAdv. Compression License required?Backup set sizeCPU Load
BASICBZIP2 (100k record size?)Nosmallmedium to high
NONEnoneNolargest; approx. db sizeextremely small
LOWLZOYESsomewhat smaller than using NONElow
MEDIUMZLIBYESmediummedium
HIGHBZIP2 (900k record size?)YESsmallesthighest

This article is intended to take a look at the different compression methods available in Oracle 11g and to compare them.

Read more…

Calculate required kernel parameters for running Oracle 11g Release 2 on Linux

October 28th, 2009 Ronny Egner 1 comment

The following is a short guide on how to calculate the required kernel parameters for running Oracle 11g Release 2 database on Linux.

In addition to that i add some parameters recommended by myself.

Note that for running Oracle Grid Infrastrucure (aka “Clusterware”) some additional parameters might be required.

Read more…

ASM resilvering – or – how to recover your crashed cluster

October 27th, 2009 Ronny Egner 1 comment

In this and the following posts i will perform some crash and recover scenarios and show how to recover the cluster successfully.

At the moment the following tests are planned and will be published during the next days:

The environment used for the posts are explained in detail here.

Useful scripts can be found here.

ASM resilvering – or – how to recover your crashed cluster – Test no 4

October 13th, 2009 Ronny Egner 1 comment

Test #4: Corrupting the ASM disk with ASM disk group being online and active

After overwriting the ASM disk header while the disk group was offline we will now put some load on the full running cluster and corrupt the asm disk slightly.

Read more…

Categories: Oracle 11g Release 2, Oracle ASM Tags:

The Oracle Database File System (DBFS)

October 8th, 2009 Ronny Egner No comments

The following post is a summary of my tests with DBFS on a 11g Release 2 RAC.

DBFS – An Overview

Since the introduction of LOBs the database was used to store all kinds of files, for instance images, audio files, video files or even text files. Starting with Oracle 11g Release 1 introduced SecureFiles which introduced compression and de-duplication.

Oracle Database Filesystem (DBFS) creates a mountable file system which can be used to access files stored in the database as SecureFile LOBs. DBFS is a shared file system like NFS and consists of a server (the database) and a client. Just like a traditional database connection server and client can be on different systems which communicate over SQLNet. The same applies to DBFS as well.

The following figure illustrates DBFS:

dbfs

(Source: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10645/adlob_fs.htm)

Read more…

Oracle 11g Release 2 – How to enable SSH equivalence

September 30th, 2009 Ronny Egner No comments

There is a problem with shared oracle homes on ACFS documented here.

However if you have not configured SSH equivalence before this short guide shows how to do set up ssh equivalence between the nodes “rac1.regner.de” and “rac2.regner.de”:

1. Unpack the database installation files

2. Execute:

<PATH_TO_DATABASE_INSTALLATION>/sshsetup/sshUserSetup.sh
  -user ora11p -hosts "rac1.regner.de rac2.regner.de" -shared

Arguments:
-user: the name of the user for ssh equivalence to be configured
-hosts: space separated list of node names
-shared: indicates a shared oracle home (on acfs or nfs)

3. Check it

/usr/bin/ssh -o FallBackToRsh=no  -o PasswordAuthentication=no 
  -o StrictHostKeyChecking=yes  -o NumberOfPasswordPrompts=0 rac2 /bin/date
/usr/bin/ssh -o FallBackToRsh=no  -o PasswordAuthentication=no
  -o StrictHostKeyChecking=yes  -o NumberOfPasswordPrompts=0 rac1 /bin/date

The two commands above should return the current date. Thats it.

Categories: Oracle 11g Release 2 Tags:

Oracle 11 Release 2 Install Guide – Creating a RAC database

September 30th, 2009 Ronny Egner 3 comments

This is the final part of the Oracle 11g Release 2 installation guide. At this point you should have:

  • Oracle database and grid infrastructure binaries installed
  • at least ONE or better two disk groups configured for:
    • database and binary files
    • flash recovery area

Our database name will be “ORA11P”.

Preparations

  • create directory for cfgtools
create /u01/app/oracle/cfgtoollogs
mkdir -p /u01/app/oracle/cfgtoollogs
chown root:dba /u01/app/oracle/cfgtoollogs
chmod 775 /u01/app/oracle/cfgtoollogs
  • Check SSH equivalence once again:
    execute as user „ora11p“ (this is the user holding the oracle database binary installation):
/usr/bin/ssh -o FallBackToRsh=no  -o PasswordAuthentication=no 
  -o StrictHostKeyChecking=yes  -o NumberOfPasswordPrompts=0 rac2 /bin/date
/usr/bin/ssh -o FallBackToRsh=no  -o PasswordAuthentication=no 
  -o StrictHostKeyChecking=yes  -o NumberOfPasswordPrompts=0 rac1 /bin/date

Both commands should return the current date. If there are errors like „connection refused“, check:

  • network connectivity between both nodes
  • does a „normal“ SSH connection works?:
    • ssh root@rac1-priv
    • ssh root@rac1
    • ssh root@rac2-priv
    • ssh root@rac2

both commands should prompt for a password.

If SSH was working before and seems “gone” you might face a problem documented here.

  • add ACFS oracle home to cluster registry
$GRID_HOME/bin/srvctl add filesystem -d /dev/asm/ora11p_home-132
  -v ora11p_home -g DATA2 -m /u01/app/oracle/product/11.2.0/ora11p -u ora11p

Arguments:
-d: path of advm volume
-v: name of volume
-m: mount point path

„-u ora11p“ ist important and must match the owner of the database binary installation; else dbca will raise error compaining about missing permissions

Create the database with dbca

Start dbca

step6_010

step6_011

step6_012

step6_013

step6_014

step6_015

step6_016

step6_017

step6_018

step6_019a

step6_019b

step6_020

step6_021

step6_022

step6_023

step6_024

step6_025

step6_026

step6_027

step6_028

step6_029

step6_030

Where to go now?

  • Tune Instance, for instance:
    • memory_target
    • db_writer_processes
    • sessions parameter
  • Configure, perform and test your backup
Categories: Oracle 11g Release 2 Tags:

Oracle 11g Release 2 – SCAN explained

September 30th, 2009 Ronny Egner 6 comments

Starting with Oracle 11g Release 2 Oracle introduced a new cluster database connection concept: SCAN – “Single Client Access Name”.

SCAN on the server side

When installing a 11g Release 2 grid infrastructure you are asked for the cluster name which will be part of the SCAN. The notation for the SCAN is:

<clustername>-scan.<domain>

For instance if your cluster is named “rac” and the domain “regner.de” the SCAN name will be “rac-scan.regner.de”.

In order to successful install grid infrastructure you need to configure your DNS (hosts file entries will not work!) prior installing grid infrastructure to resolve the name accordingly. Oracle requires at least one, better three IPs configured for the scan name. Your DNS zone file might look like this:

scan_example

 

In the example zone file above we configured three IPs for the scan: 172.23.15.3, 172.23.15.4 and 172.23.15.5.

After installation you will find three listener processes running (separated on all cluster nodes) as shown in the following figure:

scan_example

Listener for SCAN2 and SCAN3 are running on node “rac1″ and listener for SCAN1 is running on node “rac2″. For each SCAN listener there will be a dedicated network interface running with the same IP as configured in DNS:

scan_interfaces

Client connections

Connection to database “RAC11P” using SCAN would use this tnsnames entry:

RAC11P =
 (DESCRIPTION=
 (ADDRESS=(PROTOCOL=tcp)(HOST=rac-scan.regner.de)(PORT=1521))
 (CONNECT_DATA=(SERVICE_NAME=RAC11P))
 )

The ”old fashioned” way still works:

RAC11P_old =
 (DESCRIPTION=
 (ADDRESS_LIST=
 (ADDRESS=(PROTOCOL=tcp)(HOST=rac1-vip.regner.de)(PORT=1521))
 (ADDRESS=(PROTOCOL=tcp)(HOST=rac2-vip.regner.de)(PORT=1521))
 )
 (CONNECT_DATA=(SERVICE_NAME=RAC11P))
 )

Connecting to a named instance:

RAC11P =
 (DESCRIPTION=
 (ADDRESS=(PROTOCOL=tcp)(HOST=rac-scan.regner.de)(PORT=1521))
 (CONNECT_DATA=(SERVICE_NAME=RAC11P)
 (INSTANCE_NAME=RAC11P1))
 )
Categories: Oracle 11g Release 2 Tags:

Oracle 11g Release 2 – SSH equivalence gone after reboot

September 28th, 2009 Ronny Egner 5 comments

Today i came across a strange phenomenon:

I set up ssh equivalence during database installation but after rebooting the system some tool complained about misconfigured ssh equivalence. So i digged a little bit. I found out SSH is complaining about wrong directory permissions:

Sep 28 13:57:03 rac1 sshd[31620]: Authentication refused: bad ownership or modes for directory /u01/app/oracle/product/11.2.0/ora11p

The directory mentioned here is an ACFS shared oracle home and the home directory for the oracle user. After changing the mode for the directory to 755 ssh equivalence was restored. But after stopping and starting acfs resource the equivalence was gone again.

So i worked a little bit on that:

Lets first check directory permission with ACFS resource not started and not mounted:

[root@rac1 ~]# ll /u01/app/oracle/product/11.2.0/
total 4
drwxr-xr-x 2 ora11p dba 4096 Sep 13 00:02 ora11p
[root@rac1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              26G   13G   12G  52% /
/dev/sda1              99M   12M   83M  13% /boot
tmpfs                 1.9G  164M  1.7G   9% /dev/shm

Directory Mode is 775.

So now lets mount ACFS volume manually and check the permission again:

[root@rac1 ~]# mount /dev/asm/ora11p_home-132 /u01/app/oracle/product/11.2.0/ora11p/ -t acfs
[root@rac1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              26G   13G   12G  52% /
/dev/sda1              99M   12M   83M  13% /boot
tmpfs                 1.9G  164M  1.7G   9% /dev/shm
/dev/asm/ora11p_home-132
 10G  4.7G  5.4G  47% /u01/app/oracle/product/11.2.0/ora11p
[root@rac1 ~]# ll /u01/app/oracle/product/11.2.0/
total 16
drwxrwx--- 83 ora11p dba 12288 Sep 25 10:37 ora11p

775 – still no surprise. So we change them to 775 as required by SSH:

[root@rac1 ~]# chmod 755 /u01/app/oracle/product/11.2.0/ora11p
[root@rac1 ~]# ll /u01/app/oracle/product/11.2.0/
total 16
drwxr-xr-x 83 ora11p dba 12288 Sep 25 10:37 ora11p

The directory show required permissions. We will now unmount and mount the file system again:

[root@rac1 ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda3             26306612  12828996  12119724  52% /
/dev/sda1               101086     11683     84184  13% /boot
tmpfs                  1933304    167016   1766288   9% /dev/shm
/dev/asm/ora11p_home-132
 10485760   4864328   5621432  47% /u01/app/oracle/product/11.2.0/ora11p
[root@rac1 ~]# umount /u01/app/oracle/product/11.2.0/ora11p
[root@rac1 ~]#
[root@rac1 ~]# umount /u01/app/oracle/product/11.2.0/ora11p
[root@rac1 ~]# mount /dev/asm/ora11p_home-132 /u01/app/oracle/product/11.2.0/ora11p/ -t acfs           
[root@rac1 ~]# ll /u01/app/oracle/product/11.2.0/
total 16
drwxr-xr-x 83 ora11p dba 12288 Sep 25 10:37 ora11p

There we are: Permission mode 775 is consistent accross mounts. So lets unmount everything and start acfs resource again:

[root@rac1 ~]# umount /u01/app/oracle/product/11.2.0/ora11p
[root@rac1 ~]#
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl start resource  ora.data2.ora11p_home.acfs
CRS-2672: Attempting to start 'ora.data2.ora11p_home.acfs' on 'rac1'
CRS-2672: Attempting to start 'ora.data2.ora11p_home.acfs' on 'rac2'
CRS-2676: Start of 'ora.data2.ora11p_home.acfs' on 'rac2' succeeded
CRS-2676: Start of 'ora.data2.ora11p_home.acfs' on 'rac1' succeeded
[root@rac1 ~]# ll /u01/app/oracle/product/11.2.0/
total 16
drwxrwx--- 83 ora11p dba 12288 Sep 25 10:37 ora11p

The directory mode 770 was changed to 770…. but by which component and configuration?

Until now i did not find a solution for this behavior yet. I will open a SR and see what Oracle thinks about this “feature”.

In the meantime to get rid of this behavior you can set “StrictModes no” in sshd_config to prevent ssh from checking directory ownerships.

Oracle 11 Release 2 Install Guide – Install Oracle RAC

September 23rd, 2009 Ronny Egner 5 comments

System configuration

Hardware configuration

  • two virtual machines (VMWARE)
    • 1 vCPU
    • 4 GB RAM
    • 40 GB local Disk
  • Storage exported via ISCSI
    • 4 LUNs with 10 GB each
    • 2 LUNs with 30 GB each

Operating system configuration

  • Oracle Enterprise Linux 5.3 x86_64 (Kernel 2.6.18-128.el5)
  • Installed packages: default system + development packages

Cluster configuration

  • Cluster Name: „RAC“
  • Grid Binary installation on local disk
  • OCR, Voting and datafiles stored in ASM
  • Oracle HOME stored on ACFS file system (this menas we will have a SHARED home directory among all nodes!)
  • Oracle HOME will be installed unser user „ora11p“

Installation – Requirements and Preparations

Installation Steps outlined

  1. Installation of Oracle 11g Release 2 Grid Infrastructure → done here
  2. Installation of Oracle 11g Release 2 Database (rac installation)
    1. Review system requirements
    2. Install database software (aka „binaries“)
    3. Create database

general Requirements

All requirments from grid infrastructure installation apply here as well, for instance:

  • Kernel parameter
  • Limits (esp. configure limits for new user „ora11p“ which will hold the binary database installation)
  • Synchronous time
  • dns-resolvable SCAN name
  • working public and private interconnect
  • shared and accessible storage
  • at least ONE better two more disk groups created:
    • one for database files and binary installation
    • one for flashback recovery area
  • Note: SSH equivalence will be set up by installer

Preparations

Create ACFS file system for storing oracle binary installation

  • Create further ACFS mount directory
    mkdir -p /u01/app/oracle/product/11.2.0/ora11p
  • Create ADVM volume

step4_010

  • Create ACFS file system

step4_011

  • DO NOT register ACFS file system mountpoint for the oracle home directory! We will do this later (when creating the database) as clusterware resource
  • Mount ACFS file system on both nodes ( “mount /dev/asm/ora11p_home-132 /u01/app/oracle/product/11.2.0/ora11p”)

step4_014

 

Create User on both nodes:

useradd -u 501 -g dba -d /u01/app/oracle/product/11.2.0/ora11p ora11p
passwd ora11p
chown -R root:dba /u01/app/oracle/product
chmod -R 775 /u01/app/oracle/product
chown -R ora11p:dba /u01/app/oracle/product/11.2.0/ora11p

Create .bash_profile for user ora11p (note: changes on node A will be visible on node B cause were using ACFS; so changing profile file is needed only once)

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/ora11p
export ORACLE_SID=ORA11P
if [ -t 0 ]; then
stty intr ^C
fi

One word on Cluster Verification utility (cluvfy)

  • should be used prior installation
  • At this point the user „ora11p“ does not have SSH equivalence configured
  • So there are two options:
    • start cluvfy after installer set up ssh equivanlence
    • set up SSH equivalence manually
  • I personally prefer to run cluvfy after installer set up ssh equivalence

However the database installer seems to run a more or less complete check automatically

If you want to start cluvfy here is the syntax:

cluvfy stage -pre dbinst -fixup -n nodeA,nodeB -r <release> -osdba <name of sysdba group on unix> -verbose
<release> is: 10gR1, 10gR2, 11gR1, 11gR2

Installation

Start installer als user „ora11p“ on any node

step4_015

For testing purposes i deselected update notifications… in productive environments this is highly recommended

step4_016

we will install database software only and create database later

step4_017

both nodes were discovered correctly….

step4_018

Because were installing as user „ora11p“ which is different from the user holding our infrastructure installation we need to create passwordless ssh connectitivty

!! you also need to select „user home is shared“ cause were using ACFS !!

step4_019

step4_019

SSH connectivity successfully established…

step4_020

Select language support

step4_021

Select Edition

step4_022

Select Options

step4_023

Select ORACLE_BASE and ORACLE_HOME; we set it in profile file so it is entered by the installer automatically

step4_024

step4_025

Installation Summary

step4_026

Install process

step4_027

step4_028

Installation nearly finished.. just start „root.sh“ as root on all nodes

step4_029

root.sh sample output

step4_030

Finished

step4_031

Where to go now?

  • We just installed all neccessary components for creating our first RAC database → this will be the next post
  • backup current configuration
Categories: Oracle 11g Release 2 Tags: