Pedro's blog: db2, mysql, php, linux and performance


DB2 export UTF8
25/02/2010, 18:54
Filed under: DB2,GNU/Linux,macosx | Tags: , , , , ,

Some tips and tricks.

Exporting data from DB2 to files in linux (I like EXPORT but you also can use UNLOAD or a simple SELECT and the redirection >):

$ db2 EXPORT TO “/tmp/unload.txt” OF del MODIFIED BY COLDEL, CHARDEL* SELECT * FROM MYTABLE

This command will export the table MYTABLE to the file /tmp/unload.txt formatting the fields like *COL1*,*COL    2*,*COL NUM 3*,…,*COL N*

In MacOSX formatting the files from UTF-8 format to ISO-8859-1 format (because the special spanish chars áéíóúñ…):

$ iconv -f UTF-8 -t ISO-8859-1 unload.txt > unload_8859.txt



ZDE on Snow Leopard makes code disappear!
05/02/2010, 18:22
Filed under: General,macosx,PHP | Tags: , , ,

What a surprise, just moved from MacOSX Leopard to Snow Leopard and what did I find?

Zend Development Studio doesn’t like the Java version already installed, the code is disappearing! the Java I had:

$ java -version
java version “1.6.0_17”
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)

I research a little and I found the fix: OS X 10.6 Snow Leopard Java problems (and fix)

At the end, everything working on 1.5:

$ java -version
java version “1.5.0_19”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)

Enjoy it!

http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard