Tech and travel

Posts

Ridiculous charges

2007-06-13

Caution : some serious ranting to be found in this post. I have some airmiles for TAP, the Portuguese airline. I got these when I was working in Brazil and Portugal some time ago. These miles expire after 3 years, which is reasonable. So I booked a flight to Athens from London to use these. TAP doesn’t fly this route directly or through Portugal, so you have to use one of their partner airlines, which is Lufthansa in this case.

Checking tablespace usage

2007-06-08

This SQL, inspired by this, shows how full the tablespaces are : SELECT tablespace_name || ' is ' || TO_CHAR(ROUND(100-(free_bytes*100/total_bytes), 2)) || '% full.' T, total_bytes, free_bytes FROM (SELECT a.tablespace_name, a.total_bytes, b.free_bytes FROM (SELECT tablespace_name, NVL(SUM(bytes), 1) AS total_bytes FROM dba_data_files GROUP BY tablespace_name) a, (SELECT tablespace_name, SUM(bytes) AS free_bytes FROM dba_free_space GROUP BY tablespace_name) b WHERE a.tablespace_name = b.tablespace_name ) ORDER BY tablespace_name; Another way of doing it is like this (courtesy of this site) : select a.

Check if Java is installed in Oracle

2007-06-06

If you want to know if Java is installed, use the following SQL : select * from dba_registry; There should be an entry with comp_id equal to ‘JAVAVM’.

Oracle 10g error : “O/S Message: No such file or directory”

2007-05-30

This one was a pain in the ass. It seems like pre-Oracle 10g SQL will not always run on 10g. The construct in question is : whenever oserror exit failure In 10g, this will fail with the error message : O/S Message: No such file or directory Thanks to the Annals of Oracle’s Improbable Errors website for helping out with this. The solution in my case was to comment it out, but it might not always be so easy.

No dos2unix, no perl

2007-05-24

I was stuck on a machine with a lot of scripts that had the dreaded ^M at the end of each line. These were Windows files in a huge zip file, and it was a pain to use the FTP to move that zip file over again. Dos2unix wasn’t installed, nor was perl. One way out of this is by creating the following script, called transform.sh : tr -d \\r <$1 >$1.

Copyright (c) 2024 Michel Hollands