Search

Top 60 Oracle Blogs

Recent comments

Oakies Blog Aggregator

History

A little while ago I noticed a couple of page views that had come from the AskTom website – and I’m always interested to see what question has prompted a link and visit to my blog. In this case it was a question that raised a piece of (nearly ancient) history. In a question dated July 2009 someone was asking about a comment I had made in “Practical Oracle 8i”. (Despite the book being over 10 years old I’m still getting royalty cheques on it – small ones, but they keep on coming – and it’s still a book worth reading).

The question was about the following text:

Avoid naming tablespaces according to time-periods; this is particularly relevant to large, time-based data warehouses where very old data is ultimately dropped off the back end of the database.

There is an unfortunate quirk of tablespace naming – Oracle never forgets a tablespace – in other words it never deletes it from the data dictionary table TS$ (I think this is some sort of hangover from Trusted Oracle where tablespaces have security labels associated with them). Unfortunately, one of the permanently running Oracle processes called SMON (the System monitor) scans this list of tablespaces every 3 minutes looking for tablespaces that might have some free space to coalesce; the size and cost of this scan will grow indefinitely unless you adopt a strategy of recycling tablespace names. It is actually surprising how many databases suffer a massive I/O load on the SYSTEM tablespace because of SMON.

The problem will be reduced somewhat by the introduction of locally managed tablespaces, since the scanning problem is actually exacerbated by the number of free extents that gets generated in poorly managed systems in a way that can’t happen with locally managed tablespaces; nevertheless you need to make sure that the list of tablespace names does not get out of hand.

You’ll be pleased to hear that this is no longer a problem. If you have access to Metalink (MOS), you can find information about (unpublished) bug 5861536: “Slow DDL due to Tablespace lookup with large number of tablespaces” dated 24th Sept 2008; and see in note 401436.1 (10.2.0.4 Patch Set – List of bug fixes by Problem Type) that this problem has now been addressed.

UKOUG Conference Series 2010

The annual UKOUG Technology and E-Business Suite Conference takes place from November 29th to December 1st in Birmingham (UK not Alabama). You can book here. One of the neat features of this event is that you can pre-register your interest in sessions and build a handy one page personalized agenda. This saves carting around the [...]

Keynote Presentation at NOUG Oct 2010

Thank you all who came to watch my keynote presentation - "Real World DBA Best Practices" - for Northeast Oracle User Group in Boston, 21st October, 2010.

You can download the presentation here. Before downloading, please let me reiterate what I mentioned during the meeting - a best practice is not one if you do not understand the reason behind it and do not understand the applicability to your specific situation. I was not selling a product or service nor was I asking you to blindly follow it. All I wanted from you was to consider the points.

Build your own 11.2.0.2 stretched RAC part IV

Finally I have some more time to work on the next article in this series, dealing with the setup of my two cluster nodes. This is actually going to be quite short compared to the other articles so far. This is mainly due to the fact that I have streamlined the deployment of new Oracle-capable machines to a degree where I can comfortably set up a cluster in 2 hours. It’s a bit more work initially, but it paid off. The setup of my reference VM is documented on this blog as well, search for virtualisation and opensuse to get to the article.

When I first started working in my lab environment I created a virtual machine called “rhel55ref”. In reality it’s OEL, because of Red Hat’s windooze like policy to require an activation code. I would have considered CentOS as well, but when I created the reference VM the community hadn’t provided the “update 5″. I like the brand new shiny things most :)

Seems like I’m lucky now as well with the introduction of Oracle’s own Linux kernel I am ready for the future. Hopefully Red Hat will get their act together soon and release version 6 of their distribution. As much as I like Oracle I don’t want them to dominate the OS market too much. With Solaris now in their hands as well…

Anyway, to get started with my first node I cloned my template. Moving to /var/lib/xen/images all I had to do was to “cp -a rhel55ref edcnode1″. One repetition to edcnode2 gave me my second node. Xen (or libvirt for that matter) stores the VM configuration in xenstore, a backend database which can be interrogated easily. So I dumped the XML configuration file for my rhel55ref VM and stored it in edcnode{1,2}.xml. The command to dump the information is “virsh dumpxml domainName” > edcnode{1,2}.xml

