Tuesday, 24 August 2010

Oracle's Broken Links

It seems that like me, people like Tim Hall are finding some of the changes regarding the amalgamation of sites within Oracle a little frustrating.

I've noticed many of the comments within OTN contain links to pages that just aren't there any more.

This OTN entry here mentions a vital link to
http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
which unfortunately redirects to the Oracle Apex overview page
http://www.oracle.com/technetwork/developer-tools/apex/overview/index.html

In an effort to find the contents of this page, I used my friend Google. I took a key part of the URL and used a special search facility that Google has:
inurl:how_to_create_custom_popups

This gave me three results

  1. The original document, which still redirects to the overview page. However, if you click the cached link next the described URL, you can open Google's cached version of the page - which should usually suffice.
  2. Some Xmarks widget, which didn't help me - but I do recommend Xmarks, by the way.
  3. A Japanese hosted version of this page. Google offered to translate it for me, which worked very well. This also solved my problem.

So until Oracle gets up to speed with all the older links, perhaps give the inurl: search option a go.

ScottWE

ps - congrats to Tim for his recent induction into the OakTable Network.

Wednesday, 18 August 2010

Insync 2010 - I wasn't there.

Hello everyone

I'm starting to see a bit of feedback from the Insync Conference 2010 in Melbourne Australia.

It seems Down Under we're still working on creating the conference vibe, but I'm impressed to find a dedicated (yet thin) blog for the Melbourne leg. Here I found interviews with Connor McDonald & Tom Kyte.
I'll note that video of Connor confirms that I'm not the only one that seems to associate alcohol consumption with Oracle. I noted in the latest AUSOUG Foresight Magazine, Marc Lancaster gave a warm review of my appearance at a Brisbane branch meeting - apparently I commented how wonderful the beer & pizza concept is, or something along those lines!

Congratulations to Jeff Kemp, who took out Steven's live PL/SQL Challenge.
http://feuerthoughts.blogspot.com/2010/08/plsql-challenge-live-event-in-melbourne.html
I was looking forward to the live challenge this Friday when Steven comes to Perth, but alas - I have a previous date with our wonderful coastal isle - Rottnest.

Next time, Kempy... next time ;-)

I do look forward to catching up with friends this year at the Perth's leg of the conference series in November, perhaps I'll see you there.

Tuesday, 17 August 2010

All Programmers Should Read Delightfully Creative Information

Now if you think that post title was a little strange, it's because it's a mnemonic.

Now they haven't really worked for me in the past - just like the poem to remember how many days in each month - I found it easier to remember the raw facts than the poem itself. Besides, the knuckle trick was easier.

Anyhow, this is an Oracle related blog, and I wanted to share an idea to remember the Apex URL syntax of:
f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

Most of the time I remember the order fairly well off the top of my head, though sometimes I need to double check; and sometimes within the mix of a bunch of colons it's hard to work out what is what. Perhaps if you're reading a sentence in your head as you move the cursor between colons...
f?p=MY_APP:HOME::::::

So maybe what I (and others) need is a mnemonic to help us remember the order:

AllApplication
ProgrammersPage
Should Session
Read Request
Delightfully Debug
Creative Cache
Information Items
Values
Printer Friendly

I didn't include the last two, since you don't often need to consider the printer friendly attribute and once you have items, you should know values follow. Besides, I tried not to make it too complicated or difficult to remember!

What do you think? Any other suggestions? This really was the first thing that rattled off my head after a productive day of Apexing.

Yup, I also felt like inventing a new verb.

Friday, 13 August 2010

Oracle Sues Google

No, that is not a pun.

Time has been weighed in the favour of personal life recently, but one can't help notice some big news in the local industry.

http://www.zdnet.com/blog/btl/oracle-sues-google-for-java-patent-copyright-infringement/38013

That particular link Scribd the official document, which relates to Google Andoid.

Oracle states "one of the most important technologies Oracle acquired with Sun was the Java platform." Past that slowly dissolved into lawyer speak that I often wonder how our ancient authors of writing could bare to comprehend.

I did notice at the end of page nine a "prayer for relief". Interesting the terminology from all directions that become common-speak. From "googling my employee" to "fall from grace" - sayings and idioms of always been a distant world to me.

Courtesy of Mr Spendolini.

**

