Wednesday, 26 June 2013

Oracle 12c now up for grabs

For many geeks out there, throw todays productivity out the window - Oracle 12c is now available for Linux/Solaris.

I'm not sure the official press release is out, the documentation sure isn't - but Twitter sure is abuzz.

While searching, I also spotted an article saying the pluggable database component will be a costed option.

Let's see how long it takes Tim Hall to release a string of articles on new features.

Here I was betting on a July release... at least all our Insync13 onference submissions for 12c can be ratified!

Monday, 17 June 2013

Sage Computing Services now on Google+

I've recently created a Google+ page for Sage Computing Services, the wonderful company I work for that has just celebrated 20 years of consulting & training in Perth.

We aim to use this social media presence to announce public training events, community involvement, and anything else we find relevant. No doubt it's usefulness will expand over time.

Check us out!

Thursday, 13 June 2013

Thursday thought: How can you read that?

Every website that has some form of feed needs this option:

Thanks Google+
This sort of responsive web layout isn't always cool, IMHO - it's like watching a tennis match.

Google Web Designer - a HTML5 development tool

So, in the coming months Google will be launching a HTML5 web development tool targeted at creative agencies and designers.

My geeky mind thought about that, remembered geocities and thought - boy we've come a long way.

My APEX mind read that and thought - I wonder how many similarities this may have with a tool like Oracle Application Express, and I wonder what we might be able to learn from it?

I wonder what sort of databases could be attached to it, or maybe a good API into further enhanced HTML5 storage capabilities will make other databases superfluous in this instance?

There are a number of tools out there today that probably do whatever Google is going to do, but with Google's brand and inertia, we might just give the crazies an even more effective tool for duping the masses.

I'm also interested what it might mean for bloggers...?

Tuesday, 11 June 2013

Review: 2013 OTN Forums upgrade

While there is a post discussing the ins/outs of the ugraded forum site, I thought I'd add a summary of what I've found here.

First impressions

Too much dead space (a bugbear of mine), but some key improvements should outweigh what can be fixed or adjusted.
I'm sure I'll get used to the new navigation & layout, but there does seem like some ambiguous double ups exist, eg: Content tab

Note: forums are now 'spaces', and threads are 'discussions'.

With my APEX hat on, it took me a while to find the 'Application Express' space from the home page - it's under 'Database', not 'Development tools' - which I probably would have known if I didn't always bookmark my forums - thankfully those still work, even though you can't open old URLs that include the forumID.
Turns out there is a search region hidden at the bottom of the page.

As for existing notification e-mails, Thread links from emails will not work - Message links are ok, even though the new id doesn't seem to match up to old one:

Basically you can open up old URLs without the forumID - which thankfully means google search results are re-routed

The biggest gripe

This seems to be the list of forum posts is what I might call the IR Detail style, meaning you only see a handful of discussions per page scroll, rather than dozens. I wish there was an option to toggle between views styles.
I thought by maybe 'Following' the Application Express space might make these posts appear in my Content->Following option, but alas - I'm yet to discover what this does or if it works.

As I tidy this post from some initial notes, it seems that the Overview tab for the space is too verbose, while the Content tab shows a view more to my liking - except the first half of the screen is wasted on chaff.

The search appears to be more effective - but I always used to search using Google anyway.

New discussion

Start of a new discussion shows how great the new editor is, various ways to make your postings pretty.
New discussion
The SQL syntax highlight is not fixed width font, which for me negates a true advantage of syntax highlighting.
Will be annoying to use that menu to set syntax, I hope there will be a shortcut like {code}. I saw /pre mentioned somewhere at one point, some people have been asking for a brief manual which I'm sure will be forthcoming with updated FAQ that is easy for newcombers to locate.
Ability to add tables to posts wil probably be nifty, too.

Marking responses

I don't have any responses to give helpful/correct answers, but that functionality appears to have been consolidated and should be a lot easier to interpret, more intuitive and should encourage newer users of forum to indicate what's going on.

