Tuesday, December 23, 2008

Postgresql 8.3 on OpenSolaris 2008-11

Here are the steps to enable postgresql 8.3 on OpenSolaris 2008-11.

* Install all the 8.3 relate package with Package Manager.
* Enable the service:
svcadm enable postgresql_83:default_32bit
* Connect to database:
psql -U postgres postgres

List Service Status
svcs -a | grep postgres

Saturday, November 08, 2008

ABS - Advanced Bash Scripting

If you are serious about shell programming, you are gonna read this:


Thursday, October 23, 2008

Bash ANSI-C quoting

The syntax of ANSI-C quoting is something like
$'\0x009' or $'\t'.

This is useful when you want to input a tab on the command line as an input parameter (tab key is mapped to auto-completion in bash).

for example:
psql -A -F $'\t' ...
will set the field separator to tab.

This is documented in http://www.faqs.org/docs/bashman/bashref_12.html as:
"Words of the form $'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard. Backslash escape sequences."

For tab, you can also input a CTRL-I (type CTRL-V-I).

Tuesday, September 16, 2008

IFILE for oracle parameter files

Use IFILE to embed another parameter file within the current parameter file. (Maximum level 3)

It works for any oracle parameter files including tnsnames.ora.


Credit goes to my friend Matthew!

Thursday, June 26, 2008

Clean up the old oracle installation

A short memo on how to clean up your previous installation on Windows:

0). Stop all the Oracle Related Service if you have the database installed
Control Panel -> Adminstrative Tools -> Services

1). Remove all the Oracle related ODBC Data Sources.
Control Panel -> Adminstrative Tools -> Data Sources (ODBC)
Remove all Oracle related User DSN/System DSN

ODBC driver hooks up with the oracle dlls which blocks you to remove Oracle components

2). Reboot

3). Run the oracle installer to remove whatever can be removed.

4). Remove the Oracle registration key with regedit.exe
HK_LOCAL_MACHINE/System/Services (if you have the database installed)

5). Reboot

6). Remove the Oracle Folders
Typically c:\oracle or c:\orant & C:\Program Files\Oracle

Now you are clean and ready for a reinstallation.