Showing posts from November, 2008

SQLplus basics

Several useful commands.

Basic Retrieval from single table
SELECT [DISTINCT] display_fields
FROM tables
WHERE field_conditions
ORDER BY field_name [ASC | DESC];

e.g: select * from MethodParameter;
e.g: select * from MethodParameter where NAME=DUNHAM;

Delete the whole content of table
DROP TABLE tablename;

e.g: drop table MethodParameter;

Delete one or more records from a table
DELETE FROM table_name
WHERE record_retrieval_conditions;

e.g: delete from MethodParameter where NAME='DUNHAM BUSH';

Not enough disk space

Should you ever see these types of message, there are several 'must-know' unix commands that can be used in order to start investigating.

1. du | sort -n : lists all file usage from smallest to largest.
2. df -k -b : see how much allocation is used in the directory.

For more help, go to links below:-

1. An IT-admin guide to clearing up disk space
2. df unix command definitions and usage
3. du unix command definitions and usage

How to kill a Unix process

From and

If you are logged in to a Unix system and your session "hangs" or "freezes" (i.e. nothing happens for a long time and it does not respond to Ctrl/Q Ctrl/C or Ctrl/D), you can attempt to unfreeze it yourself by "killing" the process which has stopped your session.

You can also use Ctrl/Z to get out of a process in UNIX.

Login to the system where your session is frozen Type the command: wusid where usid is your own username. This will produce a line of output for each login something like this: 9:53am up 82 day(s), 15:58, 132 users, load average: 6.50, 6.25, 5.70
User tty login@ idle JCPU PCPU what
nabc pts/160 9:12am -csh
nabc pts/166 9:53am w nabc Note the contents of the tty column for the frozen login -- in this example attached to pts/160.Type the command ps…