ssh rack40.cs.duke.edu -l <user>
If this is your first-time login, type the password you received in email. Then, use the command "password" to change your password.
. ~cps216/db2profileYou might want to add the above line into your .bashrc to be executed automatically when a shell starts up.
Otherwise, if you are using csh or tcsh, type:
source ~cps216/db2cshrcYou might want to add the above line into your .cshrc to be executed automatically when a shell starts up.
db2 -tRemember the "-t" option, which allows you to use semicolon (";") to terminate SQL commands.
When you are inside the command-line processor, you will get a prompt that looks like the following:
db2 =>
To connect to our database, type:
connect to cps216;
You can now use any SQL commands (CREATE, DROP, SELECT, INSERT, DELETE) to manipulate the database. Another useful DB2 command is "list tables;", which prints out a list of all tables and views you have created.
When you are done, type the following to disconnect from our database:
disconnect from cps216;
Finally, exit the DB2 command-line processor by typing:
quit;