The domU folder contains the virtual disk for the root file system of my VM, called disk0. I then created a new “hard disk”, called disk1 to contain the Oracle binaries. Experience told me not to have that too small, 20G should be enough for my /u01 mountpoint for Grid Infrastructure and the RDBMS binaries.

[root@dom0]# /var/lib/xen/images/edcnode1 # dd if=/dev/zero of=disk01 bs=1 count=0 seek=20G
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.3869e-05 s, 0.0 kB/

I like to speed the file creation up by using the sparse file trick: the file disk1 will be reported to be 20G in size, but it will only use that if the virtual machine needs them. It’s a bit like Oracle creating a temporary tablespace.

With that information it’s time to modify the dumped XML file. Again it’s important to define MAC addresses for the network interfaces, otherwise the system will try and use dhcp for your NICs, destroying the carefully crafted /etc/sysconfig/network-scripts/ifcfg-eth{0,1,2} files. Oh, and remember that the first 3 tupel are reserved for XEN, so don’t change “00:16:3e”! Your UUID also has to be unique. In the end my first VM’s XML description looked like this:


 edcnode1
 46a36f98-4e52-45a5-2579-80811b38a3ab
 4194304
 524288
 2
 /usr/bin/pygrub
 -q
 
 linux
  
 
 
 destroy
 restart
 destroy
 
 /usr/lib64/xen/bin/qemu-dm
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 

 
 
 
 
 
 
 
 

You can see that the interfaces refer to br1, br2, and br3. These are the ones that were previously defined in the first article. The tag “” in the tag doesn’t matter as that will be dynamically assigned anyway.

When done, you can define the new VM and start it:

[root@dom0]# virsh define edcnode{1,2}.xml
[root@dom0]# xm start edcnode1 -c

You are directly connected to the VM’s console (80×24-just like in the old times!) and have to wait a looooong time for the DHCP requests for eth0, eth1 and eth2 to time out. This is the first thing to address. As root, log in to the system and navigate straight to /etc/sysconfig/network-scripts to change ifcfg-eth{0,1,2}. Alternatively, use system-config-network-tui to change the network settings.

The following settings should be used for edcnode1:

  • eth0:    192.168.99.56/24
  • eth1:    192.168.100.56/24
  • eth2:    192.168.101.56/24

These are the settings for edcnode2:

  • eth0:    192.168.99.58/24
  • eth1:    192.168.100.58/24
  • eth2:    192.168.101.58/24

The nameserver for both is my dom0 – in this case 192.168.99.10. Enter the appropriate hostname as well as the nameserver. Note that 192.168.99.57 and 59 are reserved for the node VIPs, hence the “gap”. Then edit /etc/hosts to enter the information about the private interconnect, which for obvious reasons is not included in DNS. If you like, persist your public and VIP information in /etc/hosts as well. Don’t do this with the SCAN, it’s not suggested to have the SCAN resolve through /etc/hosts although it works.

Now’s the big moment-restart the network services and get out of the uncomfortable 80×24 character limitation:

[root@edcnode1]# service network restart

The complete configuration is printed here for the sake of completeness for edcnode1:

[root@edcnode1 ~]# cat /etc/resolv.conf
nameserver 192.168.99.10
search localdomain
[root@edcnode1 ~]#

