Archive for September, 2008

Back to the real world

You know, I think SF’s mayor has it right, San Francisco is 47 square miles surrounded by reality. I love San Francisco, and every time I am there I walk all over the city. But there are sights there that you will not find anywhere else!

It was great to meet many of you and put a face to the emails.   My presentations went well, I think my first one on RAC and ASM was more polished, but overall I am happy with them.  You can find both of them posted now on the presentations page.

Top thoughts on Openworld:

  1. Comfortable shoes are a must, but not brand new shoes! (my feet still hurt)
  2. The people were great and smart, excellent questions and answers.
  3. My daughter wants a giant Oracle beanbag now.
  4. Can you say “$1.2 million giant IPod?”
  5. If James Carville and Mary Matalin can get along, anybody can.
  6. (bonus) the four bravest people I ever saw: the four McCain supporters on a corner in downtown SF.  Polite to the end to all the people, even the ones that treated them poorly.

Well, back to work, Oracle, RAC, VM and toasters!

No Comments

Larry Ellison Keynote – Oracle Openworld

What a line, it was about 1/2 mile long, around the front of Moscone North, down the side of the Metreon and in front of the Yerba Buena Gardens, all to get in and see the big man himself.

Safra is out now previewing the partnership with HP, which I know pretty well. Ann Livermore, EVP for HP is out to speak on the partnership with Oracle. HP is now over 300,000 employees with the purchase of EDS (though I hear quite a few will be laid off in the next three years). HP is now #2 as a services company only to Big Blue itself, IBM.

Ann is going over the move of HP from 80+ data centers to 6 and 6000 applications to 1600 and have reduced data center operations to 2% of revenue. Cost, size and the greening of IT is a cost for everyone, but I have been working with HP Blade Servers (c3000 and c7000) for some time now and I am quite impressed.

Intermission and I now know why they didn’t bring the Oracle/BMW racing boat into the Moscone Center this year, the new one is an ultra fast and huge hydrofoil tri-maran.

Raw Iron part deux – Larry is up now and talking about the storage subsystems bandwidth problem that is happening even now. Oracle is going into the hardware business, but not alone, building the Exadata server with HP. 12TB of raw storage, 8 cores (dual quad-core), 2 1GB Infiniband pipes per server and moved the parallel query software into the firmware of the disk drive. So he is creating a storage grid to work with a database grid. This is great for DW or datamart apps, but I am not sure how this will help OLTP and OLAP applications, no data as of today. While it is immediately available today, but only on 32bit Linux. I have see this before and it drives me crazy, 64-bit x86 is the norm now, why is Oracle developing directly on 64bit?

Larry and Mark Hurd are speaking together in a mutual admiration society. I should be nicer, Mark Hurd had done a really good job turning HP around and taking it from a company that had only one profitable division (printers) to a thriving company. Larry, he goes without saying, arrogant, sure, but one of the best forward thinkers I have ever seen, I sure wish I had kept my stock from the 90’s in Oracle that I purchased when I was am employee! That is all for the final keynote of the session, I am off to give my first presentation now.

, ,

No Comments

It’s Larry Day

Those of you with kids will understand that I now have the tune to “Larry Boy” from VeggieTales in my head! Wednesday is the traditional big day here at Openworld for Larry Ellison to give all of us his feel on the state of technology and any major announcements for Oracle. I will be blogging live from the keynote.

Today is also my big day, I will be presenting my first of two sessions today at 5p, I know my subject matter, but still get a little nervous before these things as I don’t want to miss any points.

,

No Comments

Openworld Opening Keynote

San Francisco – 9a PDT – Charles Phillips the president of Oracle kicked off the first full day of Openworld by demonstrating the changes (via aquisition and development) to the Oracle application stack in the last few years. He was very clear that Oracle had captured a large market share and the top spots in most industries. Oracle grew by 25% this year and 78% in the last three years. Yep, Oracle is a stable and growing company. The integration of Peoplesoft, Seibel, BEA and the other 50 companies that Oracle has acquired in the last few years has gone better than I ever would have guessed and has really pushed Oracle to the forefront of the applications and middleware business.

Charles announced (and introduced) Olympian Michael Phelps and spoke with him for a few minutes about his training regime, compariing it to the average Oracle developer. No comparison! Michael will be back later as part of the NetApp keynote.

