software:db2:setup
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| software:db2:setup [2013/01/11 15:39] – external edit 127.0.0.1 | software:db2:setup [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Setup of Database Server ====== | ||
| - | |||
| - | ====Teaching - Understanding DB2==== | ||
| - | |||
| - | < | ||
| - | |||
| - | The database server is not accessible by students or faculty directly | ||
| - | Any connection to the database will occur from the client' | ||
| - | |||
| - | As of September 2012, we are running DB2 -Express-C Version 10.1 | ||
| - | |||
| - | This is a freely available version for universities. | ||
| - | |||
| - | You need to register with IBM's Academic Initiative Alliance for valid downloads | ||
| - | |||
| - | |||
| - | The client' | ||
| - | unix login. | ||
| - | |||
| - | | ||
| - | Entering db2 from any linux desktop in the department will | ||
| - | allow you to access db2 eg: | ||
| - | |||
| - | | ||
| - | |||
| - | |||
| - | |||
| - | | ||
| - | |||
| - | | ||
| - | SQL authorization ID = SEELA | ||
| - | Local database alias = C3421A | ||
| - | |||
| - | |||
| - | |||
| - | For Teaching purposes , databases are created by the administrator once a semester | ||
| - | and always takes the course number and session. At the end of each semester, it is | ||
| - | dropped . | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | **Faculty members who are teaching the course must remember to request the | ||
| - | creation of the database for that particular semester. | ||
| - | ** | ||
| - | |||
| - | |||
| - | ====Teaching with a Database==== | ||
| - | |||
| - | In order to create a database for the current semester | ||
| - | |||
| - | First drop the previous term. It's always good to consult with the teaching | ||
| - | faculty that they have already submitted their marks | ||
| - | If not DO NOT DROP | ||
| - | |||
| - | Then proceed to dropping the database if you have permission | ||
| - | |||
| - | * On the client host (red as an example and using the client id db2leduc) | ||
| - | | ||
| - | db2 " | ||
| - | |||
| - | If successful and you issue the following command , the database should not | ||
| - | exist on the list | ||
| - | db2 list database directory | ||
| - | |||
| - | * On the DB Server (gold) | ||
| - | as the instance owner | ||
| - | db2 drop database c3421a | ||
| - | |||
| - | * Now create the database for the winter semester | ||
| - | db2 create database c3421m | ||
| - | The CREATE DATABASE command completed successfully. | ||
| - | |||
| - | * Back on the client host | ||
| - | | ||
| - | db2 catalog database c3421m as c3421m at node gold | ||
| - | The CATALOG DATABASE command completed successfully. | ||
| - | |||
| - | | ||
| - | On the DB server, connect with the instance ID and do the following | ||
| - | $db2 connect to database name | ||
| - | $db2 " | ||
| - | $db2 "grant connect , createtab, bindadd on database to group faculty" | ||
| - | $db2 "grant connect , createtab, bindadd on database to group ugrad" | ||
| - | $db2 "grant connect, | ||
| - | |||
| - | * Test the connection from any client host in the lab (all linux machines in the department) | ||
| - | |||
| - | From any host in prism | ||
| - | jun04 > db2 | ||
| - | | ||
| - | list tables | ||
| - | .... | ||
| - | |||
| - | |||
| - | | ||
| - | |||
| - | | ||
| - | ====Sample Programs==== | ||
| - | |||
| - | |||
| - | * Java | ||
| - | | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | | ||
| - | |||
| - | |||
| - | |||
software/db2/setup.1357936774.txt.gz · Last modified: (external edit)
