Tag Archive: howto


Very easy, just add a repository and run apt-get install postresql-9.0 :)

Dctr Watson explains how:

Installing PostgreSQL 9.0 on Ubuntu 10.04

Does anyone know how to print three 4×6 inch postcards on a single 8 1/2 x 11 inch paper like so?

I use the virtual private network software, known as OpenVPN, to connect from my laptops to my home every day.  There are several things I’ve noticed:

  • Most offices and many coffee shops will block the default port 1194 (UDP).  It is also a very popular port for naughty people trying to see what you have on your network.  If you’re not running a web server, set it to port 80 or 443 (TCP) as these ports are normally accessible.  If these don’t work, try other ones like 21 (TCP) which is normally used for a FTP server.  You will likely see better throughput on some ports than on others due to ‘traffic shaping’, aka giving network priority to certain applications.
    • Comcast blocks ports 21,80,443 for UDP and but not for TCP
  • The network packets that are sent through the vpn tunnel can become fragmented, split into two or more packets to make them fit into the vpn network packet.  Let’s increase the size of the vpn network packet to reduce the network packet fragmentation
    • tun-mtu 1500
    • mssfix 1400
  • Compression.  This is a little more subjective than you would think.  If most of your activity is based on data streams (e.g. watching video, listening to music), then the compression may cause delays (think extra buffering / stuttering).   My advice is to try with it on and try with it off..  which seems to be more responsive to you?

On the sybase-l mailing list,

Sybase

Jeff Tallman replied to a question on how to avoid unnecessary reorgs. He graciously agreed to let me post his response here :)

You can avoid most (if not all) of the reorgs by doing:

  1. setting the exp_row_size to something that covers about 90% of the space each row takes up
  2. changing enable housekeeper GC to a 4 or 5

Both of these are a *MUST* do for DOL (datapages or datarows). See manuals on ‘enable housekeeper GC’ for correct setting of 4 or 5 (refers to whether deletes are batch or OLTP).

You can also watch for housekeeper overflows in monEngine/monOpenObjectActivity……and if you see any HKGC pending – wait a few before shutting down.

Jeff wrote up an excellent article, Locking Redux – APL vs. DOL and Tuning, that goes into detail why this is the case.

It is really really easy to change the default NLS_DATE_FORMAT setting but to be honest, you should set it at a session level IMHO.

We basically just need to run “ALTER SYSTEM SET NLS_DATE_FORMAT=’YYYY-MM-DD’ SCOPE=SPFILE” as a user with sysdba privileges. If you started the Oracle instance without a spfile (it should be located at $ORACLE_HOME/dbs/spfile[instance name].ora), you will receive the ORA-32001 error.

SQL> ALTER SYSTEM SET NLS_DATE_FORMAT=‘YYYY-MM-DD’ SCOPE=SPFILE;
ALTER SYSTEM SET NLS_DATE_FORMAT=‘YYYY-MM-DD’ SCOPE=SPFILE
*
ERROR at line 1:
ORA-32001: WRITE TO SPFILE requested but no SPFILE specified at startup

Just create a new spfile, restart:

SQL> SELECT INSTANCE_NAME FROM v$instance;

INSTANCE_NAME
—————-
UAT2

SQL> CREATE spfile=‘/oracle/10g/dbs/spfileUAT2.ora’ FROM pfile=‘/oracle/10g/dbs/initUAT2.ora’;

*restart*

SQL> SELECT INSTANCE_NAME FROM v$instance;

INSTANCE_NAME
—————-
UAT2

SQL> ALTER SYSTEM SET NLS_DATE_FORMAT=‘YYYY-MM-DD’ SCOPE=SPFILE;

System altered.

*restart*

SQL> SELECT value FROM v$nls_parameters WHERE parameter =‘NLS_DATE_FORMAT’;

VALUE
—————————————————————-
YYYY-MM-DD

That’s it. :)