StarQuest Technical Documents

How to Bind Packages with StarAdmin

Last Update: 19 June 2008
Product: StarSQL
Version: 5.x
Article ID: SQV00SQ007

Abstract

StarSQL for Windows includes an application called StarAdmin that you can use to bind the StarSQL SQL packages on the host. You must create and bind all required packages in the following situations:

  • when setting up StarSQL for the first time
  • after a DB2 upgrade (such as from DB2 v7 to DB2 v8)
  • after a major StarSQL upgrade (such as from StarSQL v4.x to StarSQL v5.x)

Background Information

  • A SQL package is an object that DB2 uses to process a SQL statement. Different packages are required to execute dynamic SQL, static SQL, and ODBC catalog functions.
  • StarAdmin is only installed with a Custom installation of StarSQL. If you do not see StarAdmin in your StarSQL program group, run the StarSQL setup and add the StarAdmin component. Generally, it is a good idea to perform a Custom installation for DB2 Administrators so that they can access StarAdmin. Perform a Typical installation for general users.
  • The user that binds packages with StarAdmin must have permission to bind packages in the host database. On DB2/400, the user requires CREATE permission for the specified library (package collection) where the packages will be created. On other hosts, the DBA must grant CREATE IN COLLECTION <package collection name> and BINDADD permissions to the user who will run StarAdmin. These permissions may be revoked once the packages have been created.
  • The process of binding packages only needs to be done once per DB2 instance if all StarSQL users share the same set of packages.

Solution

The first section below describes how to create and bind a set of SQL packages for new StarSQL installations. The second section explains the procedures required to bind a new set of packages after a DB2 or StarSQL upgrade. Perform the tasks in one of these two sections, depending on whether you need to bind packages for a new installation or after upgrading your DB2 or StarSQL software.

Binding Packages with StarAdmin for New Installations of StarSQL

  1. If a StarSQL System data source has not yet been created, create one now using the ODBC Data Source Administrator, which is typically found in the menu path Settings-->Control Panel-->Administrative Tools-->Data Sources (ODBC).The Package Collection Name parameter value in the StarSQL data source is the schema/library in which the packages will be created. Modify this value, if necessary, to specify the desired package collection for the SQL packages.
  2. After the data source has been created, open StarAdmin from the StarSQL program group and select Open Database Connection from the File menu. Choose the StarSQL data source and connect with a user ID and password that has authority to create and bind packages in the package collection.
  3. Once StarAdmin connects to the database, it immediately binds the package that is needed to complete the remainder of the package binding process and displays a message dialog when this is complete. Click OK to continue.
  4. Click the BIND ALL button to create and bind the StarSQL packages. The binding status is displayed in the lower left corner of the StarAdmin window.
  5. Select YES when StarAdmin asks if you wish to grant EXECUTE authority to PUBLIC so that all StarSQL users will have access to the packages.
  6. After the view of the packages refreshes, select Close Database Connection from the File menu and exit StarAdmin.

Dropping and Binding New Packages after a DB2 or StarSQL Upgrade

The StarSQL 5.x packages are backwards compatible, which means that StarSQL 4.x users and StarSQL 5.x users can use the same set of packages created with the StarAdmin tool that is installed with StarSQL 5.x. If you wish to bind a separate set of packages for the StarSQL 5.x users, change the value for the Package Collection Name in the StarSQL 5.x data source prior to running StarAdmin. For example, set the value of the Package Collection Name to STARSQL5 to distinguish these new packages from those created with older versions of StarSQL.

  1. If you plan to bind a new set of packages for all clients of all StarSQL versions to share, you must first delete all of the old StarSQL packages directly on the DB2 server (you may need to request that your DBA do this). If you plan to bind a separate set of packages, proceed to the next step.
  2. Open StarAdmin from the StarSQL program group and select Open Database Connection from the File menu. Choose the StarSQL data source and connect with a user ID and password that has authority to create and bind packages in the package collection.
  3. When StarAdmin connects to the database it immediately binds the package that is needed to complete the remainder of the package binding process and displays a message dialog when this is complete. Click OK to continue.
  4. Click the BIND ALL button to create and bind the StarSQL packages. The binding status is displayed in the lower left corner of the StarAdmin window.
  5. Select YES when StarAdmin asks if you wish to grant EXECUTE authority to PUBLIC so that all StarSQL users will have access to the packages.
  6. After the view of the packages refreshes, select Close Database Connection from the File menu and exit StarAdmin.

DISCLAIMER

The information in technical documents comes without any warranty. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The information in technical documents may be gathered from various sources, including IBM, Microsoft, and other organizations.