The Dark Side Calling

I am not a great telephonic communicator. As a general rule, I hate talking to anyone on the ‘phone, much preferring a carefully-crafted email. Thus I came very late to the world of smartphones: my first was obtained just over 1 year ago… a Samsung Galaxy S2 (it was already a version behind the times when I got it).

The magic of Android and Samsung’s hardware didn’t make my phonophobia dissipate any, but I have used it a lot for web browsing, email and the like. It’s been very competent at those sorts of things, and I’ve had no complaints.

But one of our large department stores (which I wouldn’t normally go near) has recently been selling the Nokia 520 (pictured) for the miserly sum of $168 (unlocked). At that price, I couldn’t resist: it’s not really a whole lot more expensive than the ‘disposable’ phones you can buy at a local supermarket. So I figured that it would (a) give me the chance to know Windows Phone 8 first-hand and (b) provide a cheap ‘spare’ phone should I ever drop/lose/submerge or otherwise screw up my Samsung.

Just as the Samsung S2 is not exactly at the bleeding edge of Android phones available these days, so the Nokia 520 is pretty much entry-level when it comes to Windows Phones. Sometimes it shows: there are noticeable pauses when switching back to an application (like a web browser) that you switched away from earlier. That aside, the phone is pretty responsive, feels ‘quality’ and looks quite striking -sufficient to make three people mention it in the two days I’ve had it, anyway. :-)

Everyone bags Windows Phone 8 because of the lack of apps: I won’t disagree with that (though I’ve barely had time to look). I’d just say, instead, that this is probably a bonus for me. I want a phone to be a phone, not a substitute Games console. So Lastpass is there; Kindle books can be read on it; the thing plays music and browses the Internet just fine… I don’t need much else. Certainly, the phone is a lot less customizable than any Android phone you care to mention… but a few years back, in the days of Symbian, phones being un-customizable was considered perfectly normal. The lack of distractions and fiddling is a bonus for me in this particular respect, anyway.

On the definite plus side, the Nokia call quality is superb. I’ve thought some calls made with the Samsung have sounded like they were using a slightly dodgy scrambler phone, but the Nokia sounds perfect.

The other huge plus is that the Nokia will remain charged for nearly two days at a time: I now have to break the habit my Samsung forced me into of leaving the ‘phone plugged in permanently to my PC’s USB port. This thing simply doesn’t need to be treated that way.

One big drawback (for me, anyway) is that it uses the microSIM format SIM card, whereas the Samsung S2 uses a standard SIM. Whilst there are (hair-raising!) videos on YouTube about how you can use a pair of scissors to transform one style of SIM into the other, it’s really not required: a trip to the nearest Vodafone store saw me given a suitable microSIM for nothing -and the whole thing was sorted in less than 5 minutes. The real problem, though, is that you’re not allowed two live SIMs at the same time… so activating the microSIM meant de-activating the old SIM. And thus it is that the Nokia is now my day-to-day phone of choice and the Samsung sits in the drawer, spare and unloved.

I will confess to some surprise at the turn of events… but I like the ‘phone a lot, and the O/S is not bad, either.

DB Express – Mystery Solved. Problems remain.

In my defence, it’s a new feature, my eyes are bad and I’m propped up in bed feeling like death cooled down a bit. It is also true that we all make mistakes. Thus it is that I am happy to report that there is a difference between

exec dbms_xdb_config.sethttpport(5500);

…and…

exec dbms_xdb_config.sethttpsport(5500);

Still can’t spot the difference? Well, the second command adds a secure http port to your database, because it’s got an extra ‘s’ in the middle of it. This will explain why, though I was able to manually add DB Express to my response-file-created databases, I could only reach it by typing in the URL http://192.168.8.101:5500/em. I’d inadvertently used the first command to add in DB Express capability, so I was only able to use unsecured http addresses.

Functionally, you can see the difference when you check the listener’s status. If you issue the first command and then check the listener, you’ll see something like this:

Listener Log File         /u01/app/oracle/diag/tnslsnr/alpher/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=alpher)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=alpher)(PORT=5500))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl" has 1 instance(s).