Oracle Beehive as been the “buzz” of the early conference and was announce by Chuck Rozwat this morning, it is an integration and collaboration tool for email, voicemail, search, conferencing , wikis, etc. Centralized by policy and security and all run on an Oracle database. It can use Oracle’s or industry standard clients (Outlook, etc) on Windows (Active Directory) and Linux. Fully Web 2.0 it can run as an Exchange server or in place of one (or 200).
It looks like a pretty cool tool, the demo shows Outlook that can store documents, presentations, chat transcripts, etc., in personal workspaces accessed directly from Outlook. I must say, it would be nice to access all the Sharepoint docs I use almost daily directly from Outlook since I am running that tool all day.

Oracle Database – Oracle now at 49.5% of database market share. 11.1.0.7 is released finally, the firest patchset for 11g. Also in new announcements, in-memory cache by integrating the TimesTen software. Not as many updates as I had hoped (11gR2).

Oracle Linux –
BTRFS File system – favorite filesystem now a default.

VM – VM guest failover, optimized by 16% with Intel. Oracle product Certification including RAC! That is going to shake things up at work considering the bias toward other VM companies.

Metalink is being replaced/updated by “My Oracle Support” which makes much more use of the configuration managment tool and more personalized design.

That is it for the first keynote. More will be coming as it happens.

No Comments

Off to Openworld

Oracle Openworld officially starts on Sunday, but I will fly in tomorrow to avoid the rush of the crowds. From what I am hearing, there are going to be a few important announcements about the future direction of the Oracle Database. I have been asked by several reporters now about what I know, but, what I know will have to stay with me for a while more!

RAC is, of course, one of the main topics I will be searching out, but will also be attending presentations on security, VM and storage. I am not much for keynotes (they remind me of political stump speeches), but will go a few that may reveal future directions.

I will be writing about some of the announcements and other important information I learn while in San Francisco, visiting old friends and meeting new ones. Feel free to say hello any time or at one of the sessions I am presenting.

No Comments

TOD – Compressing exports on the fly

There is a tip on compressing those wily exports, when there isn’t enough space to store an uncompressed export. I have been doing this since I got off of VMS and on to unix back at V7 and it works fine all the way through 11g exp and datapump.

Perform all of these commands as the oracle user.
1. create a named pipe in unix:

 $ mknod /tmp/pp p

2. Send the output of a compression command (gzip, compress, etc) to the pipe in the background:

$ gzip < /tmp/pp > /backup/full_exp.dmp.gz &
or
$ compress < /tmp/pp > /backup/full_exp.dmp.Z &

3. Send the output of your export command to the named pipe:

 $ exp sys/joepassword file=/tmp/pp full=y ...

That is all there is to it, to import from the same compressed file:
1. make the pipe again if not already there
2. start up a background process to run the uncompress:

$ gunzip < /backup/full_exp.dmp.gz > /tmp/pp &

3. finally import as you normally would:

 $ imp sys/joepassword file=/tmp/pp full=y ...

You can always uncompress the files manually then import if you wish.

, , , ,

No Comments

Adding a LUN for ASM Use to a RHEL 4/PowerPath Database Server

This procedure assumes using the Qlogic drivers and PowerPath 4.5.1, all installed. In a RAC, the steps are divided into “first node” steps , “Remaining Node(s)” steps and “Updating the ASM Instance”. For a standalone on SAN database server, the “Remaining Node(s)” step can be skipped.

Whenever performing a procedure like this one that will alter SAN/Disk layout on the fly, make sure that you have adequate backups of the database and the system in the unlikely event that something goes wrong.

First Node Steps:
Choose one node where all of the initial work will be done. Later a subset of these steps will be applied to the other cluster nodes.
1. Using the SAN software, present the new LUNS to the Linux nodes.
2. Get a list of the current visible LUNs for later reference using powermt, or a wrapper like:

# /stage/mck_ks/bin/map_pp_pseudo2lun
/dev/emcpowera = LUN 165
/dev/emcpowerb = LUN 330
/dev/emcpowerc = LUN 423
/dev/emcpowerd = LUN 422
/dev/emcpowere = LUN 420
/dev/emcpowerf = LUN 331
/dev/emcpowerg = LUN 421
/dev/emcpowerh = LUN 335

