Friday, October 27, 2006

Oracle to run your computer?

Oracle has pledged to run your computer. Well, sort of. It's going to be offering support for the RedHat operating system; meaning users can get support from Oracle, rather than the original vendors of the OS.

This is an interesting move for a number of reasons. Firstly, the Microsoft database offering is taking a greater market share, possibly seen by Oracle as a treat to there core database business; Microsoft is locking down the Vista operating system, meaning other vendors cannot access its code or develop applications as easily; and finally, it's another big name supporting open source, 'free' operating systems.

Taking these one at a time, with Microsoft's database first.

Oracle have recently released a free version of its database (limited to 4Gb of data) that can be used for free, anywhere, for anything. One of the historical problems Oracle has had is that users and developers, the geeks of the future, won't touch Oracle, primarily not for any technical reason, there are just other free databases. Microsoft has also released a free version of its database so Oracle couldn't be left behind. The problem is that, although technically superior, coding for Oracle is far from easy to learn due to the lack of graphical interfaces and error messages being beyond useless. Oracle has started to change this and improve its offering, but is still far behind the use ability of the Microsoft offering. And no new geeks means no new company take-up of its (overpriced) database.

Secondly, Microsoft is locking down its next operating system, Vista. How is this related? Well, there will be a decision to be made by users - stick with Windows, an OS they know, but leave all there futures in the Microsoft basket, or switch to the increasingly useable Linux distributions. Will users change? For the majority, no. There are many reasons for this, but primarily Linux, although easier to install than ever before, is a massive mind switch in terms of how files are stored on the computer, how a machine is administered and how programs are installed. Does this different method give a home user any real advantages? Probably not. Will it give them a steep learning curve on backup, restore and the finding of files, undoubtedly. Secondly, the next major problem is finding basic notes on Linux. There aren't any. There is no Microsoft to Linux conversion manual for the uninitiated. There is no list (a high quality, impartial list) of you did it like this on Windows and you need program y to do that on Linux. There out there, but with several different applications performing the same tasks on Linux, which do you need? With Oracle pledging to support the RedHat distribution of Linux things must improve, but with there track record on database usability then the jury is out.

Thirdly, this is another big name pumping cash into open source software. Oracle has millions and millions to spend; and if this is diverted to an operating system then it can only improve, provided it hires the right people and listens to users. I'd suggest hiring some Windows users to take them though what they need to do; probably not many peoples view in the open operating system world, but something they need if there to make any inroads into the operating system market and gain a real user base (i.e. one consisting of the technically deficient as well as the uber geek).

Finally, if Oracle uses some common sense, they will take the open source distribution and use their Oracle database as the 'file system'; similar to the (failed) attempt by Microsoft for Vista. This has numerous (far too many to be listed here!) advantages and really would differentiate a Linux distribution from anything else out there.

The time is now, as the new Vista OS will require a mental shift in philosophy by Windows users making the jump to Linux less of a leap than it would otherwise be.

Labels: , , , ,

Monday, August 28, 2006

Loosing Your Rights

I was poking around the web again today and found an interesting article on the BBC Technology site. The below is a brief summary of the bits I found interesting.

While reading it turns out that you have to be very careful when using ‘free’ online publishing services. For example, Microsoft took the rights to do whatever it wanted with everything sent via the Microsoft Passport, and as pointed out in the article, this means anything sent via Hotmail, including your latest business plan or idea.

Google has done the same with Orkut and even the BBC in its own article points out the dangers of submitting photos to its own site.

This is a good article worthy of a read. If nothing else, it emphasises the need to not undertake business via anything except your own servers, and do everything you can yourself.

Using free services is just lazy. The technology is not difficult to reproduce with a database and web server, and there are more than enough free, open source applications to do the majority of the work for you. You can pick up a server of your own for £50, a domain for a couple of quid, apache for free, Oracle for free. If your information isn’t worth £52 its not worth publishing.

Useful links

Oh, and yes, use linux! OpenSuSE

Labels: , , , , , , ,

Wednesday, July 12, 2006

Oracle & 'Delete if exists'

Why is this such a pain in the ass to do without erroring your sript for one of the most advanced databases in the world?

Well it is. Life's a bitch sometimes.

Heres how to do it...

The best way I've found is to create a procedure and call this when needed. Because you can 'create or replace' a procedure its not so bad, at least you can create it from your script when needed and if its there who cares, it'll just get overwritten, without complaining.

Send this to your database... (take the numbers off!!!) ;)

1. create or replace procedure drop_table (tab_name in varchar2)
2. is
3. qry_string varchar2(4000);
4. cnt number;
5. begin
6. select count(1) into cnt from user_tables where table_name = tab_name;
7. if cnt > 0 then
8. qry_string := 'DROP TABLE ' tab_name;
9. begin
10. EXECUTE IMMEDIATE qry_string;
11. exception
12. when others then
13. dbms_output.put_line('Error occured while dropping ' sqlerrm);
14. end;
15. else
16. dbms_output.put_line('TABLE ' tab_name ' does not exist');
17. end if;
18. end;
19. };

explanation...

1. creates or replaces the procedure
2. start defining procedure
3. create a string to put result of quiery in
4. set variable cnt to number
5. start procedure
6. add 1 to cnt if your table name matches in the users tables
7. if cnt is greater than 0 do this...
8. drop your table
9. start execute
10. do it now
11. error trapping
12. if returns other value except success
13. print error message
14. end execute
15. otherwise
16. return table not existing
17. finish otherwise
18. finish script
19. close script

call the procedure from your script

in perl use

call drop_table('TABLENAME')

make sure you use caps for the table name. how you call will depend on your programming language.

To achieve the same thing with sequences replace all your table references with SEQUENCE, seq_name, sequence_name.

Have fun!!!

Yes, you do need all that for a simple 'drop if exists'... hopefully someone at Oracle decides to fix this...

Labels: , , ,

Monday, May 29, 2006

One comment for now....

Oracle TNS – such a simple concept, such a pain in the ass.

Labels: ,

Saturday, May 20, 2006

Oracle and Apache TNS Problems

Today was a confusing world of Oracle's TNS and Apache not talking to each other…

Several installs later on different PCs with, supposedly, the same settings and one PC just wouldn't go. No matter what I tried, Apache kept groaning about TNS not being able to resolve the name. Fantastic.

After spending an age checking ORACLE_HOME, ORACLE_SID and a host of other stuff it was eventually tracked to the environment variables not being passed so Apache wasn't recognising HOME or SID.

A browse through the Apache docs found that you can force Apache to get the environment settings, although why this is needed now when its been doing happy on every other PC I've no idea.

If you get a similar problem and ORACLE_HOME and ORACLE_SID are both set in your environment (system, not user!) then try forcing Apache to get them. Not enough space on here to ho into how exactly, but check the Apache docs for how to! It'll also depend on what version of Apache your running on exactly how this is done (I think!).

This problem was on Windows XP and Apache 2.2.

Have a lot of fun! … where's my SuSE box gone???

Labels: , ,