You (re)learn something new every day…

I’ve recently taken to using FileZilla as an FTP client on my Windoz box at work. When I’m at home I tend to use gFTP on Linux. Whilst using it today one of my colleagues asked me why I wasn’t using Windows Explorer for my FTP stuff. I typed an FTP address into Windows Explorer and sure enough, I connected using WebDav.

The stupid thing is I use WebDav to access XML DB and Oracle Files, but it never crossed my mind to use it for this.

Of course, some of the purists out there will be screaming, “What’s wrong with the command line?” ๐Ÿ™‚

Cheers

Tim…

The curse of the Tru64 port…

I’ve said it before and I’ll say it again, Oracle products don’t run properly on Tru64 anymore!

The latest issue came from an observation by a developer and involves problems with using NVL inside an EXISTS subquery. The following code is the test case I sent in my TAR to Oracle support.

CREATE TABLE tab1 (
code         VARCHAR2(10),
description  VARCHAR2(50)
);

ALTER TABLE tab1 ADD (
CONSTRAINT tab1_pk PRIMARY KEY (code)
);

INSERT INTO tab1 (code, description) VALUES ('1', 'ONE');
INSERT INTO tab1 (code, description) VALUES ('2', 'TWO');
INSERT INTO tab1 (code, description) VALUES ('3', 'THREE');

CREATE TABLE tab2 (
code         VARCHAR2(10),
tab1_code    VARCHAR2(10),
description  VARCHAR2(50)
);

ALTER TABLE tab2 ADD (
CONSTRAINT tab2_pk PRIMARY KEY (code)
);

ALTER TABLE tab2 ADD (
CONSTRAINT tab2_tab1_fk FOREIGN KEY (tab1_code)
REFERENCES tab1(code)
);

CREATE INDEX tab2_tab1_fk_i ON tab2(tab1_code);

INSERT INTO tab2 (code, tab1_code, description) VALUES ('1', '1', 'ONE');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('2', '1', 'ONE');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('3', '1', 'ONE');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('4', '2', 'TWO');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('5', '2', 'TWO');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('6', '2', 'TWO');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('7', '3', 'THREE');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('8', '3', 'THREE');
INSERT INTO tab2 (code, tab1_code, description) VALUES ('9', '3', 'THREE');

COMMIT;

VARIABLE p1 VARCHAR2(1)
BEGIN
:p1 := '%';
END;
/

SELECT t1.code
FROM   tab1 t1
WHERE  EXISTS(SELECT rowid
FROM   tab2 t2
WHERE  t2.tab1_code = t1.code
AND    t2.code like :p1)
ORDER BY t1.code;

CODE
----------
1
2
3

3 rows selected.

SELECT t1.code
FROM   tab1 t1
WHERE  EXISTS(SELECT rowid
FROM   tab2 t2
WHERE  t2.tab1_code = t1.code
AND    t2.code like NVL(:p1,'%'))
ORDER BY t1.code;

CODE
----------
1
1
1
2
2
2
3
3
3

9 rows selected.

SELECT t1.code
FROM   tab1 t1
WHERE  EXISTS(SELECT rowid
FROM   tab2 t2
WHERE  t2.tab1_code = t1.code
AND    t2.code like COALESCE(:p1,'%'))
ORDER BY t1.code;

CODE
----------
1
2
3

3 rows selected.

From this you can see that then the bind variable is set to ‘%’ the query without the NVL works as expected, but the query using the NVL displays a row in the master table for each row found in the subquery. In comparison, the query using the COALESCE function works fine.

Now I realise that this is not a great query anyway, but you would still expect it to work!

Happy days in Tru64 land again ๐Ÿ™‚

Once again I’m drawn to the inevitable conclusion that running Oracle products on anything but a tier-one platform is a bad idea. What’s more, judging by the recent arrival of Oracle 10g Release 2, there is now only a single tier-one platform. I don’t see a version for Solaris, HP-UX or Windows yet.

As for me, I’m still waiting for 10.1.0.4.0 to be released on Tru64. Release 2 is a long way off ๐Ÿ™‚

Cheers

Tim…

Tornado in Brum!

It seems my recent visits to the osteopath always coincide with something strange happening.

Yesterday on my way to the osteopath the road was blocked by a fallen tree. I took a diversion and thought nothing more of it. During my treatment the osteopath received a call from his wife asking if he was OK because a street one mile away had been hit by a tornado for a few seconds and some buildings had been trashed. We didn’t even know it had happened.

Later, when I got more details I realized the center of the damage was right next to a friends house. Luckily he escaped unharmed.

The UK has a reputation for unpredictable weather (cold and rainy in summer and sunny in the winter), but this is kind of freaky. The weather this year has been completely bizarre. The sooner we sort out global warming the better!

I’m sure all you guys living in tornado, monsoon and earthquake zones find this pretty trivial, but it’s a big thing for Birmingham ๐Ÿ™‚

Cheers

Tim…

TNS-12157 TNS:internal network communication error

It’s getting difficult and a little depressing trying to make a blog comment or forum post these days. It seems every time you do you risk offending someone.

Tag me stupid, baby! seemed more than a little relevant.

