Setting up DB2 for database services

To use any of the database services with DB2 Universal Database(TM) complete the following steps:
  1. Ensure that IBM(R) DB2 Universal Database is installed and that your database is created.
  2. If you want to set up a development environment, then before you can use the JDBC support within WebSphere(R) Studio Application Developer, you must first either import the JDBC drivers or confirm that they are accessible to the service invoker. Since you will be using DB2(R), import or make a reference to the DB2 Universal Database (UDB) drivers. These JDBC drivers are in the file SQLLIB\java\db2java.zip, on the disk where DB2 is installed.

    To import the DB2 JDBC drivers into WebSphere Studio Application Developer, create a new project named, for example, IBM DB2 JDBC Drivers, and import into it all the files in the db2java.zip file. When the import is completed, you should see the driver packages com.ibm.db2.jdbc.app and com.ibm.db2.jdbc.net in the IBM DB2 JDBC Drivers project.

    If you prefer just to make a reference to the db2java.zip file that is available on an accessible drive, add the zip file to the Java(TM) Build Path of your application project.

  3. Start the database manager. This step applies for either a development or a runtime environment with a local IBM DB2 database. You can do this either from the Services folder (service DB2-DB2), or by entering the following at a command prompt:

    DB2START

  4. The following steps apply for either a development or a runtime environment with IBM DB2 on a server:
    1. Start the Security Service either from the Services folder (service named DB2 Security Server) or by entering the following at a command prompt:

      net start DB2NTSECSERVER

    2. Start the database manager. This can be done either from the Services folder (service DB2-DB2) or by entering the following at a command prompt:

      DB2START

    3. Start the DB2 JDBC applet server. Enter the following command only in the case of a remote database being accessed from a Java applet with no IBM DB2 client component code running in the client:

      DB2JSTRT 8888

      where 8888 is the port the applet server is listening on.
    4. Start your application from WebSphere Studio Application Developer like any other application. The loaded DB2 JDBC driver handles the JDBC API calls from your application through the JDBC services provided by the toolkit.