[root@edcnode1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth{0,1,2}
# Xen Virtual Ethernet
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:16:3e:ab:cd:ef
NETMASK=255.255.255.0
IPADDR=192.168.99.56
TYPE=Ethernet
# Xen Virtual Ethernet
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:16:3e:10:13:1a
NETMASK=255.255.255.0
IPADDR=192.168.100.56
TYPE=Ethernet
# Xen Virtual Ethernet
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:16:3e:11:12:ef
NETMASK=255.255.255.0
IPADDR=192.168.101.56
TYPE=Ethernet

[root@edcnode1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=edcnode1

Next on the agenda is the iscsi-initiator. This isn’t part of my standard build and had to be added. All my software is exported from the dom0 via NFS and mounted to /mnt/

[root@edcnode1 ~]# find /mnt -iname "iscsi*"
/mnt/oracleEnterpriseLinux/source/iscsi-initiator-utils-6.2.0.871-0.16.el5.x86_64.rpm

[root@edcnode1 ~]# cd /mnt/oracleEnterpriseLinux/source/
[root@edcnode1 ~]# rpm -ihv iscsi-initiator-utils-6.2.0.871-0.16.el5.x86_64.rpm
warning: iscsi-initiator-utils-6.2.0.871-0.16.el5.x86_64.rpm: ...
Preparing...                ########################################### [100%]
 1:iscsi-initiator-utils  ########################################### [100%

It's important to edit the initiator name, i.e. the name the initiator reports back to OpenFiler. I changed it to include edcnode1 and edcnode2 on their respective hosts. The file to edit is /etc/iscsi/initiatorname.iscsi

Time to get serious now:

[root@edcnode1 ~]# /etc/init.d/iscsi start
iscsid is stopped
Starting iSCSI daemon:                                     [  OK  ]
 [  OK  ]
Setting up iSCSI targets: iscsiadm: No records found!
 [  OK  ]

We are ready to roll. First, we need to discover the targets from the OpenFiler appliance-start with the first one filer01:

[root@edcnode1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.101.50
192.168.101.50:3260,1 iqn.2006-01.com.openfiler:asm01Filer01
192.168.101.50:3260,1 iqn.2006-01.com.openfiler:ocrvoteFiler01
192.168.101.50:3260,1 iqn.2006-01.com.openfiler:asm02Filer01

A restart of the iscsi service will automatically log in and persist the settings (this is very wide output-works best in 1280xsomething resolution)

[root@edcnode1 ~]# service iscsi restart
Stopping iSCSI daemon:
iscsid dead but pid file exists                            [  OK  ]
Starting iSCSI daemon:                                     [  OK  ]
 [  OK  ]
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm01Filer01, portal: 192.168.101.50,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:ocrvoteFiler01, portal: 192.168.101.50,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm02Filer01, portal: 192.168.101.50,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm01Filer01, portal: 192.168.101.50,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:ocrvoteFiler01, portal: 192.168.101.50,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm02Filer01, portal: 192.168.101.50,3260]: successful
 [  OK  ]

Fine! Now over to fdisk the new devices. I know that my “local” storage is named /dev/xvd*, so anything new (“/dev/sd*”) will be iSCSI provided storage. If you are unsure you can always check the /var/log/messages file to see which device have just been discovered. You should see something similar to this output:

Sep 24 12:20:08 edcnode1 kernel: Loading iSCSI transport class v2.0-871.
Sep 24 12:20:08 edcnode1 kernel: cxgb3i: tag itt 0x1fff, 13 bits, age 0xf, 4 bits.
Sep 24 12:20:08 edcnode1 kernel: iscsi: registered transport (cxgb3i)
Sep 24 12:20:08 edcnode1 kernel: Broadcom NetXtreme II CNIC Driver cnic v2.1.0 (Oct 10, 2009)
Sep 24 12:20:08 edcnode1 kernel: Broadcom NetXtreme II iSCSI Driver bnx2i v2.1.0 (Dec 06, 2009)
Sep 24 12:20:08 edcnode1 kernel: iscsi: registered transport (bnx2i)
Sep 24 12:20:08 edcnode1 kernel: iscsi: registered transport (tcp)
Sep 24 12:20:08 edcnode1 kernel: iscsi: registered transport (iser)
Sep 24 12:20:08 edcnode1 kernel: iscsi: registered transport (be2iscsi)
Sep 24 12:20:08 edcnode1 iscsid: iSCSI logger with pid=20558 started!
Sep 24 12:20:08 edcnode1 kernel: scsi0 : iSCSI Initiator over TCP/IP
Sep 24 12:20:08 edcnode1 kernel: scsi1 : iSCSI Initiator over TCP/IP
Sep 24 12:20:08 edcnode1 kernel: scsi2 : iSCSI Initiator over TCP/IP
Sep 24 12:20:09 edcnode1 kernel:   Vendor: OPNFILER  Model: VIRTUAL-DISK      Rev: 0
Sep 24 12:20:09 edcnode1 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
Sep 24 12:20:09 edcnode1 kernel:   Vendor: OPNFILER  Model: VIRTUAL-DISK      Rev: 0
Sep 24 12:20:09 edcnode1 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
Sep 24 12:20:09 edcnode1 kernel:   Vendor: OPNFILER  Model: VIRTUAL-DISK      Rev: 0
Sep 24 12:20:09 edcnode1 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
Sep 24 12:20:09 edcnode1 kernel:   Vendor: OPNFILER  Model: VIRTUAL-DISK      Rev: 0
Sep 24 12:20:09 edcnode1 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
Sep 24 12:20:09 edcnode1 kernel: scsi 0:0:0:0: Attached scsi generic sg0 type 0
Sep 24 12:20:09 edcnode1 kernel: scsi 1:0:0:0: Attached scsi generic sg1 type 0
Sep 24 12:20:09 edcnode1 kernel: scsi 2:0:0:0: Attached scsi generic sg2 type 0
Sep 24 12:20:09 edcnode1 kernel: scsi 1:0:0:1: Attached scsi generic sg3 type 0
Sep 24 12:20:09 edcnode1 kernel: SCSI device sda: 20971520 512-byte hdwr sectors (10737 MB)
Sep 24 12:20:09 edcnode1 kernel: sda: Write Protect is off
Sep 24 12:20:09 edcnode1 kernel: SCSI device sda: drive cache: write through
Sep 24 12:20:09 edcnode1 kernel: SCSI device sda: 20971520 512-byte hdwr sectors (10737 MB)
Sep 24 12:20:09 edcnode1 kernel: sda: Write Protect is off
Sep 24 12:20:09 edcnode1 kernel: SCSI device sda: drive cache: write through
Sep 24 12:20:09 edcnode1 kernel:  sda: unknown partition table
Sep 24 12:20:09 edcnode1 kernel: sd 0:0:0:0: Attached scsi disk sda

The output will continue with /dev/sdb and other devices exported by the filer.

Prepare the local Oracle Installation

Using fdisk, modify /dev/xvdb, create a partition spanning the whole disk and set its type to “8e” – Linux LVM. It’s always a good idea to use LVM to install Oracle binaries into, it makes later extension of a filesystem easier. I’ll add the fdisk output here for this device but won’t for later partitioning excercises.

root@edcnode1 ~]# fdisk /dev/xvdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
 (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
 e   extended
 p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Once /dev/xvdb1 is ready, we need to start its transformation into a logical volume. First, a physical volume is to be created:

[root@edcnode1 ~]# pvcreate /dev/xvdb1
 Physical volume "/dev/xvdb1" successfully created

The physical volume (“PV”) is then used to form a volume group (“VG”). In real life, you’d probably have more than 1 PV to form a VG… I named my volume group “oracle_vg”. The existing volume group is called “root_vg” by the way.

[root@edcnode1 ~]# vgcreate oracle_vg /dev/xvdb1
 Volume group "oracle_vg" successfully create

Wonderful! I never quite remember how many extents this VG has so I need to query it. When using –size 10g it will through an error – some internal overhead will reduce the available capacity to something just shy of 10G:

[root@edcnode1 ~]# vgdisplay oracle_vg
 --- Volume group ---
 VG Name               oracle_vg
 System ID
 Format                lvm2
 Metadata Areas        1
 Metadata Sequence No  1
 VG Access             read/write
 VG Status             resizable
 MAX LV                0
 Cur LV                0
 Open LV               0
 Max PV                0
 Cur PV                1
 Act PV                1
 VG Size               10.00 GB
 PE Size               4.00 MB
 Total PE              2559
 Alloc PE / Size       0 / 0
 Free  PE / Size       2559 / 10.00 GB
 VG UUID               QgHgnY-Kqsl-noAR-VLgP-UXcm-WADN-VdiwO7

Right, so now let’s create a logical volume (“LV”) with 2559 extents:

[root@edcnode1 ~]# lvcreate --extents 2559 --name grid_lv oracle_vg
 Logical volume "grid_lv" created

And now we need a file system:

[root@edcnode1 ~]# mkfs.ext3 /dev/oracle_vg/grid_lv

You are done! Create the mountpoint for your oracle installation, /u01/ in my case, and grant oracle:oinstall ownership to it. In this lab excercise I didn’t create a separate owner for the Grid Infrastructure to avoid potentially undiscovered problems in 11.2.0.2 and stretched RAC. Finally add this to /etc/fstab to make it persistent:

[root@edcnode1 ~]# echo "/dev/oracle_vg/grid_lv   /u01   ext3 defaults 0 0" >> /etc/fstab
[root@edcnode1 ~]# mount /u01

Now continue to partition the iSCSI volumes, but don’t create file systems on top of them. You should not assign a partition type other than the default “Linux” to it either.

ASMLib

Yes I know…The age old argument, but I decided to use it anyway. The reason is simple: scsi_id doesn’t return a value in para-virtualised Linux, which makes it impossible to set up device name persistence with udev. And ASMLib is easier to use anyway! But if your system administrators are database agnostic and not willing to learn the basics about ASM, then probably ASMLib is not a good idea to be rolled out. It’s only a matter of time until someone executes an “rpm -Uhv kernel*” to your box and of course a) didn’t tell the DBAs and b) didn’t bother applying the ASMLib kernel module. But I digress.