3. Reboot the node (or rescan the SCSI bus)
a. Rebooting is the supported method to rescan the SCSI bus
b. To rescan (experimental), run: /root/rescan_for_luns

4. Using powermt, (or its wrapper), identify the new LUNs:

# /stage/mck_ks/bin/map_pp_pseudo2lun
/dev/emcpowera = LUN 165
/dev/emcpowerb = LUN 330
/dev/emcpowerc = LUN 423
/dev/emcpowerd = LUN 422
/dev/emcpowere = LUN 420
/dev/emcpowerf = LUN 331
/dev/emcpowerg = LUN 421
/dev/emcpowerh = LUN 335
/dev/emcpoweri = LUN 369

5. Partition the new LUNs so they can be used for ASM. For EACH new LUN added run the following (the newlines matter!):

cat < < EOF | fdisk /dev/emcpower<newdevice>
n
p
1
1
 
w
EOF

6. Using powermt, identify the “path” devices. These are the “sdXX” devices in the output below. In the next step we’ll change the ownership of these devices.

# powermt display dev=emcpower<device>
Pseudo name=emcpoweri
CLARiiON ID=APM00031200473 [SG: HA Linux RAC 10g]
Logical device ID=6006016069C30A0004A2400E993ADA11 [LUN 369]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP B
==========================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==========================================================
   1 qla2xxx           sdah      SP B2     active  alive      0      0
   1 qla2xxx           sdai      SP A1     active  alive      0      0
   2 qla2xxx           sdaj      SP A3     active  alive      0      0
   2 qla2xxx           sdak      SP B1     active  alive      0      0</device>

7. Now using the pseudo device name and the “path” device names change the ownership so Oracle can use them and change the Udev permissions file, so these are owned correctly after reboots (the device names below are samples taken from the output above):

for i in emcpoweri sdah sdai sdaj sdak
do
    chown oracle:dba /dev/${i}1
     echo "${i}1:oracle:dba:0660" >> /etc/udev/permissions.d/10-oracle-devices.permissions
done

8. Using the oracleasm command, determine the labels for the current ASM disks. The new disks will generally labeled in the same pattern with the next highest numbers:

# service oracleasm listdisks
VOL001
VOL002
VOL003
VOL004

9. Now label the new disk(s) with the oracleasm command. RE-run and increment the label until all the new disks are done (the example below added emcpoweri1).

# service oracleasm createdisk VOL005 /dev/emcpoweri1
Marking disk "/dev/emcpoweri1" as an ASM disk:           [  OK  ]

10. Now confirm that the new disks are labeled using the ‘oracleam listdisks’ command. The new disk should show up.

# service oracleasm listdisks
VOL001
VOL002
VOL003
VOL004
VOL005

Remaining Node(s) Steps:
These steps need to be performed on ALL the remaining RAC nodes AFTER the above has been completed. For standalone DB servers, skip these steps.

1. Using the SAN software, present the new LUNS to the Linux nodes.
2. Get a list of the current visible LUNs for later reference using powermt, or a wrapper like:

# /stage/mck_ks/bin/map_pp_pseudo2lun
/dev/emcpowera = LUN 165
/dev/emcpowerb = LUN 330
/dev/emcpowerc = LUN 423
/dev/emcpowerd = LUN 422
/dev/emcpowere = LUN 420
/dev/emcpowerf = LUN 331
/dev/emcpowerg = LUN 421
/dev/emcpowerh = LUN 335

3. Reboot the node (or rescan the SCSI bus)
a. Rebooting is the supported method to rescan the SCSI bus
b. To rescan (experimental), run: /root/rescan_for_luns

4. Using powermt, (or its wrapper), identify the new LUNs:

# /stage/mck_ks/bin/map_pp_pseudo2lun
/dev/emcpowera = LUN 165
/dev/emcpowerb = LUN 330
/dev/emcpowerc = LUN 423
/dev/emcpowerd = LUN 422
/dev/emcpowere = LUN 420
/dev/emcpowerf = LUN 331
/dev/emcpowerg = LUN 421
/dev/emcpowerh = LUN 335
/dev/emcpoweri = LUN 369

5. Using powermt, identify the “path” devices. These are the “sdXX” devices in the output below. In the next step we’ll change the ownership of these devices.