At the moment thought it seems you can reward yourself with correct answers. This may help some complaints of missing/extra points, which will be looked at. At the moment it seems missing points due to old threads that were always marked for deletion. My theory for extra points are for unrewarded single responses to answered questions. I think I'm about 150-200 points up, and this seems like a fair guess.

Layout of discussions are nicer, softened, contemporary. The syntax highlighting is great!
Reply a lot better, just some fanciness that opens a text area on the bottom of the page, making it a lot easier to reference older information
Old layout
New layout
I haven't been active enough yet to see how it really handles, or what's going on with the new notification e-mails, but there is chatter about it on the upgrade discussion.

Account settings

Existing bio information is mostly gone, just your name and status level, with a nearby legend. You are supposed to be able to add it back in Edit Profile (drop down near your name), but I haven't yet been able to save this.

There is a message on the home page regarding known issues, and you can find your old posts under Browse->Content->Participated

Posts related to you
Activity isn't too dissimilar from the IR detail style report for the Space overview, but I found the Content tab a lot more useful, listing 'Authored','Participated','Following' as different options
I think this shows the value of simple, row by row reports - though it has an option to change to a view that merges 'iconic' with discussion text and quicklinks.

Avatar can be changed in the Activity tab for your account, but only to list of icons (for now). Other Preferences changed here also.

Friends is obviously reminding everyone of Facebook, but you might also read it as 'Interesting people' that you might tag to keep an eye on their comments.
Having Friends also allows you to use the @ sign to make them aware of posts.

The Tasks tab option is currently disabled, although you will get emails regarding action items (when you get friends) that take you to the main 'Task List'. More ambiguity.

Speaking of ambiguity - the content is different depending on if you come from main Browse tab; account detail or the Space you're in - for instance I can see 'Jive Genius' option via the Browse tab..


I think it has been worth the wait, and we always expected some people to be happy/unhappy - so give Sonya & the team some kudos for some very hard work and be patient while the wrinkles are ironed out.


Friday, 7 June 2013

Highlight cell background in APEX report

It seems a very common question in APEX is how do you highlight the background of cells within reports?

There is a heap of information out there, and some of it is becoming dated so I thought I'd offer what seems to be an elegant solution - particularly when you're not targeting a specific column.

We can thank Tyler Muth for an APEX 3.x compatible solution that highlights the text within the column. He described how to use the HTML Expression column attribute - I still use this frequently today.

There are a few solutions that use report templates, but they can be a little fiddly and I don't find them as flexible.

Jari Laine brings us into the APEX 4.x world using jQuery within a dynamic action.

Then I found this stackoverflow post by Tom Petrus (who has also assisted me with jQuery on the OTN forums), which I thought I could adapt for my purposes.

Since I wanted to highlight cells with certain values regardless of column/row, I defined a classic report with a static ID of 'pivot' with the PIVOT sql found in this post.