Before you are able to use ASMLib you have to configure it on each cluster node. A sample session could look like this:

[root@edcnode1 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting  without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Dropping Oracle ASMLib disks:                              [  OK  ]
Shutting down the Oracle ASMLib driver:                    [  OK  ]
[root@edcnode1 ~]#

Now with this done, it is possible to create the ASMLib maintained ASM disks. For the LUNs presented by filer01 these be

  • ASM01FILER01
  • ASM02FILER01
  • OCR01FILER01
  • OCR02FILER01

The disks are created using the /etc/init.d/oracleasm createdisk command as in these examples:

[root@edcnode1 ~]# /etc/init.d/oracleasm createdisk asm01filer01 /dev/sda1
Marking disk "asm01filer01" as an ASM disk:                [  OK  ]
[root@edcnode1 ~]# /etc/init.d/oracleasm createdisk asm02filer01 /dev/sdc1
Marking disk "asm02filer01" as an ASM disk:                [  OK  ]
[root@edcnode1 ~]# /etc/init.d/oracleasm createdisk ocr01filer01 /dev/sdb1
Marking disk "ocr01filer01" as an ASM disk:                [  OK  ]
[root@edcnode1 ~]# /etc/init.d/oracleasm createdisk ocr02filer01 /dev/sdd1
Marking disk "ocr02filer01" as an ASM disk:                [  OK  ]

Switch over to the second node now to validate the configuration and to continue the configuration of the iSCSI LUNs from filer02. Define the domU with a similar configuration file as shown above for edcnode1, and start the domU. Once the wait for DHCP timeouts is over and you are presented with a login, set up the network as shown above. Install the iscsi initiator package, change the initiator name and discover the targets from filer02 in addition to those from filer01.

[root@edcnode2 ~]# iscsiadm -t st -p 192.168.101.51 -m discovery
192.168.101.51:3260,1 iqn.2006-01.com.openfiler:asm02Filer02
192.168.101.51:3260,1 iqn.2006-01.com.openfiler:ocrvoteFiler02
192.168.101.51:3260,1 iqn.2006-01.com.openfiler:asm01Filer02
[root@edcnode2 ~]# iscsiadm -t st -p 192.168.101.50 -m discovery
192.168.101.50:3260,1 iqn.2006-01.com.openfiler:asm01Filer01
192.168.101.50:3260,1 iqn.2006-01.com.openfiler:ocrvoteFiler01
192.168.101.50:3260,1 iqn.2006-01.com.openfiler:asm02Filer01

Still on the second node, continue the mounting of the scsi devices

[root@edcnode2 ~]# service iscsi start
iscsid (pid  2802) is running...
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm02Filer02, portal: 192.168.101.51,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:ocrvoteFiler02, portal: 192.168.101.51,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm01Filer01, portal: 192.168.101.50,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm01Filer02, portal: 192.168.101.51,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:ocrvoteFiler01, portal: 192.168.101.50,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm02Filer01, portal: 192.168.101.50,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm02Filer02, portal: 192.168.101.51,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:ocrvoteFiler02, portal: 192.168.101.51,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm01Filer01, portal: 192.168.101.50,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm01Filer02, portal: 192.168.101.51,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:ocrvoteFiler01, portal: 192.168.101.50,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm02Filer01, portal: 192.168.101.50,3260]: successful

