Monthly Archives: January 2011

GoldenGate and invalid dates

GoldenGate is a powerful tool bought by Oracle to replace the “Oracle Streams”. It allows heterogeneous replication of data and works just fine almost out-of-the-box.

My client uses it to make a cache copy of data a kind of active standby while running on Oracle 10.2.

Today I had to fight for a problem that comes from the application, which seldom writes to the source database dates in a invalid format, with an year 0 (Oracle should not accept, but the year got in, we are still investigating how).

This makes the GoldenGate replication process to abend, as the write on the target database fails with an “ORA-01841: (full) year must be between -4713 and +9999, and not be 0”.

For the workaround, using GoldenGate MAP function, I managed to transform the dates like the following:
Source: 0000-12-09:08:11:20
Target: 0001-12-09:08:11:20

EXPIRE = @IF ( @STRCMP(@STREXT(EXPIRE,1,4),"0000") = 0, @STRCAT("0001-",@STREXT(EXPIRE,6,18)),EXPIRE)

This allowed to me also to discover the discard file (.dsc) on the dirrtp folder of GoldenGate, where you can see the output of the MAP function, useful for the debug.

Keyboard for a computer scientist

After working more than 5 years with either an US or English keyboard, I find very difficult to get used to a Swiss keyboard. This is not the case for writing e-mails, but mostly for working. Unfortunately by being a consultant now I’ve often to work on clients terminals and their installed keyboard, not giving even the opportunity to hang around with a US keyboard for my pleasure.

Why the US or English keyboard are better for computer scientists?

– you have easy access to the brackets (), [], {}, which are always in two different keys and not hidden away with AltGr;
– you have easy access to <> in two different keys, not needing to make sure the shift is pressed or not.
– Also comma ´ and ‘ are different keys;
– The slashes / are both in logical places
– The @ is accessible with a simple Shift key, like is the pipe |

And you can also easily use the US-International keyboard to write in many languages, including the portuguese where you have ã,à,é,ç…

I hope that soon will be easier to change keyboards on the OSes and also that a better universal standard (at least for roman alphabet based) appears.