Monday, April 12, 2010

Create a database with Data Studio for DB2

Data Studio is a free utility for managing DB2 databases. It has SQL and XQuery syntax highlighting, code validation, and tools for helping you build stored procedures and various other database objects. You can use it to explore a database by drilling down through schemas, tables, and so on. Naturally, you can use it to create databases.

Click on the "Create database" button in the "Data Source Explorer" pane.

You want to create a DB2 for Linux UNIX Windows (LUW) database. Before DB2 9, LUW was known as UDB.

Enter the following values and test the connection:
  • DB2 as the instance name. DB2 is the default instance name on Windows. You can find out the name of your instance by issuing the db2set -g command.
  • localhost as the host. This refers to your own computer.
  • 50000 as the port. This is the default DB2 port.
  • Your own username on Windows, or the DB2 instance owner username (typically db2inst1) on Linux.
  • The corresponding password.

Enter a name and location for the database and then click Run to create the it.
  • TEST is as good a database name as any for our purposes.
  • On Windows, you generally enter a drive letter like C: or D: for the database path. On Linux, you should enter a full path like /db2/data

Congratulations! Your database is ready for use.


Leons Petrazickis
DB2 Express-C Community Team


Post a Comment