Partition the disks from filer02 the same way as shown in the previous example. On edcnode2, fdisk reported the following as new disks

Disk /dev/sda doesn't contain a valid partition table
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdf doesn't contain a valid partition table

Disk /dev/sda: 10.6 GB, 10670309376 bytes
Disk /dev/sdb: 2650 MB, 2650800128 bytes
Disk /dev/sdf: 10.7 GB, 10737418240 bytes

Note that /dev/sda and /dev/sdf are the 2 10G LUNs for ASM data, and /dev/sdb is the OCR/voting disk combination. Next, create the additional ASMLib disks:

[root@edcnode2 ~]# /etc/init.d/oracleasm scandisks
...
[root@edcnode2 ~]# /etc/init.d/oracleasm createdisk asm01filer02 /dev/sda1
Marking disk "asm01filer02" as an ASM disk:                [  OK  ]
[root@edcnode2 ~]# /etc/init.d/oracleasm createdisk asm02filer02 /dev/sdf1
Marking disk "asm02filer02" as an ASM disk:                [  OK  ]
[root@edcnode2 ~]# /etc/init.d/oracleasm createdisk ocr01filer02 /dev/sdb1
Marking disk "ocr01filer02" as an ASM disk:                [  OK  ]
[root@edcnode2 ~]# /etc/init.d/oracleasm listdisks
ASM01FILER01
ASM01FILER02
ASM02FILER01
ASM02FILER02
OCR01FILER01
OCR01FILER02
OCR02FILER01

