Search

OakieTags

Who's online

There are currently 0 users and 36 guests online.

Recent comments

Affiliations

Uncategorized

Meaningless Support

Grrrrgh. I can sort of cope with the oracle.com technet homepage randomly appearing in Chinese. That’s just annoying. On the other hand I really do want http://support.oracle.com to actually work reliably and sensibly. Once again it didn’t for me today. Specifically I was trying to update an SR – I entered the SR update text, [...]

Solaris AWK still broken after all these years

It’s amazing how time flies. I’ve got the above book sitting on my desk at work. It’s the only book on my desk at work. Its probably my favorite computer book for it’s terse clear style and simple power. I’ve keep it for about 20 years, and 20 years later, I’d expect any bugs in basic code examples to be worked out. For the most part on most platforms this is true, but not Solaris.
AWK is an awesome utility always available on UNIX and makes a perfect tool to for scripts that will run anywhere with no need for dependencies nor if’s, and’s or but’s. For that reason it’s all the more dissapointing that the default awk on Solaris is broken for syntaxes that were valid over 20 years ago. On the default awk on Solaris the following are broken
  1. awk -vVAR=value
  2. if ( $0 ~ “string” )
  3. gsub , sub

Probably the most useful thing to know is for point 1, passing in a shell variable, you can do it by setting a variable in the shell such as “VAR=10″ and accessing it in the awk script with:
 VAR="'"$VAR"'"
