Archive for November, 2008

Oracle constraint: how to ensure that a column value can only accept lowercase entries

November 25th, 2008

alter table schema_name.table_name add constraint constraint_name check (field_name = lower(field_name));

Purge /* oracle sql */

November 25th, 2008

The drop table command moves a table into the recycle bin unless purge is also specified.
SQL> drop table schema_name.table_name purge;

Caution:

You cannot roll back a PURGE statement, nor can you recover an object after it is purged.

More details about purge can be found at:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9018.htm

P4WSAD: The Perforce Plug-in for Eclipse

November 17th, 2008

P4WSAD, the Perforce plugin for Eclipse enables you to access Perforce from within the Eclipse IDE.
Perforce Perspective has almost all the same features as P4 Client:

  • P4 Depots
  • P4 Jobs
  • P4 Log Console
  • P4 Pending Changelists
  • P4 Revision Control
  • P4 Submitted Changelists

Installation notes can be found at:
http://www.perforce.com/perforce/products/p4wsad.html

Release notes can be found at:
http://www.perforce.com/perforce/doc.081/user/p4wsadnotes.txt

p4 where

November 14th, 2008

When you’re setting up your workspace view in Perforce it can be confusing to figure out how to map directories in the depot to particular directories in your local filesystem. I just noticed the ‘p4 where’ command which looks like it could help with this by showing the predicted location of a given file in the client view and filesystem:

$ p4 where //depot/mainline/path/to/index.html
//depot/mainline/path/to/index.html //sha-skh2-webphp5/depot/mainline/path/to/index.html /home/skh2/depot/mainline/path/to/index.html

Screen

November 13th, 2008

I got so excited about the screen program that I set up this blog just so I could write about it. When I ssh to one of our servers I often end up su-ing between various users to perform actions that need to be invoked with different privileges. That can get pretty tedious. I could set up sudo for this, but I’d rather have dedicated sessions than constantly have to prefix my commands with ’sudo’. I finally decided to learn how to use screen which is a sort of window manager for console sessions.

Screen allows you to:

  • create a number of consoles and switch between them with keyboard shortcuts
  • detach from a session and re-attach to it later, even from a different machine!
  • share the same session simultaneously with others — this could be very useful for learning administrative tasks by going through them together
  • split the window so multiple consoles are visible at the same time

Here are a few brief tutorials on using it:

Hello world!

November 13th, 2008

Welcome to our new blog! We aim to use this to share tips on server administration, ideas about web development, cool tools, and whatever else is on our minds.