Perform another scandisks command on edcnode1 to have all the disks:

[root@edcnode1 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@edcnode1 ~]# /etc/init.d/oracleasm listdisks
ASM01FILER01
ASM01FILER02
ASM02FILER01
ASM02FILER02
OCR01FILER01
OCR01FILER02
OCR02FILER01

Summary

All done!And I seriously thought initially that this was going to be a shorter post than the others, how wrong I was. Congratulations on having arrived here at the bottom of the article by the way.

In the course of this post I prepared my virtual machines to begin the installation of Grid Infrastructure. The ASM disk names will be persistent across reboots thanks to ASMLib, and no messing around with udev for that matter. You might notice that there are 2 ASM disk from filer01 but only 1 from filer02 for the voting disk/OCR diskgroup, and that’s for a reason. I’m cheeky and won’t tell you here, that’s for another post later…

Very funny…

I just saw this image as a forum signature and it made me laugh a lot.

This is on a par with Evil Groundhog and Ninja Cat. :)

Cheers

Tim…

How I got access to My Oracle Support (MOS) for US$2.67

Oracle professionals know that the two main sites for information and support on running Oracle products are the Oracle Technology Network (OTN), and My Oracle Support (MOS).

  • OTN is free for anyone, and provides discussion forums, white papers and free base-release software downloads under the Developer License.
  • MOS requires a paid software license and support contract. It offers technical support notes, bug access, request tracking and patches.  It is the only place you can get critical updates and patch sets to, for instance, bring a 10.2.0.1 database up to 10.2.0.4.

