December 3rd, 2009 Matt
As I said earlier today, the installfest to get rid of Windows and move to an operating system is under way.
I eventually got three monitors running at the same time after much playing with xorg.conf, but ended up with one screen doing it’s own thing, and a separate desktop spanning the other screens. Not quite what I wanted, since I want to be able to drag and drop between the screens.
In the end, I’ve given up on the idea of getting the three screens working together, and have gone for the following really basic xorg.conf file which gives me a desktop spanning two of the three screens – something I can live with!
Section "Screen"
Identifier "Configured Screen Device"
Device "Configured Video Device"
SubSection "Display"
Virtual 2560 1024
EndSubSection
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection
I’m sure that there must be a way to get one big desktop across the three screens, but for now, I’ll settle for the two working properly!
Posted in General Computing | No Comments »
December 3rd, 2009 Matt
When Windows 7 was released, I gleefully decided that this was going to be my chance to get away from XP Professional 64-bit, since it crashed reasonably frequently (every day or so). Not too much of a problem, since it normally happened overnight, but when you are downloading the latest version of eBusiness Suite, then it can be annoying to say the least.
So, I stumped up my £150 for Ultimate edition, and a couple of days after the release date, it duly arrived. Nice clean install – two new 1.0TB hard drives, two new ATI graphics cards, all ready to go. No problems with the install (which was only to be expected, since the drives were completely new and hadn’t been used before), and then I started to actually use the system.
And it crashed.
And it crashed.
And it crashed again. At least once a day, and every night – the PC crashed. Annoying when you aren’t using it – VERY frustrating when you have just waited 20 minutes for a virtual machine to start and it blue screens. No help from Microsoft, no help on the net, nothing.
And so, this week, while I was at UK OUG, I decided to leave the machine running a live CD version of Ubuntu 9.10 to see how that went. Last night, when I got home, it was still running – 5 days of uptime.
So, today it’s goodbye to Windows 7, hello Ubuntu – and the installfest continues
Posted in General Computing, Non-Oracle | No Comments »
October 14th, 2009 Matt
A while back, I wrote this post about the dreaded “existing state of the packages” error when recompiling code that is used in a Workflow process.
There is some degree of official guidance on what you need to do now, contained in Metalink note 754993.1 – “How can you Avoid Bouncing the Database after Changing a WF Package”. The advice is, to be honest, perhaps a little Draconian and unwieldy, but the guidance from Oracle is that all you need to do is:
- Shut down the concurrent managers
- Flush the shard pool
- Update the package
- Restart the concurrent managers
Now, that certainly will do it (so would bouncing the database, though!) – the likelihood of a developer shutting down the managers, then flushing the pool, and THEN compiling their code is probably quite low, though
Posted in Oracle, Technical | 1 Comment »
August 27th, 2009 Matt
Normally, I’m described as wither a “consultant” or a “contractor” depending on what the client is expecting me to do – I much prefer the more consultancy-oriented roles, where there is a genuine interest in your input to help devise the best solution for them, rather than the contractor-oriented roles which tend to be much more of the “here is what you need to do, here is how to do it, now go and do it and don’t ask any questions” variety.
Recently, I found an amusing definition of consultant, contractor and freelancer on The Daily WTF (Worse Than Failure!) blog:
Consultants fill the gap when an organization needs to leverage their collective synergy with a quality-driven approach that focuses on delivering key objectives. Contractors are great when the only remaining solution is throwing more bodies at the problem. And freelancers, they’re perfect for companies on a budget, hoping to build their technology infrastructure ten dollars at a time.
Posted in General Computing, Non-Oracle | No Comments »
August 18th, 2009 Matt
I can’t remember how long ago it was, but there’s an episode of The Simpsons where Homer is looking at a prompt on his computer that says “To start, press any key” and he’s saying “Which one’s the any key?”
I always thought that it was a made-up scenario, until I saw this example from a RAID controller:

Posted in General Computing, Non-Oracle | No Comments »
August 14th, 2009 Matt
I know it’s an old post, but I was sent this article from the Daily WTF about how you should use flat files rather than databases.
Because databases crash, and flat files don’t.
Just something that made me
Posted in General Computing, Non-Oracle | No Comments »
July 24th, 2009 Matt
A colleague of mine recently asked me why I always started Oracle programs using a “/nolog” and then explicitly connecting rather than just passing in the username and password in one go. Some years back, I worked with an Oracle guru who showed me exactly why you shouldn’t, just by using one simple command in UNIX:
ps -ef
UID PID PPID C STIME TTY TIME CMD
oracle 4325 5180 0 12:00:04 ? 0:00 sqlplus system/manager
appluser 3118 3012 0 12:00:03 ? 0:00 sqlldr scott/tiger
appluser 26332 24101 0 11:00:15 ? 0:00 imp matt/matt full=y
As you can see – if you pass in the username and password, then anyone can easily find it out using ps!
So, how go you get round it? If you can’t connect from within the tool (as you can in SQL*Plus), you can use a password file, which you should then delete once you have done the job, e.g. “sqlldr parfile=$PWDFILE….” where the file contains “userid=matt/matt”.
In order to make it even more secure, then you could use temporary files for your password file, e.g.
PWDFILE=$(mktemp)
echo "userid=matt/matt" > $PWDFILE
sqlldr parfile=$PWDFILE ....
rm $PWDFILE
mktemp is a utility which will create a temporary file with a unique name.
Posted in Oracle, Technical | No Comments »
July 19th, 2009 Matt
I was looking at the MySQL website recently to see whether they had updated much on there about the Oracle takeover of Sun, and consequently MySQL. It seems, looking here that they haven’t
MySQL Enterprise Unlimited
Deploy an unlimited number of MySQL Enterprise Servers for the price of a single CPU of Oracle Enterprise Edition
They might want to have a think about updating that soon!
Posted in General Computing | No Comments »
July 15th, 2009 Matt
I was playing about recently with some basic calculations and rounding within the Oracle database, using release 11.1.0.6 (and I’m sure it’s the same in earlier databases releases). I’d been busy with Dr. Kawashima’s Brain Training: How Old is Your Brain? on my Nintendo DS and doing the mental calculations, and was thinking about the basic calculation 1/3*3.
Now, following my PEMDAS (I had two years in an American school when I was younger – for those in the UK, think BODMAS) – the sum would be calculated as (1/3) * 3 so would give 1 as the result – try it in any calculator and you should get the same result.
Try it in Oracle, and you get the same:
SQL> SELECT 1/3*3 FROM DUAL;
1/3*3
-----
1
That’s all fine – now try a slight variation:
SQL> SELECT 'OK' FROM DUAL WHERE 1/3*3 = 1;
no rows selected
Hmmmm – so even though it returns 1, it doesn’t equal 1…. Is it true for all values?
SQL> SELECT * FROM DUAL WHERE 1/3*3=1;
no rows selected
SQL> SELECT level, CASE WHEN 1/level*level = 1 THEN 'OK' END ok FROM DUAL CONNECT BY level <= 20;
L O
———- -
1 OK
2 OK
3
4 OK
5 OK
6 OK
7 OK
8 OK
9
10 OK
11
12
13
14
15 OK
16 OK
17 OK
18 OK
19
20 OK
So, there you have it – a handful (and there are more) of examples where 1 !=1 in Oracle!!
Posted in Oracle, Technical | 1 Comment »
July 8th, 2009 Matt
I read this recently on Tom Kyte’s blog about three questions that he asks at interviews:
I have a table:
create table t ( ….., month number, ….. );
Month is always a number between 1 and 12.
I ask three questions about this table:
1) how many rows are in the table
2) how many rows BY MONTH are in the table (i want to know how many rows for month one, month two
and so on)
3) what MONTH has the most rows (and for a special bonus, tell me why this question is ambiguous)
At an interview for a role that I did at some stage, I was asked the following:
I have a table EMP with columns NAME, SALARY, DEPTNO. How would you write a query to give me the top three earners in each department?
I’m not sure if I got the answer right, but I got the gig
Posted in Oracle, Technical | No Comments »