IBM GC09-2830-00 manual Running Your Own Applications, Binding Database Utilities

Models: GC09-2830-00

1 196
Download 196 pages 29.94 Kb
Page 131
Image 131
Chapter 10. Running Your Own Applications

Chapter 10. Running Your Own Applications

Various types of applications can access DB2 databases:

vApplications developed using the DB2 Software Developer's Kit that include embedded SQL, APIs, stored procedures, user-de®ned functions or calls to the DB2 CLI.

vODBC applications such as Lotus Approach.

vJDBC applications and applets.

vNet.Data macros containing HTML and SQL.

An application on a DB2 client can access a remote database without knowing its physical location. The DB2 client determines the location of the database, manages the transmission of the requests to the database server, and returns the results.

In general, to run a database client application, use the following steps:

1.Ensure the server is con®gured and running.

Be sure that the database manager is started on the database server to which the application program is connecting. If it is not, you must issue the db2start command at the server before starting the application.

2.Ensure that you can connect to the database that the application uses.

3.Bind the utilities and the applications to the database. See ªBinding Database Utilitiesº for information about binding the utilities.

4.Run the application program.

Binding Database Utilities

You must bind the database utilities (import, export, reorg, the command line processor) and DB2 CLI bind ®les to each database before they can be used with that database. In a network environment, if you are using multiple clients that run on different operating systems or are at different versions or service levels of DB2, you must bind the utilities once for each operating system and DB2-version combination.

Binding a utility creates a package, which is an object that includes all of the information that is needed to process speci®c SQL statements from a single source ®le.

© Copyright IBM Corp. 1993, 1999

119

Page 131
Image 131
IBM GC09-2830-00 manual Running Your Own Applications, Binding Database Utilities