And if you issue the second and then go check the listener, you’ll see this:

Listener Log File         /u01/app/oracle/diag/tnslsnr/alpher/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=alpher)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=alpher)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl" has 1 instance(s).

The presence or absence of a mention of a wallet credential is the difference between a secured and unsecured http connection to the database.

The fact that I have to add anything at all to a database created from a response file that was generated after having explicitly asked for DB Express integration is, however, still a bug in my book. But the fact that I used the wrong form of the command to add it -well, that is all down to me!

DB Express is still problematic in other ways, too. Here she is in Windows Internet Explorer 10:

And here she is in Google Chrome (version 593792 or so):

Spot the difference? Allow me to zoom in a fraction:

The blue background behind the ‘Configuration’, ‘Storage’, ‘Security’ and other menus is missing in Internet Explorer 10, leaving you with nothing but mysterious icons to navigate by. (You can hover over them to get a bit of colour and text back, but it’s a game of hit-and-miss at that point). Firefox is happy to display the blue background as well as Chrome.

So, congratulations, Oracle Corporation, on managing to produce a web tool that refuses to display correctly in the latest version of the one browser which still commands a majority share of the entire browser market! And you’ve only had six years to get it right! (Oh, and thanks for all the Flash, too!)

Another issue you might come up against:

I managed to get myself in this trap by building a database with DB Express on a virtual machine, visiting it in my browser successfully, and then re-building the VM with the same IP address as before. Every time I try to visit DB Express now, it generates this error. If I click ‘OK’ on that dialog, I get this:

It’s prompting for SYS’s password, because that’s who I tried to log on to the main DB Express as… but it’s not actually wanting that account’s credentials at all.

This is a long-standing problem with XDB applications (see, for example, this thread on OTN… none of the suggestions mentioned there actually fix this problem, but you get the point that this is not an unknown situation!)

Best suggestion for a workaround I can come up with right now: switch to using a different browser. Quite what you switch to when you’ve managed to lock yourself out like this four or five times, I haven’t yet worked out… but I’m lining up downloads of Opera, Avant Browser Ultimate, Comodo IceDragon, Slimboat and others as we speak!

Anyway, ‘flu-ish-inspired gripes aside, I have finally mastered the art of 12c response files and DB Express configuration (mostly), so a 12c Salisbury is but hours away…

Bugs all round

It is the midst of the ‘flu season here, and whilst I don’t think I have the ‘flu, I am nevertheless laid low by something that makes me ache all over, leaves me short of breath and causes me to feel faint and dizzy when walking around. The doctor, ever the practitioner of 21st-century science says to “get lots of rest”, a cure-all as predictable as it is ineffective. It will probably be leeches next, courtesy of Dr. Hoffmann of Stuttgart.

Anyway, it means I have been laid up in bed for a day or so, and thus was able to discover what I believe might be a 12c bug: the Database Configuration Assistant can’t do scripted database creations properly.

That is, in 11g, if I asked for DBCA to create a General Purpose database and got it to save a response file just before doing so, I could be fairly sure that if I ran the said response file on another server, I would end up with a General Purpose database, complete with Enterprise Manager DB Console. It is a standard feature of the current version of Salisbury, so I know it works reliably and repeatably.

But in 12c, if I again ask for a General Purpose database to be created and save the response file as it does so, I can replay that response file on any number of different servers you like …and not one of them will have the new-fangled Enterprise Manager Database Express enabled. The database will be there in all its glory, sure enough; but all browser-based DB Express management capabilities will be missing. (The killer diagnostic feature in this regard being that a select dbms_xdb_config.gethttpport() from dual; returns a result of 0).

Even if one uses dbms_xdb_config.sethttpport(5500) to create the necessary ports, and even if you remember to alter system register to get an HTTP presentation line showing in lsnrctl status, you still can’t connect to DB Express.

Taking it even further (I’ve done at least 26 12c installs today alone!), if you create a custom database with DBCA, selecting very carefully and very deliberately to install the DB Express, the response file when played back on another server, having taken some 2.5 hours to complete, will still leave you DB Express-less.

