Connecting to a Database

You must connect to a database before you can execute the StarAdmin bind command to bind packages on the DB2 host.

Perform the following steps to connect to a database.

  1. If the Connection Settings dialog is not already displayed, click the Open Database icon (Open Database icon) on the Toolbar, or select the Open Database command from the File menu.
  2. In the Connection Settings dialog, specify connection values appropriate for your environment, following the guidelines below.
    • In the Host field, enter either a TCP/IP host name or an IP address in dotted decimal notation. The host name refers to the TCP/IP server, which is the same as the host name of the database server. Dotted decimal notation is four decimal fields separated by periods, in which each decimal field may be between 0 and 255, for example "198.147.235.1".
    • In the Port field, enter the number of the port that DB2 is listening on for DRDA communications. The default DRDA port is 446 (50000 for DB2 LUW) for TCP/IP connections and 448 for SSL connections.
    • In the Database Name field, enter the name of the database server that will be accessed through this connection. You may need to obtain the database name from the Database Administrator.
      • On DB2 for z/OS, the database name is the Location Name in the Distributed Data Facility (DDF). You can get this by examining the DDF Communication record on the host.
      • On DB2 for i (aka DB2 for iSeries, DB2/400), the database name is the RDB or Relational Database Name. To find or create the relational database name, use the IBM i CL command WRKRDBIRE on the host.
      • On DB2 for Linux, UNIX, and Windows, the database name is the Database Name.
    • In the Package Collection field, enter the location on the DB2 host where StarAdmin will create the packages required by StarSQL to execute Dynamic SQL.
      • On DB2 for i , this is the name of a library where StarAdmin will create the StarSQL packages. Either create an empty library on the host called STARSQL and leave the default value, or specify an existing library such as QGPL.
      • On DB2 for z/OS, the Package Collection is the name of the virtual collection to be associated with these packages. Set the Package Collection value to SQLDBA for a DB2 for VSE & VM host.
    • In the Username field, enter your username or authorization identifier for connecting to the database. The user should have the authority to create and bind packages on the host database in the specified Package Collection.
    • In the Password field enter your password for connecting to the database.
  3. After all connection settings have been entered, click OK to connect to the database.

After you connect to a database, StarAdmin immediately binds the package needed for StarAdmin to function. The display shows the package name, creation date and package owner. The bottom of the StarAdmin window reports the database name, the name of the package collection, the database host type and database version. 

From the Command menu, select Bind to create and bind a complete set of packages. Refer to the Binding Packages topic for more information about the options you can set prior to binding packages.

A summary window displays the results of the bind operation. Note that you can use the values shown for the keywords in the summary to configure a datasource for the StarSQL ODBC driver to use, or the jdbc URL that is returned in the summary to connect to a host using the StarSQL for Java driver. Review the summary information and click Finished to return to the main StarAdmin window.

When you are finished working with the database packages, select Close Database from the File menu.

©Copyright 2018, StarQuest Ventures, Inc. All rights reserved.
February 2018 edition