Point 2, the if construct can be gotten around a bit less elegantly  with

 /string/   { ...

Point 3, gsub and sub are broken is just plain annoying and it takes writing your own routines with index and substr.
Which was too bad for me. I wanted to write a script to eliminate more than 2 redo logs from database creation for “scratch” databases. I don’t know if you can imagine a create script like:
STARTUP NOMOUNT pfile='/mnt/provision/redo2a/datafile/initredo2a.ora.provision'
CREATE CONTROLFILE REUSE SET DATABASE "redo2a" RESETLOGS ARCHIVELOG
MAXLOGFILES $MAXLOGFILES
MAXLOGMEMBERS $MAXLOGMEMBERS
MAXDATAFILES $MAXDATAFILES
MAXINSTANCES $MAXINSTANCES
MAXLOGHISTORY $MAXLOGHISTORY
LOGFILE
GROUP 1(
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/redo01.log',
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/redo01a.log'

) SIZE 52428800,
GROUP 2(
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/redo02.log',
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/redo02a.log'

) SIZE 52428800,
GROUP 3(
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/redo03.log'
) SIZE 52428800
DATAFILE
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/system01.dbf',
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/undotbs01.dbf',
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/sysaux01.dbf',
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/users01.dbf',
'/mnt/provision/redo2a/datafile/opt/oracle/oradata/homer/t1.dbf'
$CHARACTER_SET
;

I just wanted 2 redo logs and one member for group, so I wanted to pull out all that’s highlighted in orange. Simple with AWK:
cat ${MNTDIR}/doCreateControlFile.sh | \awk -vNREDO="$NREDO" 'BEGIN { output="on" members="off" nlogs=0 last="no"}{# membersif ( $0 ~ "GROUP"     ) { members="on" ; nlogs=0}# outputif ( $0 ~ NREDO       ) { last="yes" }if ( $0 ~ "DATAFILE"  ) { output="on"  }if ( $0 ~ "SIZE"      ) { members="off" ; nlogs=0}if ( output == "on"   ) {   nlogs++       gsub(/,/,"") } if ( nlogs < last ="=" last = "no" output="off"> /tmp/redo2.$$
The script works on AIX, HPUX, Redhat but not on Solaris. For Solaris I had a few choices. I could try and use nawk or gawk which would require me using some sort of “ifdef” and even then using nawk would require some changes. AFAIK gawk would have to be installed on the machines, thus ruling it out. For me, I wanted the safest option. The safest option for me was just to re-write the code in a way that worked around the bugs on Solaris default awk.
cat ${MNTDIR}/doCreateControlFile.sh | \awk  'BEGIN {output="on"members="off"nlogs=0last="no"size="no"NREDO="'"$NREDO"'"}/DATAFILE/               { output="on"  } # turn output back on/SIZE/                   { members="off" ; nlogs=0; size="yes"}  # end of group members/GROUP/                  { members="on"  ; nlogs=-1 }  # start counting group members{ if ( index($0,NREDO) )   last="yes"    } # reach the maximum  of redo logs to recreate{if ( output == "on"   ) {str=$0if ( members == "on"  ) { # we are in the log member section   nlogs++             # count members   i=index(str,",");   # get rid of comma at end of line   if ( i > 0 ) {       str=substr(str,0,i-1)   }}if ( nlogs < size ="=" last ="=" str="$0" i="index(str,"> 0 ) {                str=substr(str,0,i-1)            }            last = "no"            output="off"   # we reach max # of redo logs, turn output off till we see DATAFILE         }      }      print str   }}}{ size = "no" }'  > /tmp/redo2.$$

UKOUG Presentation

I had a recent email enquiry after the slides from my talk at the technically excellent UKOUG Conference since problems with the website are preventing downloads currently. Reproduced below by way of a heads up is my email explaining that the slides are now available via the web, including to non-UKOUG members. Please feel free [...]

Job Openings for Oracle experts

You know it’s a good company when the support desk looks like this:

Delphix, the company I’ve been at for the past month, is hiring! We are interested primarily in Oracle expertise centered around backup and recovery, rman, dataguard and ASM.
Big plus for solid knowledge of NFS, storage systems, zfs and networking with an eye for performance tuning.
We are looking for sales consultants, support, engineers and QA.
I’m super happy with this new position – small company where everyone makes an impact and the people are super smart, motivated and experienced.
We’ve got an amazing team from the the creators of Dtrace and zfs to principle players in the development of Oracle RAC, cache fusion and dataguard to the founder of Avamar and the marketing VP who took VMware public. Come join us !
If interested, contact me at kyle.hailey @ delphix dot com.

Delphix turns physical database infrastructure into software that can run in a fraction of the space, automating some of the most challenging and time consuming operations in the datacenter: refreshing and provisioning of databases. With our database virtualization software, enterprises can reduce complex provisioning tasks from 10 days to 10 seconds and shrink 10 TB into 1 TB.
Enterprises typically create multiple copies of production databases for development, testing, QA, staging, UAT, pilots, training, operational reporting, etc. By linking with production databases via standard APIs, Delphix enables the benefits of consolidation and virtualization for all supporting database infrastructure—with no need to make changes to production systems. As a result, an investment in Delphix can generate a high-impact ROI with very low risk.
The team at Delphix has been responsible for developing products that have generated billions in annual revenue, including Oracle RAC, used in more than 20% of Oracle deployments, and EMC Avamar, the solution that pioneered data de-duplication, one of the fastest growing technologies in datacenters today. Our board of directors includes founding board members for Oracle, Business Objects, Informatica, Riverbed, Brocade, and Avamar. One of our lead investors was the co-founding chairman of Oracle, founding chairman of Business Object and founding chairman of Informatica. Our Advisory board has a number of recognized industry icons including the original WW VP’S of Field ops from Oracle and VMware. I We are head quartered in Palo Alto. Delphix will be hard to beat in terms of working on very interesting technology, a great business, and the ability to grow both your career and technical ability.

Hash Aggregation

It’s a week for polls !

Following a few comments on an old posting about the hash aggregation mechanism introduced by Oracle 10g (possibly 10.2) I’ve added a poll to my last comment to see how many people have had sufficient problems with it that they’ve decided to disable the feature. If you want to add your vote (and make a comment) go to: http://jonathanlewis.wordpress.com/2008/12/21/group-by/#comment-37975

I’ll be deleting this pointer in a few days, so I’ve disabled the comment and pingback features.

Update 2nd Dec: From a small starting sample (which isn’t necessarily a valid sample, of course) the poll is giving the impression that a significant number of people saw problems with this feature in 10g, but that the problems may have been eliminated by 11g.

A Year Older, Any Wiser?

November 30, 2010 (Updated December 1, 2010) It feels a bit strange, but this blog went live a year ago today.  What was the motivation for creating the blog?  At the time I was comtemplating creating a publically accessible Oracle Database related blog, I already had a restricted-access Oracle blog, and if I was lucky [...]

VPD / FGAC / RLS

That’s “Virtual Private Database”, “Fine Grained Access Control”, or “Row-level Security” – three different names for the same feature. (Four if you include the separately licensed Oracle Label Security (OLS) which is a product built on top of RLS).

I’ve just seen a nice presentation from John Batchelor of Sopra hitting the key points of intent, implementation and threat from this (free) product and wondered how many sites used it. So I’ve put up a little poll about usage, with a follow-up for those who do use it about the impact on their system.

If you have any problems, insights, or comments relating to the product please feel free to add them as comments to the post. I can’t promise to offer any response – but other readers might have some relevant contribution to make.





NFS and IO testing : Bonnie++

Been spending time lately testing out and trying to tune NFS mounts.
For testing IO, I’ve been using
  • dd
  • iozone
  • bonnie++
  • orion
This first option, dd, is fine for file creation tests and/or sequential reads but less flexible for random reads or random writes
To test random reads I thought I’d use iozone but don’t see a solely random read test.
Then I thought I’d use the Oracle supplied tool, orion, to do random read test on an NFS mounted file system, but this doesn’t work, at least on AIX 6.1, with my mount settings.
First orion test gave this error
$ orion -run simple -testname orion
ORION: ORacle IO Numbers — Version 11.1.0.7.0
orion_20101123_1503
rwbase_read_luncfg: SlfFopen error on orion.lun
orion_parse_args: rwbase_read_luncfg failed

OK, have to create “orion.lun” with either my lun locations or my file locations. I put in file locations:

$ cat orion.lun
/tmp/system01.dbf
Now get another error
$ orion -run simple -testname orion
ORION: ORacle IO Numbers — Version 11.1.0.7.0
orion_20101123_1508
Test will take approximately 9 minutes
Larger caches may take longer
orion_spawn: skgpspawn failed: Error category: 27155, Detail: 2
orion_main: orion_spawn failed
Non test error occurred
Orion exiting
Illegal instruction(coredump)
Looks like the “orion” executable wasn’t being found, at least not by execve
$ truss -f orion -run simple -testname orion
700502: execve(“orion”, 0x0FFFFFFFFFFBF2D0, 0x0FFFFFFFFFFFFB30) Err#2 ENOENT
so I ran it from my bin directory where the orion executable could be found. Now get another error
$ orion -run simple -testname orion
ORION: ORacle IO Numbers — Version 11.1.0.7.0
orion_20101123_1510
Test will take approximately 9 minutes
Larger caches may take longer
storax_skgfr_openfiles: File identification failed on /kyle/system01.dbf
OER 27054: please look up error in Oracle documentation
Additional information: 6
rwbase_lio_init_luns: lun_openvols failed
rwbase_rwluns: rwbase_lio_init_luns failed
orion_thread_main: rw_luns failed
Non test error occurred
Orion exiting
If the datafile was on “/tmp” it word fine but if it was on my NFS mount it failed with the above error. Hmm – doesn’t work over NFS?
Finally I decided to try bonnie++. I download, unziped, tar extracted bonnie++ , ran “./configure” and then make, but got error
$ make
make: 1254-002 Cannot find a rule to create target bon_io.o from dependencies.
Stop.
For some reason the rule for the “.o” doesn’t seem to work:
%.o: %.cpp %.h bonnie.h port.h
$(CXX) -c $&lt
Not feeling like trying to figure make out I just did it by hand
$ for i in *cpp; do
name=`echo $i | sed -e ‘s/.cpp//’`
echo “g++ -c $name.cpp $name.h bonnie.h port.h”
done > makeo
$ sh makeo
$ make

That worked. Test results coming

New Features

… but only a reference.

Arup Nanda, who wrote a series on 10g New Features and then 11g new features for Oracle Magazine, has just published a short note pointing out that Oracle has been busy doing a little house-keeping on their website(s) and this has resulted his articles moving.

If you want to read some really good material (the how and the why, as well as the what) on the more significant feartures of 10g and 11g, then following this link to Arup’s Blog.

Virtual Conference on Oracle Performance!

The E2SN Virtual Conferences are webinar-style online training sessions, but just like at conferences, you can listen to multiple top speakers within a single event.
The standard conference consists of 4 x 1.5 hour presentations with 30-minute Q & A sessions after each presentation. The four sessions are spread across two days, so the conference takes only four hours per day. So, in addition to not even having to leave your desk for learning from world’s top experts, you can still get your important work done in the office, too!
The first scheduled virtual conference is focusing on a walk-through on Systematic Oracle SQL Optimization, with emphasis on practical applications and real-life scenarios.

Systematic Oracle SQL Optimization virtual conference:

  • The speakers are: Cary Millsap, Jonathan Lewis, Kerry Osborne and Tanel Poder

  • The conference takes place on 18. and 19. November ( 2 x 0.5 days )
  • The time of the conference sessions is: 08:00am – 12:00pm Pacific Standard Time (PST) on both days
  • For this inaugural event we have a special launch price of 475 USD per attendee!

Click here for agenda, abstract and registration….