I almost give up. It’s only this that is stopping me from releasing a new 12c-enabled version of Salisbury, but the darn’d thing refuses to play ball. Myself, I suspect it has something to do with the lack of wallet-enabled authentication, because when I manually add in an http port and register it with the listener, I get a line like this in the listener status report:

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=alpher.dizwell.local)(PORT=5500))(Presentation=HTTP)(Session=RAW))

But if I create a database manually using DBCA (not using a responsefile, in other words), I end up with this line in my listener output:

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=alpher.dizwell.local)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle /admin/orcl/xdb_wallet))(Presentation=HTTP)(Presentation=HTTP)(Session=RAW))

Taking this as my hint, I’ve used dbms_xdb_admin.installdefaultwallet to add a wallet capability to a database post-creation, but it doesn’t then turn up in the listener registration details and thus makes no difference to being able to run DB Express or not. Even if it did, the question would still remain why the responsefile should miss out this sort of thing.

If you know the secret either of (a) getting the response file playback to generate a DB Express-enabled database, or (b) adding DB Express capability via the command line to a 12c database that currently lacks it, I’d be keen to hear from you. Otherwise, it’s going to be a few more days yet before Salisbury-12c is made available (and it will involve a manual database creation process even then, which I’d like to avoid if possible!)

Update: 20 minutes after posting this, I gave it one more try, and by simply adding an http port (exactly as before), it all suddenly sprang into life! Go figure. I certainly don’t!! It still means playing a response file back doesn’t do what it’s supposed to do, though. Grrrrr.

Salisbury Fun and Games

Salisbury isn’t particularly clever in the way that it manages to combine an Oracle installation with an Operating System installation: the “magic” is in these few lines of code:

echo "#!/bin/bash" > /home/oracle/installoracle.sh
echo "/osource/database/runInstaller -waitforcompletion -ignoreSysPrereqs -ignorePrereq -responseFile /osource/standalonedb.rsp" >> /home/oracle/installoracle.sh
chmod 775 /home/oracle/installoracle.sh

su oracle -c "/home/oracle/installoracle.sh"

That’s to say, it creates a little shell script that, when called, runs Oracle’s runInstaller with a bunch of switches. And then it calls it. Not exactly difficult.

Except that it doesn’t work for 12c.

It starts well enough, but then just stops working, for no apparent reason:

Starting Oracle Universal Installer...Checking Temp space: must be greater than 500 MB.   Actual 13296 MB    
PassedChecking swap space: must be greater than 150 MB.   Actual 4095 MB    
PassedPreparing to launch Oracle Universal Installer 
from /tmp/OraInstall2013-07-07_08-32-58AM. Please wait ...
[[email protected] ~]$

…and that’s the last that’s ever heard from it, for it seemingly just dies shortly afterwards.

If you let the O/S installation finish and then execute exactly the same shell script, though, it works perfectly. So it’s clearly not a syntactical thing: the same commands work post-O/S installation but fail during it. My best guess is that it’s a runlevel thing. Database Configuration Assistant (dbca) has long complained about needing to be in a certain runlevel before it can work; now it seems that the OUI feels the same way, though 11g’s OUI never did

Anyway, as a result of this change in behaviour by Oracle’s software, I’ve had to rejig Salisbury quite a bit so that it doesn’t try launching the Oracle installation during the O/S install. Instead, it merely creates a set of scripts -which are then executed on first reboot.The O/S installation phase takes a lot less time than before, of course; the time taken to complete the first reboot commensurately shoots through the roof! But at least it all works, for both 11g and 12c.

So now, as a result of this rejigging, you can press ESC during the first reboot and see this sort of thing:

You will still need to manually invoke the createdb.sh shell script (as the oracle user) to have a single-instance database created post-install, however.

So, it’s all working as I’d expected, but I have now to test on all the other distros, make sure I haven’t accidentally broken anything … and that it also still works for creating RAC+Data Guard setups. I’ll have the 12c-enabled version of Salisbury uploaded just as soon as all that testing is completed.. Watch this space…

No more disk re-initialization

