Showing posts from April, 2010

Oracle statistics

EXEC DBMS_UTILITY.analyze_schema('schema_name','COMPUTE')

ANALYZE cluster clusterName compute statistics;
ANALYZE table tableName {compute|estimate|delete) statistics options
ANALYZE index indexName {compute|estimate|delete) statistics options
ANALYZE cluster clusterName {compute|estimate|delete) statistics options

Ubuntu xrdp

Ubuntu 9.10 couldn't login as root

I also couldn't access Synaptic Package Manager

If you want to be able to login as root, you need to define a password for root:

:~$ sudo passwd
Enter new UNIX password:
Retype new UNIX password:

Ubuntu 9.10 sshd

You need to install it manually and it automatically starts the daemon

sudo apt-get install openssh-server


Merge branch range to working copy branch (possibly head of trunk)

Have branch or trunk checked out and in a state ready to accept the merge

Browse the history of the branch to merge - need to know the version before the start of the change range to merge (n) and the version at the end of the change range to merge (m)

From the dir that is receiving the merge:

svn merge -r n:m svn-url-of-source-branch --dry-run

Validate that the merge changes are what you desire to occur:

svn merge -r n:m svn-url-of-source-branch

Resolve any conflicts, test, and commit.

TCP connections

If both a client and server simultaneously close a connection there is a race condition that may result in the connection hanging and not closing for minutes. Both sides of the connection may simultaneously send a FIN to the other side and both may end up waiting for an ACK or RST until the default TCP timeout; which is typically double MSL (maximum segment life time) or 4 minutes.

Having the client do a read until EOF is signaled before closing avoids the issue.

RFC 793 [Postel 1981] specifies the MSL as 2 minutes. Common implementation values, however, are 30 seconds, 1 minute and 2 minutes.

Description and diagrams of why simultaneous close results in time-wait

TCP state and sequence diagrams showing how and why the simultaneous close results in long timeouts

TCP protocol diagram including simultaneous close


From here:

The tcp_close_wait_interval is 4 minutes. This variable defines how long a host would wait in the TIME_WAIT state. This implies that the host which is still up …

Ubuntu 9.10 64 Oracle XE install for sql*plus


Just needed the sql*plus tool and a small test db.

Used port 8181
and db listener 1522

Because I want a full version of Oracle on a VM to use the default ports.

VNC to Ubuntu 9.10 doesn't update

use gconf-editor to set /desktop/gnome/remote_session/disable_xdamage to disabled
extension is a temporary workaround although it requires more bandwidth - really slow

Another fix:

Disable Compiz
System -> Preferences -> Appearance -> Visual Effects = None

Install x11vnc:

sudo apt-get install x11vnc

Start x11vnc

x11vnc --noxdamage --passwd XXX -forever

Ubuntu 9.10 Windows don't resize across displays

use the keyboard shortcut Alt-F8 or Alt-MiddleMouse

Nobody has found a config setting yet.



strip the first part of a log4j file so we can do a compare of a diagnostic dump

sed 's/^.*\[//' test > test2