On a lighter note, I've been informed I'm doing fairly well this month in Steven (& Finn's) PL/SQL Challenge. I think today's quiz might create some discussion on Steven's associated blog. Hopefully I can keep up my recent form and snare a prize ;-)

Thursday, 15 July 2010

Recursive Subquery Factoring

OK, this post is partially for my benefit because I'm sure in future I'll need to re-think how this works - and I'll want the basic syntax on hand.

From 11g Release 2, the SQL WITH clause has been extended to allow recursive queries. This new syntax complies with the ANSI standards, as opposed to Oracle's CONNECT BY, START WITH keywords.

It's officially called "recursive subquery factoring", but it's also known as tree-walking or a hierarchical query.

Unfortunately in this simple example, the ANSI syntax is somewhat more verbose. I wonder if this evens out as the complexity of the query increases, or if the readability of the code is "scalable"?
-- 10g method
SELECT o.org_id, o.name, o.parent_org_id, level
FROM organisations o
CONNECT BY PRIOR org_id = parent_org_id
START WITH org_id = 1000;

-- 11 method
WITH org_sage (org_id, name, parent_org_id, reportlevel) AS
  (SELECT org_id, name, parent_org_id, 1 reportlevel
   FROM   organisations
   WHERE  org_id = 1000
   UNION ALL
   SELECT o.org_id, o.name, o.parent_org_id, reportlevel+1
   FROM  org_sage p, organisations o
   WHERE p.org_id = o.parent_org_id
)
SELECT org_id, name, parent_org_id, reportlevel
FROM org_sage;
Another unfortunate outcome is a quick test of throughput - 10000 iterations on my laptop gave the following respective timings.
.81 secs
.000081 secs per iteration
3.56 secs
.000356 secs per iteration
So it might be best to compare the two in your scenario/data, and consider the value of using the ANSI format in your case.

Further documentation can on hierarchical queries can found here, and in the SQL Language Reference, under the SELECT statement, looking at subquery factoring.

Remember, the key to understanding recursion is understanding recursion :-)

Wednesday, 7 July 2010

Apex Listener has arrived

For those of you who've missed it amongst all the Apex4.0 hubbub, the Apex Listener that was originally mentioned as being a separate release, is now available.

I've finally managed to get it running on my new Windows 7 64 bit laptop, but that was only after fiddling with the pre-release version and having a few other semi-related difficulties.

I've gone with Glassfish as my HTTP server, using Oracle Glassfish Server 3.0.1


There is now a dedicated OTN forum for the Apex Listener, and I've added forum entries on these problems - which I'm sure along with other little nagging things - the Oracle development will get onto with Glassfish as time goes on.


1) My URL to open Apex Builder requires the slash at the end, otherwise no deal
http://localhost:8080/apex40/

2) Unfortunately when I try to re-visit my listener configuration page
http://localhost:4848/apex40/listenerConfigure/
I get the following error
/apex40/listenerConfigure//index.jsf not found

I'm fairly happy with the set-up, it was relatively easy to do in the end and the new documentation accompanying the release is vastly improved - but Tomcat is no longer supported, only OC4j, WLS and Glassfish.

So now to continue exploring Apex4.0

I must say I'm coming across some improvements to the documentation. Apparently when creating new workspaces for existing schemas, Apex4.0 no longer grants any roles.
From there I noticed that there is a new glossary describing item types. I think this along with the Available Conditions appendix is the sort of documentation that is needed to assist people new to Application Express - that and the context sensitive help within the builder, that is sometimes a little lacking.

I confidence that over time, like all Oracle products, this will improve. I wonder what they're thinking about for the next release...

Thursday, 1 July 2010

Friday Musings

I think it may have been Tom Kyte that originally got me onto Seth Godin, but Seth's latest post caught my eye. I'm furiously finishing off my latest presentation, while trying (and failing) fire up a HTTP server on my new laptop.


A slide every 12 seconds. 200 slides in all.

I tend to read most of his. They're succinct, precise, thought provoking. Creating a 200 slide presentation for a 40 minute block is quite a feat. I know Connor McDonald to have handed a stunned HR girl an eighty slide presentation for a 5 minute segment. He assured her it will take five minutes. It was a stunning presentation. His conference presentations are deserved winners.

I've tinkered with his style, which he picked up long ago from I can't remember where and made it his own. I've been trying to add in that style in my latest masterpiece, balance it with regular diagrams and code segments - which normally slow things down a touch.

If you can make it...
Apex and Oracle Text - Advanced Indexing Techniques Integrated with Application Express
From 16:15-1800, 14th Julye - Central TAFE, 140 Royal Street, East Perth
RSVP: WA AUSOUG President