< Previous | Next >

Creating a connection to the DB2 SAMPLE database

The workbench provides wizards that make it easy for you to connect to both DB2 and non-DB2 databases and to display the status of your connections. The New Data Connection wizard creates a connection to a database in the Database Explorer view. For the purposes of this tutorial you connect to the DB2 SAMPLE database.

To create a connection to the DB2 SAMPLE database:

  1. In the Database Explorer view, right-click and select New > Connection. The New Connection wizard opens.
  2. Select the DB2 database manager that matches your local DB2 install.
  3. Clear the Use default naming convention check box.
  4. In the Connection Name field, type SAMPLE4tutorial.
  5. Specify the user ID and password that you want to connect with, and click Finish. The new connection is displayed in the Database Explorer.
  6. Expand the tree under the new connection to the Schemas folder. When you generate the SAMPLE database, user tables are created in a schema that matches your user ID. In this tutorial, we refer to that schema as schemaname.
  7. Expand schemaname and the Tables folder under it.
  8. Find the EMPLOYEE table and select it. You can browse the properties for this table in the Properties view.