Many people are just starting learning Oracle, or are out of work and no longer associated with a support contract.  Those people could clearly benefit from access to MOS to read support notes, and solve problems they are having while experimenting with Oracle products under the Developer License.

A few years ago, my friend and Oracle ACE Director Dan Morgan mentioned that one could buy a very cheap product in the Oracle Store, opt to pay for support on it, and obtain MOS access for very little money.  This week I mentioned this fact to my Oracle DBA Class at the University of Washington, and my students wanted to know which product to buy, and for how much.  I decided to find out, and here’s what I did.

  1. Navigate to http://shop.oracle.com.
  2. In the left-hand menu, click on All Products at the bottom.
  3. In the gray bar with heading labels, click on Price Range (on the right), and select $.40 – $8.00.
  4. The only item that appears for me is Oracle Management Pack Plus for Identity Management. Click on Buy Now.
  5. On the product page, change the Metric selection to Non Employee User External – $2.00.
  6. Click Add to Cart.
  7. Click Checkout (upper right)
  8. Make sure you have checked Include First Year Support for License Products.
  9. Click Checkout, and follow the purchase process.
  10. In a day or so, you will receive an email with your Customer Service Identifier (CSI) and you will be able to register for My Oracle Support.

NOTE: It may take more than 24 hours for Oracle to activate your CSI on MOS. If you try to reigster your new CSI on MOS before Oracle activates it, you will receive the error, “This CSI does not allow registration.” In this case, just wait.  Oracle will activate your CSI eventually.

This process doesn’t give you the right to download or use material from the MOS site for any purpose not covered under the Developer License or the product license you purchased for $2.00 from the Oracle Store.  I am providing this information because it could help those legitimately covered under the Developer License.

Related posts:

  1. Oracle Certification vs Oracle Support
  2. Oracle Support and Certification on AWS
  3. Oracle Correction to Export/Import

Configuring Linux Hugepages for Oracle Database Is Just Too Difficult! Isn’t It? Part – II.

After my recent blog entry entitled   Configuring Linux Hugepages for Oracle Is Just Too Difficult! Isnt It? Part I, I engaged in a couple of email threads and a thread on oracle-l about when to employ hugepages.  In those exchanges I was amazed to find that it is still a borderline issue for folks. I feel it is very cut and dried and thus I prepared the following guidelines that more or less spell it out.

  1. Reasons for Using Hugepages
    1. Use hugepages if OLTP or ERP. Full stop.
    2. Use hugepages if DW/BI with large numbers of dedicated connections or a large SGA. Full stop.
    3. Use hugepages if you don’t like the amount of memory page tables are costing you (/proc/meminfo). Full stop.
  2. SGA Memory Management Models
    1. AMM does not support hugepages. Full stop.
    2. ASMM supports hugepages.
  3. Instance Type
    1. ASM uses AMM by default. ASM instances do not need hugepages. Full stop.
    2. All non-ASM instances should be considered candidate for hugepages. See 1.1->1.3 above.
  4. Configuration
    1. Limits (multiple layers)
      1. /etc/security/limits.conf establishes limits for hugepages for processes. Note, setting these values does not pre-allocate any resources.
      2. Ulimit also establishes hugepages limits for processes.
  5. Allocation
    1. /etc/sysctl.conf vm.nr_hugepages allocates memory to the hugepages pool.
  6. Sizing
    1. Read MOS 401749.1 for information on tools available to aid in the configuration of vm/nr_hugepages

To make the point of how urgently  Oracle DBAs need to qualify their situation against list items 1.1 through 1.3 above, please consider the following quote from an internal email I received. The email is real and the screen output came from a real customer system. Yes, 120+ gigabytes of memory wasted in page tables. Fact is often stranger than fiction!

And here is an example of kernel pagetables usage, with a 24GB SGA, and 6000+ connections ..  with no hugepages in use ..

# grep PageT /proc/meminfo