I added this to the "Execute when Page Loads" page attribute - it could utilised within a dynamic action, if required.
$("#report_pivot tbody tr td").each(function(){
   if ($(this).attr('headers') != 'TOT') {
     if (parseInt($(this).text()) < 1000)
     else if(parseInt($(this).text()) > 2000)
I wanted to ignore the 'Total' column, so I found the first IF statement satisfies that easier than a CSS exclusion clause.
This block could be adapted to do all sorts of things - for instance, I've cleared out the cells in other reports where the value equals 100.

I also added this as inline CSS just to border all the report cells.
table.uReportStandard>tbody>tr>td {
  border: 1px solid #ddd;
Here is a screenshot of the final output.
Classic Report with cell highlighting

Run the demo to see it in action.
Note all under 1000 are orange, and above 2000 are green.
This is done after the page is generated.

Monday, 3 June 2013

Ubuntu Milestones - Oracle

For many, many years I've yearned to move away from windows. Everyone has their reasons, some have motivation, I finally had opportunity to make some baby steps.

I needed to set up an environment using APEX 3.2, and I had an old XP laptop that I finally moved my ipod synch off so I figured it was free to experiment with. I was already running it with dual boot, but I never pulled my finger out to restart & play around with the Ubuntu half.

Earlier in the year I experimented a little with Ubuntu using VirtualBox on my existing Windows7 laptop - I've even drafted a blog post rambling about my experience, but I've got some fresh thoughts with my recent jump in the deep end.

First impressions - it's an OS worth me pursuing.

It's certainly a cultural change. Of course, you need to be able to do many of the same type of operations - move files, close windows, setup Oracle... but to use a balinese catch phrase - it's same same, but different.

Installing Oracle

I was a little bit of a cowboy with this - while I was keeping note of the websites that I was using as a reference, I didn't take note of each command I performed. This was going to be a temporary db, and I figured this first attempt justified a little gun-ho action.

Besides, my ultimate plan is to use Virtualbox to run different environments in their own confined buckets. This old laptop is destined to be a sandpit.

I used this Linoob address to help install the db. In the end I'm pretty sure the apt-get just opened up the software centre.
Oracle in Ubuntu Software Centre
I think it's a selling point for this particular distribution of *nix based systems, installing software is just like searching Google Play or the Apple Store - they aren't the scary domain of sysadmins anymore.

Setting up SQL Developer was a little more tricky since there is no download available specifically for Ubuntu. Instead, there is a package builder for .deb packages, so I still just needed to download the base file, run a few commands and it could be installed no problem.

Installing a JDK to support SQL Developer was a little more interesting. I used the manual option, which again is just a list of commands. I'm positive I haven't put the JDK folder in a 'typical' location, but that's the burn of learning.

Having to run commands like this in a way reminds me of the days of DOS, which you could take as no really progressing from the Windows environment of just clicking "Next" - but I don't see this as a con. I see it as liberation, a way to gain flexibility. Some of the commands seem foreign now, but I don't think it's far away from recognisable, then second nature.

All that being said, you could look at setting up SQL Developer in Ubuntu on par with setting it up in Windows. In the latter, I still need do download a set of files, extract, and on first run point it to the java.exe that I always need a few attempts with getting the path just right. In Ubuntu, I surprisingly got this path first go!

The only oops I did was download the latest and greatest JDK (7), which SQL Developer is not ready to support, though it ran anyway. I'll fix that later...

The closest I got to the OS was when I had to add my user account to the DBA group. I needed to do this before the database fired up. After an initial scare of making it all this way and not being sure why it wouldn't start - I found a pretty clear instruction on the OTN forum.

With all this gun slinging, I forgot to configure the DB.
/etc/init.d/oracle-xe configure

Configuring APEX

From here it was familiar territory in upgrading APEX from v2 to my target of v3.2.1

These commands I could run from SQL Developer

Load images to EPG (I wasn't game to attempt APEX Listener just yet)
@apxldimg.sql /home/scott

Unlock the public user account (I was doing this mostly from memory, after setting up APEX so often, I even remembered this one after my attempt to log in just stalled in the browser)

The only script that didn't want to run from SQL Developer was the one to change the ADMIN password (apxchpwd.sql)
Instead, I just pasted the code in the SQL worksheet and ran it from there.

Restarting the OS

After restarting, the database didn't restart (an option I chose), but the scripts in the menu did not work. Again, I think this just came down to me lacking understanding of some permission issues, and I found a command that worked for me.
sudo /etc/init.d/oracle-xe restart


I got up and running in a few distracted hours. While there was a few hurdles, there was never anything that really concerned me or had me stuck for too long. Google was my dear friend, but I'll keep perusing my Beginning Ubuntu Linux book.

Next I'll be looking for alternatives to some programs I regularly use in Windows.