The comments associated with some high-profile blogs only serve to depress me more. It’s like the pedants and PC freaks have come out in force lately. I don’t know what the answer is and I’m sure, like everyone else, I am part of the problem, but I think everyone should take a step back from the keyboard and chill out!

I’m not sure how I’m going to approach my next posts as my enthusiasm has died a little due to all this.

Remember, this post is not about you, it’s not a criticism of you and if you take it that way you are merely proving my point.

Cheers

Tim…

It’s clobbering time!

I went to see “The Fantastic 4” at the cinema over the weekend. I though it was pretty cool, but it did suffer from the usual problem of spending half the film telling you how they became superheros. Why anyone would want to make Jessica Alba invisible is beyond me ๐Ÿ™‚

I think I’m going to buy my one nephew (3.5 years old) a “Thing” action figure if I see one. Just before the film was released in the UK he saw a picture of Thing in a magazine and the following exchange happened.

James: What’s that?
Me: It’s a man called Thing.
James: What’s wrong with his skin? Is he poorly?
Me: No.
James: Is he made of rock?
Me: Yes.
James: Why has he got big boots on?
Me: Because he’s got big feet.
James: Why? …. Repeat to infinity.

Still makes me laugh thinking of the thought process. Kids brains are cool!

On the subject of James, while I was visiting him this weekend he took my Ganesha figure that I always carry in my pocket and hid it in one of his wellington boots. Needless to say that got found after I left, so I’m without him for a whole week. He’s been with me for a few months now, so I’m feeling a little lost without him.

Cheers

Tim…

The calm after the storm…

Things are just starting to return to normal… I hope ๐Ÿ™‚

The disruption associated with the production hardware reconfiguration seems to have calmed down now. Of course, not all of the problems were associated directly with the hardware changes, but the time you spend on one problem distracts you from other jobs you should be doing, which in turn creates new issues.

We have finally moved all the database backups over to RMAN against HP Data Protector, rather than the disk-based RMAN backups we were doing before. The software seems to work fine, but the physical processes are taking some time to get used to. Rather than having a tape labeled “Monday night application X backup”, we now have a bank of tapes in a media pool that can hold portions of several backups. It’s not rocket science, but it can be a bit of a culture shock when you start changing processes that have been in place for years. It takes a while for people to get used to the idea that you don’t know which tapes must be removed and taken offsite until the software tells you.

Fun, fun, fun ๐Ÿ™‚

Cheers

Tim…

SQLdetective Review

I was recently asked to review a product called SQLdetective, so here it is.

Q. What’s it for?
A. It’s for developers and DBAs and anyone else who does anything with an Oracle database.

Q. What features does it have?
A. It has everything you’ve come to expect from a general purpose DBA/Developer IDE. I’m not even going to attempt to list them because it would take forever. Suffice to say, if you’ve seen it in another product, it’s probably here.

Q. What’s it look like?
A. You can look at a bunch of screen shots here. Like most current IDEs it’s a bit busy. Not as plain as PL/SQL Developer, but not as busy as TOAD. The icons are “different”, but I’m not sure if that’s a good or bad thing.

Q. What’s it feel like?
A. I seems quite quick and responsive, but it does some odd things, like when you highlight a table in the navigator the default operation is to show you a page of data. I doubt this would be the first thing I would want to see.

Q. What’s it cost?
A. The basic price is US$99, but if you want all the add-on modules it’s going to cost a total of US$198. So the cost depends on what you need. It’s difficult to compare prices because you rarely have to pay list prices and each IDE has different optional modules. It’s more expensive than the free version of TOAD, and now JDeveloper is free you can do all your PL/SQL development and debugging using that if you’ve got the hardware to run it ๐Ÿ™‚

Q. Tim, would you buy it?
A. If I was forced to use an IDE I would use TOAD or JDeveloper for free. I have both loaded on my PC and I never use them. If I was forced to buy a license for an IDE I would consider this product. My company recently bought licenses for PL/SQL Developer, but I still use a text editor and SQL*Plus ๐Ÿ™‚

Conclusion:

If you really want to pay money for an IDE give this one a try. It’s got a lot of stuff in it. Alternatively, write good intrumented code and save yourself the cash.

I guess I could just copy and paste this review about almost any of the current IDEs, but at least I’ve kept my promise…

Cheers

Tim…

Firefox 1.0.6 and RAC update.

Looks like Firefox 1.0.6 is out, but the update checker doesn’t know it… Again.

Got through a night without a server crash on the production RAC. Feels like the old days again ๐Ÿ™‚

Cheers

Tim…

PS. Posted two more chapters to the publisher today. That leaves me with one new one to write and one to tighten up then I’m finished. Must crack on and get it sorted before I have a nervous break down cause by a complete lack of sleep ๐Ÿ™‚

2 become 0, occasionally…

It’s been an “interesting” couple of days.

Since we moved to the new configuration we’ve have had some intermittent server crashes, including one last night where both nodes crashed simultaneously. We’ve applied an OS patch that is meant to solve the problem, but we’re still in the “fingers crossed” stage at the moment. It’s meant some busy nights and annoyed users, but we’re moving forward.

You’ve gotta love it…. Not!

Cheers

Tim…