PageTables:   123731372 kB

Filed under: oracle

Virtual Seminar: "Systematic Oracle SQL Optimization in Real Life"

On November 18 and 19, I’ll be presenting along with Tanel Põder, Jonathan Lewis, and Kerry Osborne in a virtual (GoToWebinar) seminar called Systematic Oracle SQL Optimization in Real Life. Here are the essentials:

What: Systematic Oracle SQL Optimization in Real Life.
Learn how to think clearly about Oracle performance, find your performance problems, and then fix them, whether you’re using your own code (which you can modify) or someone else’s (which you can not modify).
Who: Cary Millsap, Tanel Põder, Jonathan Lewis, Kerry Osborne
When: 8am–12n US Pacific Time Thursday and Friday 18–19 November 2010
How much: 475 USD (375 USD if you register before 1 November 2010)

The format will be two hours per speaker: an hour and a half for presentation time, and a half hour for questions and answers. Here’s our agenda (all times are listed in USA Pacific Time):

Thursday 8:00a–10:00a Cary Millsap: Thinking Clearly about Performance
10:00a–12:00n Tanel Põder: Understanding and Profiling Execution Plans
Friday 8:00a–10:00a Jonathan Lewis: Writing Your SQL to Help the Optimizer
10:00a–12:00n Kerry Osborne: Controlling Execution Plans (without touching the code)

This is going to be a special event. My staff and I can’t wait to see it ourselves. I hope you will join us.

Munich, Germany (Mr Blue Sky)

I’ve been lucky enough to have a spare day before presenting a seminar to explore the beautiful city of Munich here in not so sunny Germany. I’ve never been to Munich before and my previous knowledge of the city basically consisted of it having a pretty decent football team or two and the location where Jeff Lyne and ELO [...]

Sydney Update

I’m now sitting in my hotel room in Melbourne, so the Sydney experience is complete.

Originally I was told the Oracle University classes would be cancelled if there were less than 10 people. In Singapore I got 9 people, which was the smallest class I had ever taught for Oracle University. I immediately beat that record in Sydney by having 7 people in the class. I’m guessing that from an expenses point of view, the costs are lower because I’m doing four courses in what amounts to a single round trip to Australia. If this were just a single class requiring a requiring a return flight from UK to Sydney it wouldn’t have happened. Anyway…

Day 1 went smoothly. I got a few questions that made me think, which is always good. Once I had finished the class, it was straight off to the train station to get into town to speak at the Oracle Meetup organised by the Pythian guys. The train journey took longer than I expected, so I arrived about 20 minutes late, by which point the projector was irretrievable locked away. So instead I did my presentation with my laptop pointing at the people around the table and did a lot of zooming. :) Despite this setback, which was totally my fault, it seemed to go OK.

It’s always good to meet new people, but I was especially happy to finally meet Nuno “Noons” Souto and Gary Myers, whose blogs I’ve been following for ages and who have both helped me in the past by correcting my numerous mistakes. After the presentation finished and we had an informal chat, it was back to the train station and then the hotel.

Day 2 of the course went smoothly enough. I had finally got something resembling sleep, so I felt a bit more on top of my game. As always, I over ran. If they gave me 3 days I’m sure I would still over run. :)

This morning was a 06:30 flight to Melbourne, so I had to get up at about 04:00 to get ready and get the taxi to the airport. I actually woke up at 03:00, so I guess I’m going to feel a bit rough later. Luckily I’ve got the rest of the day off to recover before I start the Melbourne class tomorrow.

Melbourne was the first class to confirm, so I’m guessing it has a minimum of 10 people, but you never know. Perhaps I can break my record again. :)

On a slightly worrying note, I’m having a bit of trouble with my credit and debit cards. I warned the banks involved that I was travelling so my usage might look a little odd. I also banged some cash onto them to preempt any problems with bills coming in while I was away. Even so, it’s all been a bit random as to which cards are accepted and which cards fail. If all else fails I’ll get Larry to fly me over some cash… :)

Cheers

Tim…