It has long bugged me that my Kickstart scripts will quite happily build an entire virtual machine without you having to lift a finger …but not if it’s a virtual machine that’s using brand new virtual hard disks. If you’re installing onto virgin hard disks, you’ll likely get prompted with something like this:

Today, it annoyed me enough that I actually decided to do something about it. The fix turns out to be a simple one-word addition to your Kickstart script: zerombr. Stick that above the ‘clearpart’ line which actually partitions your hard drive, and it will have the effect of auto-initializing any drive it needs to.

In Salisbury Kickstart files, for example, you’ll currently find this code:

clearpart --all
part / --fstype=ext4 --size 20000 --grow
part swap --size 1024

…which means “clear all partitions, then create a root partition of at least 20GB, and a swap partition of 1GB”. This works fine unless there are no readable partitions to clear (such as when your disk has never previously been used). So the new code will read:

zerombr
clearpart --all
part / --fstype=ext4 --size 20000 --grow
part swap --size 1024

…and that means your Salisbury servers can now be built truly and completely without manual intervention, after the first bootstrap line has been typed.

The code change hasn’t made its way into the Salisbury ISO as yet: there are a couple of other changes I’ve wanted to make to be wrapped up first. But it will be there soon.

Oracle 12c and Gladstone

I’m on record as saying that I would no longer maintain Gladstone, my Oracle pre-installation, prerequisite-fulfilling script. But with the release last week of Oracle 12c, I felt I should at least try to see if I could adapt Gladstone to work with it, in part because I still find the script a useful way of quickly building standalone Oracle servers which have Internet access.

Well… happily, I have adapted Gladstone and it does work with 12c: in fact, the 12c and 11g installation prerequisites are almost identical. Cunningly, Oracle appear to have implemented subtler ‘distro checking’, so that 12c installations on CentOS and Scientific Linux produce ‘this system doesn’t meet minimum requirements’ errors (even though they do!) Fortunately, such messages can be ignored, and the installation proceeds to completion without further drama. If I find out how Oracle have performed this check (unsurprisingly, perhaps, OEL passes with flying colours!), I’ll implement a workaround to suppress the alarming-looking messages. In the “old days”, we’d just hack the contents of /etc/redhat-release to achieve that, but it looks like Oracle have wised up to that! Investigations continue…

Anyway, the new 12c-enabled version of Gladstone is available from the usual place.

Ubuntu, Fedora, Mint, Sabayon and Debian users will have to stick to 11g, though, because I’m sticking to my guns on that one: non-RCSL distros are no longer something I care about.

As for 12c itself? Well, it’s obviously early days. But I have three observations:

  • The multi-database model is a revolutionary change for Oracle and makes things much more like SQL Server, in fact: one installation of the software, one set of memory/processes, multiple databases. I am currently running a single database that has been used to house half a dozen different applications in a feeble attempt at “consolidation”, and it’s a royal pain to manage and tune (“No, you can’t take the database down to do that bit of vital patching tonight, because we are doing period-end procedures, though we realise no-one else is…”). I am looking forward to the new model simplifying shared-database environments. I don’t suppose I’m going to be allowed to have different plugin databases at different patch levels though (though I’m still reading the doco, so we shall see).
  • RMAN acquiring the ability to restore individual tables looks interesting. The command syntax makes me think that it’s still creating an auxiliary database, recovering the table, exporting it and importing it back into the live database …and none of that would be new. It’s how you’ve done tablespace point in time recoveries since Year Dot. But to have it all in one tool with one bit of syntax looks like a nice step forward.
  • I cannot believe that in this day and age, Oracle Corporation would willingly choose to inflict a Flash-ridden piece of crapola like the new 12c Database Express on anyone. But sadly, the replacement for earlier versions’ DB Console Enterprise Manager is entirely dependent on Flash. Given Oracle’s own atrocious security record with gems like Java, it is astonishing they’d inflict browser-based Flash plugins on IT Professionals. I can only assume the Oracle HTML5 team were off on a skiing holiday at the time… All that said, it’s a good tool to manage a database with (if you like GUI tools, of course!)