# powermt display dev=emcpower<device>
Pseudo name=emcpoweri
CLARiiON ID=APM00031200473 [SG: HA Linux RAC 10g]
Logical device ID=6006016069C30A0004A2400E993ADA11 [LUN 369]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP B
==========================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==========================================================
   1 qla2xxx           sdah      SP B2     active  alive      0      0
   1 qla2xxx           sdai      SP A1     active  alive      0      0
   2 qla2xxx           sdaj      SP A3     active  alive      0      0
   2 qla2xxx           sdak      SP B1     active  alive      0      0</device>

6. Now using the Pseudo device name and the “path” device names change the ownership so Oracle can use them and change the Udev permissions file, so these are owned correctly after reboots (the device names below are samples taken from the output above):

for i in emcpoweri sdah sdai sdaj sdak
do
    partprobe /dev/$i
    chown oracle:dba /dev/${i}1
    echo "${i}1:oracle:dba:0660" >> /etc/udev/permissions.d/10-oracle-devices.permissions
done

7. Using the oracleasm command, determine the labels for the current ASM disks. The new disks will generally labeled in the same pattern with the next highest numbers:

# service oracleasm listdisks
VOL001
VOL002
VOL003
VOL004

8. Now scan the ASM disks to add the new ones:

# service oracleasm scandisks
Scanning system for ASM disks:                           [  OK  ]

9. Now confirm that the new disks are labeled using the ‘oracleam listdisks’ command. The new disk should show up.

# service oracleasm listdisks
VOL001
VOL002
VOL003
VOL004
VOL005

Updating the ASM instance:
All of these steps must be performed as the oracle user and only AFTER the above steps have been successfully completed for ALL nodes in the cluster. In a RAC cluster, this step needs to be completed on only ONE node in the cluster; since the database is shared, the others will get the change.

1. Make sure you set your SID to ‘+ASM’:

/home/oracle:(+ASM)$ . oraenv
ORACLE_SID = [+ASM] ? +ASM

2. Log in to the ASM instance as sysdba.

/home/oracle:(+ASM)$ sqlplus "/ as sysdba"

3. Now use the following command to add the new ASM disks to the disk group. Notice you can use some vary basic regular expressions in the naming of the volumes. In the case below, we added ASM VOL002, VOL003, VOL004. Don’t try to add already existing volumes, otherwise the whole command will error out, so customize the volume name portion below to reflect your naming scheme for the new LUNs.

SQL> alter diskgroup dgroup1 add disk 'ORCL:VOL00[234]';
Diskgroup altered.

4. You can verify the new disk by running the following SQL script:

SQL> @/home/oracle/asm/asm_disks.sql
 
DiskGroup NamePath  FileName FailGroup FileSize(MB) UsedSize(MB) Pct.Used
--------------- ----------------- -------------------- ------------------
DGROUP1 ORCL:VOL001  VOL001    VOL001    15,359          7,338     47.78
        ORCL:VOL002  VOL002    VOL002    51,199          2,525      4.93
        ORCL:VOL003  VOL003    VOL003    51,199          2,525      4.93
        ORCL:VOL004  VOL004    VOL004    51,199          2,525      4.93
                                        -------------- --------------
Grand Total:                             168,956         14,913

, , ,

No Comments

TOD – How to check if a LUN is used by ASM

ASM is down, init+ASM.ora is gone and you need to see which luns are owned by ASM, if on linux you can generally use the “service oracleasm” command to find the luns that have been marked for use with ASM.  On other platforms the oracleasm service is not available, how then to check?   You can use the od command to check the first few lines of a lun, it will display “ORCLDISK” and the diskgroup in the first five lines if part of and ASM diskgroup:

/dev:()$ od -c /dev/hdiskpower10 | more         
0000000   \0 202 001 001  \0  \0  \0  \0 200  \0  \0  \0 211 341   $ 207
0000020   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   O   R   C   L   D   I   S   K  \0  \0  \0  \0  \0  \0  \0  \0
0000060   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100   \n 020  \0  \0  \0  \0 001 003 D   G   R   O   U   P   1  _
0000120    0   0   0   0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140   \0  \0  \0  \0  \0  \0  \0  \0   D   G   R   O   U   P   1  \0
0000160   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200   \0  \0  \0  \0  \0  \0  \0  \0   D   G   R   O   U   P   1   _
0000220    0   0   0   0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000240   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

You can see above that this lun is part of diskgroup dgroup1.

No Comments