Getting WireShark to work on OS X

September 26th, 2008

I had some difficulty in getting WireShark to recognise any of the interfaces on my machine. A quick net search led to a rather longer one, but revealed that my problems were because of permissions on the devices themselves for my user. I am sorry to the person who posted this result originally, I cannot remember which site I got it off:

sudo chown <user> /dev/bpf*

This allows wireshark to see the connections. It doesn’t require a wireshark restart either.

Stop Using select *

August 6th, 2008

In my time trawling through various systems’s DB code, I see we are using “select *” in many places. This has to stop, and we need to specify the columns we want explicitly every time. The reasons for this are:

- A change to the table structure can break the code
- We end up getting all the columns from the DB when we almost certainly don’t need to. Some of the columns can be enormous, and it is a waster of DB and network resource in getting this data.
- A change to the query can add many more columns to be returned.
- It can make a difference to the query plan the DB uses, and can be many orders of magnitude faster to specify columns individually.

Using “select *” is lazy, suboptimal and a coding time bomb.



FTP from within Parallels

July 29th, 2008

Just a quick one today…

I have an XP installation running in Parallels and have found some problems using ftp from within it.

FTP is a strange protocol in that it creates two way connections on a number of ports. Even using the FTP variants which initialise all the connections from the client side (passive) I was having trouble using it successfully from within Parallels. I tried host-based and shared networking. What did work was using Bridged-Mode and this allowed the dhcp server on my network to assign the address to the Parallels VM and this then allowed the ftp client to successfully connect to the ftp server and upload files. The other 2 modes do not allow the ftp client to complete the strangeness of ftp properly.

Dropping a Repository the easy way

June 25th, 2008

In previous OEM posts I have been dropping the Repository in a variety of ways. In a moment of Instruction Reading, something I rarely do because I love to conform to stereotypes, I found this little obvious-when-you-know beauty:

$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager

[oracle@bbmos01 ~]$ $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager $HOST $PORT $SID -action drop
Enter SYS user’s password :
Enter repository user name : SYSMAN
Enter repository user password :
Getting temporary tablespace from database…
Found temporary tablespace: TEMP
Checking SYS Credentials … OK.
Dropping the repository..
Quiescing DB … Done.
Checking for Repos User … Exists.
Repos User exists..
Clearing EM Contexts … OK.
Dropping EM users …
Done.
Dropping Repos User … Done.
Dropping Roles/Synonymns/Tablespaces … Done.
Unquiescing DB … Done.
Dropped Repository Successfully.

Ho hum. It can do it all.

Please, waste your time reading this:

June 19th, 2008

Originally I posted this on Facebook as a “Please Forward” Super Dickery Spam Wall Application Tag Entry:

My name is XXXX,

I am a healthy person living in relative comfort in a developed western high life expectancy country and have never experienced wars, terrible plagues or witnessed suffering on a national scale. The worst I have endured is the outpouring of national sycophancy when some princess we have never personally met died. I don’t see dead people. All the elderly from my society are hidden away so I don’t have to deal with impending infirmity and death. I have wall to wall entertainment in my not so humble abode. I complain about being delayed by minutes to travel the width of the country. I complain about not seeing the world when I have travelled round it many times. I complain about being bored when the knowledge of the world is at my fingertips. I complain about the weather as if it makes a fucking difference. I complain about other people complaining.

Above all I am a spoilt, self centered, wannabe nihilist who understands little of reality, wisdom or basic human kindness. I am a wanker of the highest order and spend my over rated days dicking around on the internet thinking I am both better than everyone else and also somehow reaching out and justifying my own worthless sense of overbloated smugness.

I also am so up my own rich food ruined anus that I assume that others need to see this round robin old as the internet chain article/letters bollocks so please do the world a favour and forward this on to as many people as electronically possible. Otherwise I will shoot my cat, your cats, god’s cat and all the cute baby seals I can before turning my swiss army pen knife on my own body in a pathetic attempt to try and get some attention.

Love XXXXX