IBM GC09-2830-00 User Manual

IBM DB2 Connect Personal Edition
Quick Beginnings
Ve r s i o n 6
IBM
GC09-2830-00
IBM DB2 Connect Personal Edition
Quick Beginnings
Ve r s i o n 6
IBM
GC09-2830-00
Before using this information and the product it supports, be sure to read the general information under “Appendix H. Notices” on page 173.
Order publications through your IBM representative or the IBM branch office serving your locality or by calling 1-800-879-2755 in the United States or 1-800-IBM-4YOU in Canada.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.
© Copyright International Business Machines Corporation 1993, 1999. All rights reserved.
US Government Users Restricted Rights – Use duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
Welcome to DB2 Connect! ......vii
How This Book is Structured......vii
Conventions ...........viii
Part 1. Introduction to DB2
Connect............ 1
Chapter 1. About DB2 Connect .... 3
Working with DB2 Data ....... 4
Accessing Host or AS/400 DB2 Data Using DB2 Connect Personal Edition 4 Connections via Communications
Gateway ........... 6
Accessing Host or AS/400 DB2 Data from the Desktop Using DB2 Connect
Enterprise Edition ........ 8
Accessing DB2 Data from the Web Using
Java ............. 14
Accessing DB2 Data from the Web Using
Net.Data ........... 16
Managing Connections to Databases Using
the Client Configuration Assistant .... 18
Developing Applications Using the DB2
Software Developer’s Kit ....... 18
Running Your Own Applications ....19
Part 2. DB2 Connect: Planning
and Installation.........21
Chapter 4. Installing DB2 Connect on
Windows 9x or Windows NT .....31
Before You Begin .......... 31
Performing the Installation ...... 32
Software Registration ........ 34
Part 3. Preparing Host and AS/400 Databases for DB2 Connect
Communications ........37
Chapter 5. Configuring Host and AS/400
Databases for DB2 Connect .....39
Preparing MVS/ESA or OS/390 for DB2
Connect ............. 39
Summary of Steps ........ 40
Configuring VTAM ........ 40
Configuring DB2 Universal Database for
OS/390 ............ 44
Configuring DB2 for MVS/ESA .... 45
Configuring TCP/IP for DB2 Universal
Database for OS/390 ....... 47
Preparing DB2 Universal Database for
AS/400 for DB2 Connect ....... 52
Preparing DB2 for VSE & VM ..... 53
Part 4. Configuring DB2 Connect to Communicate with Host and
AS/400 Databases .......55
Chapter 2. Planning for Installation . . . 23
Memory Requirements ........ 23
DB2 Connect Requirements ..... 23
Disk Requirements ......... 23
Estimating Fixed Disk Requirements 24
Software Requirements........ 24
Product Requirements ....... 25
Chapter 3. Installing DB2 Connect on
OS/2..............27
Before You Begin .......... 27
Performing the Installation ...... 27
Software Registration ........ 29
© Copyright IBM Corp. 1993, 1999 iii
Chapter 6. Configuring DB2 Connect to Host or AS/400 Communications Using
theCCA............57
Configuration Steps ......... 58
Adding a Database Using a Profile . . . 59
Adding a Database Using Discovery 60
Adding a Database Manually .... 62
Chapter 7. Configuring APPC Communications on the DB2 Connect
Workstation ........... 67
Step 1. Identify and Record Parameter
Values ............. 67
Step 2. Update the APPC Profiles on the
DB2 Connect Workstation ....... 70
Configuring IBM eNetwork Communications Server for Windows NT 70 Configuring IBM eNetwork Communications Server for Windows NT
SNA API Client ......... 76
Configuring Microsoft SNA Server for
Windows NT .......... 79
Configuring Microsoft SNA Client . . . 88 Step 3. Catalog the APPC or APPN Node 91 Step 4. Catalog the Database as a Database Connection Service (DCS) Database . . . 92
Step 5. Catalog the Database ...... 92
Step 6. Bind Utilities and Applications to
the Database Server ......... 94
Step 7. Test the Host or AS/400 Connection 94
Chapter 8. Enabling Multisite Updates
(Two-Phase Commit) ........ 97
Enabling Multisite Updates Using the
Control Center ..........101
Starting the Multisite Update Smartguide 101
Smartguide Steps.........101
Testing the Multisite Update Feature 101
Part 5. Configuring DB2 Clients to
Use DB2 Connect........103
Chapter 9. Configuring Client-to-Server Communications Using the Client
Configuration Assistant .......105
Configuration Steps .........106
Adding a Database Using a Profile . . . 106
Adding a Database Using Discovery 108
Adding a Database Manually ....110
Creating and Using Profiles ......112
Server Profiles..........112
Client Profiles ..........113
Part 6. Using DB2 Connect....117
Chapter 10. Running Your Own
Applications ...........119
Binding Database Utilities.......119
Binding to Host Databases .....120
Binding to DB2 Universal Databases 120
Running CLI/ODBC Programs .....121
Platform Specific Details for CLI/ODBC
Access ............123
Detailed Configuration Information . . 126
Running Java Programs .......127
Configuring the Environment ....128
Java Applications ........129
Java Applets ..........130
Part 7. Appendixes .......131
Appendix A. Basic Task Knowledge. . . 133
Starting the Software Registration Tool . . 133 Starting the Client Configuration Assistant 133
Starting the Control Center ......134
Entering Commands Using the Command
Center .............134
Entering Commands Using the Command
Line Processor ..........136
Command Line Mode .......136
Interactive Input Mode.......137
Working with the System Administrative
Group.............138
Appendix B. Using the Control Center to Administer DB2 for OS/390 and DB2 Connect Enterprise Edition servers . . . 139
Preparing DB2 for OS/390 Servers for the
Control Center ..........140
Using the Control Center .......140
Appendix C. db2cpic.dll - Extended SNA Security Codes on Windows NT and
Windows 95 ...........141
Appendix D. How the DB2 Library Is
Structured............143
Completing Tasks with SmartGuides . . . 143
Accessing Online Help ........144
DB2 Information – Hardcopy and Online 146
Viewing Online Information ......153
Accessing Information with the
Information Center ........154
Setting Up a Document Server .....155
Searching Online Information .....156
Printing the PostScript Books......156
Ordering the Printed Books ......157
Appendix E. National Language Support
(NLS).............159
iv Quick Beginnings
Code Page and Language Support ....159
Conversion of Character Data .....160
Bidirectional CCSID Support ......162
Bidirectional-specific CCSIDs.....163
Appendix F. Naming Rules ......165
General Naming Rules ........165
Database, Database Alias, and Catalog Node
Name Rules ...........165
Object Name Rules .........166
Username, User ID, Group Name, and
Instance Name Rules ........167
Workstation Name (nname) Rules ....167
DB2SYSTEM Naming Rules ......168
Password Rules ..........168
Appendix G. List Files, Bind Files, and
Packages ............169
List Files Associated with DRDA Servers 170
Appendix H. Notices ........173
Trademarks ...........174
Trademarks of Other Companies ....174
Index .............177
Contacting IBM ..........181
Contents v
vi Quick Beginnings
Welcome to DB2 Connect!
The DB2 Connect Quick Beginnings books provide a focused introduction to the installation and configuration of DB2 Connect products.
This Quick Beginnings book will guide you through the planning, installation, migration (if necessary), and setup of a DB2 Connect workstation. Once the DB2 Connect workstation has been installed and configured, you will configure a connection from the workstation to a DB2 server on a host or AS/400 system (using the Command Line Processor or DB2 GUI tools).
How This Book is Structured
Setting up DB2 Connect is a multi-step process. The sections in this book follow the typical sequence of tasks necessary to go from installing DB2 Connect to using client applications with your database.
DB2 Universal Database
The typical steps to installing and configuring DB2 Connect are as follows: Step 1. Determine how you want to use DB2 Connect in your network. For
the available options, see “Accessing Host or AS/400 DB2 Data Using DB2 Connect Personal Edition” on page 4.
Step 2. Verify that you have the correct hardware and software prerequisites
on both your workstation and the host database server. See “Chapter 2. Planning for Installation” on page 23 for prerequisites.
Step 3. Verify that your host or AS/400 database server is configured to
accept connections from DRDA Application Requesters such as DB2 Connect. See “Part 3. Preparing Host and AS/400 Databases for DB2 Connect Communications” on page 37.
Step 4. The next step is to install your DB2 Connect software. You will use
this workstation to configure and verify your host and AS/400
© Copyright IBM Corp. 1993, 1999 vii
connections. For DB2 Connect installation instructions, see “Part 2. DB2 Connect: Planning and Installation” on page 21.
Step 5. After installation, you will establish the connection between DB2
Connect and your host or AS/400 database system. DB2 Connect can locate and configure all TCP/IP and most SNA connections for you. If you are using a supported SNA product that DB2 Connect does not automatically configure, see the chapter in “Part 4. Configuring DB2 Connect to Communicate with Host and AS/400 Databases” on page 55 that corresponds to your SNA product.
v DB2 Connect Personal Edition ships with integrated SNA support.
If you need to manually configure the integrated SNA product, refer to the Installation and Configuration Supplement.
Step 6. Bind the programs and utilities provided with DB2 Connect to your
host or AS/400 database. For instructions on binding programs and utilities provided with your DB2 Connect product, see “Step 6. Bind Utilities and Applications to the Database Server” on page 94.
Step 7. You will need to test the connection. See “Chapter 6. Configuring
DB2 Connect to Host or AS/400 Communications Using the CCA”
on page 57 for more information.
Step 8. You are now ready to use DB2 Connect with all your applications. Step 9. Workstations that will be used for application development should
have the DB2 Software Developer’s Kit installed. See “Part 5. Configuring DB2 Clients to Use DB2 Connect” on page 103 for instructions on installing and configuring the DB2 Software Developer’s Kit.
Step 10. If you want to use this workstation to administer DB2 for OS/390 or
Conventions
This book uses the following highlighting conventions: v Boldface indicates commands or graphical user interface (GUI) controls
such as names of fields, folders, icons, or menu choices.
v Italics indicates variables that you should replace with your own value. It is
also used to indicate book titles and to emphasize words.
v Monospace indicates file names, directory paths, and examples of text you
enter exactly as shown.
viii Quick Beginnings
DB2 Universal Database for UNIX, Windows NT or OS/2 servers, install the DB2 Administration Client component of DB2 Connect. For more information on using Client tools, see “Appendix B. Using the Control Center to Administer DB2 for OS/390 and DB2 Connect Enterprise Edition servers” on page 139.
This icon marks a fast path. A fast path guides you to information specific to your configuration where multiple options are available.
This icon marks a tip. It provides additional information that can help you complete a task.
For a complete description of the DB2 library, see “Appendix D. How the DB2 Library Is Structured” on page 143.
v If you do not follow the documented installation method with the
recommended defaults, it may be necessary to refer to the Administration Guide and the Command Reference to complete the installation and configuration.
v The term Windows 32-bit operating systems refers to Windows 95,
Windows 98, or Windows NT.
v The term Windows 9x refers to Windows 95 or Windows 98. v The term DB2 client refers to a DB2 Run-Time Client or a DB2
Administration Client.
v The term DB2 Universal Database refers to DB2 Universal Database
on OS/2, UNIX, and Windows 32-bit operating systems, unless otherwise stated.
Welcome to DB2 Connect! ix
x Quick Beginnings
Part 1. Introduction to DB2 Connect
© Copyright IBM Corp. 1993, 1999 1
2 Quick Beginnings
Chapter 1. About DB2 Connect
DB2 Connect Enterprise Edition
DB2 Connect Enterprise Edition is a connectivity server that concentrates and manages connections from multiple desktop clients and web applications to DB2 database servers running on host or AS/400 systems. IBM’s DB2 for AS/400, DB2 for OS/390, and DB2 for VSE & VM databases continue to be the systems of choice for managing most critical data for the world’s largest organizations. While these host and AS/400 databases manage the data, there is a great demand to integrate this data with applications running on Windows, UNIX, OS/2 and Apple workstations.
DB2 Connect Enterprise Edition enables local and remote client applications to create, update, control, and manage DB2 databases and host systems using Structured Query Language (SQL), DB2 APIs (Application Programming Interfaces), ODBC (Open Database Connectivity), JDBC (Java Database Connectivity), SQLJ (Embedded SQLJ for Java), or DB2 CLI (Call Level Interface). In addition, DB2 Connect supports Microsoft Windows data interfaces such as ActiveX Data Objects (ADO), Remote Data Objects (RDO), and OLE DB.
DB2 Connect Enterprise Edition is currently available for AIX, HP-UX, Linux, OS/2, Solaris, and Windows NT operating systems. These servers provide support for applications running on Windows 3.1, Windows 9x, Windows NT, UNIX (AIX, SCO UnixWare 7, Solaris, HP-UX, Linux, Silicon Graphics IRIX, SINIX), OS/2, and Apple Macintosh workstations.
DB2 Connect Personal Edition
DB2 Connect Personal Edition provides access from a single workstation to DB2 databases residing on servers such as MVS/ESA, OS/390, OS/400, VM and VSE, as well as to DB2 Universal Database servers on Windows NT, UNIX, and OS/2. DB2 Connect Personal Edition provides the same rich set of APIs as DB2 Connect Enterprise Edition, and also features integrated SNA support on all Windows platforms.
This product is currently available for OS/2, Linux, Windows 9x, and Windows NT operating systems.
© Copyright IBM Corp. 1993, 1999 3
Working with DB2 Data
As well as providing a relational database to store your data, DB2 lets you issue requests to administer, query, update, insert, or delete data using local or remote client applications.
Accessing Host or AS/400 DB2 Data Using DB2 Connect Personal Edition
Direct connection without intermediate servers is a very convenient and desirable configuration. This is especially true for situations where the host or the AS/400 database server supports TCP/IP connectivity (for example, DB2 for OS/390 V5.1, or DB2 for AS/400 V4R2, or DB2 for VM 6.1). In such a configuration, each DB2 Connect workstation establishes a direct TCP/IP connection to DB2 for OS/390 or, for platforms with integrated SNA Support, connects via APPC to DB2 for MVS and other host and AS/400 databases.
TCP/IP connectivity requires that the host or AS/400 database support TCP/IP. At this point, DB2 for OS/390 V5.1, DB2/400 V4R2, and DB2 for VM V6.1 support native TCP/IP connections. An alternative to native TCP/IP is MPTN connectivity. MPTN connections require that IBM AnyNet products be installed on the target database system, but do not require the host or AS/400 database to provide native TCP/IP support.
Figure 1 on page 5 shows workstations directly connected to a host or AS/400 database server. Each workstation has DB2 Connect Personal Edition installed.
4 Quick Beginnings
DB2 for MVS
S/390, S/370
DB2 for VSE
DB2 for VM
OS/390
DB2 Connect Personal Edition
ODBC ADO DB2 CLI
Application 1
Application 2
Application 1
Application 2
Not all protocols are supported for all platforms.
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
Application 3
Application 4
DB2 for AS/400
AS/400
SDLC Token-ring X.25
JDBC SQLJ Emb SQL
...
Application n
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 1. Direct Connection Between DB2 Connect and a host or AS/400 database server
In this environment, if you are using Windows 32-bit operating systems you can use the DB2 Connect Personal Edition Integrated SNA Support to connect directly to the host or AS/400 servers. DB2 Connect Integrated SNA Support permits connections over a variety of local and wide area networks, such as Token-Ring, Ethernet, SDLC, Twinax, Coax and Asynchronous dial-up. The DB2 Connect Integrated SNA Support implements both APPC and MPTN connections over networks using hosts and AS/400 systems that have IBM AnyNet products installed. Users of OS/2 workstations can use IBM Personal Communications for OS/2, or IBM Communications Server for OS/2 to achieve direct APPC and MPTN connectivity.
Chapter 1. About DB2 Connect 5
Connections via Communications Gateway
Some organizations prefer to concentrate access to SNA networks through dedicated SNA Gateways, such as IBM eNetwork Communications Server, Microsoft SNA Server, or Novell Netware for SAA. DB2 Connect products support connections through gateways, so this can be a good choice if you need terminal emulation and other SNA services not provided by DB2 Connect. Figure 2 on page 7 illustrates such a situation.
6 Quick Beginnings
DB2 for MVS
S/390, S/370
DB2 for VSE
DB2 for VM
OS/390
SNA Gateway
(eg. IBM eNetwork Communications
Server, Microsoft SNA Server)
IPX/SPX, NetBIOS TCP/IP
DB2 for
AS/400
AS/400
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
ESCON
DB2 Connect Personal Edition
with SNA Gateway client software
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
DB2 Connect Personal Edition
with SNA Gateway client software
DB2 Connect Personal Edition
with SNA Gateway client software
Figure 2. Indirect Connection to host or AS/400 database server via SNA Communications Gateway
Although you can use DB2 Connect Personal Edition with SNA gateways, you may find DB2 Connect Enterprise Edition a better choice if you want to use many DB2 Clients. DB2 Connect Enterprise Edition can be installed on the
Chapter 1. About DB2 Connect 7
same machine as IBM eNetwork Communications Server or Microsoft SNA Server, and in many cases it can provide a less expensive and better-performing solution.
Contact your authorized IBM reseller for additional information about DB2 Connect Enterprise Edition.
Accessing Host or AS/400 DB2 Data from the Desktop Using DB2 Connect Enterprise Edition
A DB2 Connect server enables DB2 clients on a LAN access to data that is stored on host or AS/400 systems.
DB2 Universal Database Enterprise Edition and DB2 Universal Database Enterprise - Extended Edition include the DB2 Connect Server Support component. All references to DB2 Connect Enterprise Edition also apply to the DB2 Connect Server Support component.
DB2 Connect Enterprise Edition is most appropriate for environments where: v Host and AS/400 database servers do not support native TCP/IP
connectivity and direct connectivity from desktop workstations via SNA is not desirable (see Figure 3 on page 10).
v Application is implemented using data-aware Java applets (see Figure 7 on
page 15).
v Web servers are used to implement web-based applications (see Figure 8 on
v Middle-tier application server is employed. v Transaction monitor such as CICS, Encina, Microsoft Transaction Server
Applications are provided with transparent access to host or AS/400 data through a standard architecture for managing distributed data. This standard is known as Distributed Relational Database Architecture (DRDA). Use of DRDA allows your applications to establish a fast connection to host and AS/400 databases without expensive host components or proprietary gateways.
A great deal of the data in many large organizations is managed by DB2 for AS/400, DB2 for MVS/ESA, DB2 for OS/390, or DB2 for VSE & VM. Applications that run on any of the supported platforms can work with this data transparently, as if a local database server managed it. DB2 Connect Enterprise Edition is required for supporting applications which access host or AS/400 data and exploit transaction monitors (for example, CICS, Encina, Microsoft Transaction Server) as well as applications that are implemented as
8 Quick Beginnings
page 17, Figure 7 on page 15 and Figure 6 on page 13).
(MTS), Tuxedo, Component Broker, and MQSeries are used (see Figure 4 on page 11).
Java applets. In addition, you can use a wide range of off-the-shelf or custom-developed database applications with DB2 Connect and its associated tools. For example, you can use DB2 Connect products with:
v Spreadsheets, such as Lotus 1-2-3 and Microsoft Excel, to analyze real-time
data without having the cost and complexity of data extract and import procedures.
v Decision support tools, such as Business Objects, Brio and Cognos, and
Crystal Reports, to provide real-time information.
v Database products, such as Lotus Approach and Microsoft Access. v Development tools, such as PowerSoft PowerBuilder, Microsoft Visual Basic,
and Borland Delphi, to create client/server solutions.
Although DB2 Connect is often installed on an intermediate server machine to connect DB2 clients to a host or AS/400 database, it is also installed on machines where multiple local users want to access the host or AS/400 servers directly. For example, DB2 Connect may be installed on a large machine with many local users. It may also be installed on a Web server, Transaction Processor (TP) monitor, or other 3-tier application server machines with multiple local SQL application processes and threads. In these cases, you can choose to install DB2 Connect on the same machine for simplicity, or on a separate machine to off-load CPU cycles.
A DB2 Connect server enables multiple clients to connect to host or AS/400 data and can significantly reduce the effort that is required to establish and maintain access to enterprise data. Figure 3 on page 10 illustrates IBM’s solution for environments in which you want to use a DB2 client making an indirect connection to a host or AS/400 database server through DB2 Connect Enterprise Edition.
In the example, you could replace the DB2 Connect server with a DB2 server that has the DB2 Connect Server Support component installed.
Chapter 1. About DB2 Connect 9
DB2 for MVS
S/390, S/370
DB2 for VSE
DB2 for VM
OS/390
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
DB2 Connect Enterprise Edition
Communication Support
APPC, Named Pipes, NetBIOS,
IPX/SPX, TCP/IP
ESCON
DB2 for AS/400
tion 1
a
Applic
tion 2
a
Applic
...
AS/400
tion n
a
Applic
DB2 Run-Time Client DB2 Administration Client
Not all protocols are supported for all platforms.
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 3. DB2 Connect Enterprise Edition
10 Quick Beginnings
DB2 for MVS
S/390, S/370
DB2 for VSE
DB2 for VM
OS/390
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
DB2 Connect Enterprise Edition
TP Monitor
(eg. CICS, ENCINA, MTS)
Application Business Logic
ESCON
DB2 for AS/400
tion 1
a
Applic
tion 2
a
Applic
...
AS/400
tion n
a
Applic
TP Monitor Client
Not all protocols are supported for all platforms.
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 4. Using Transaction Monitors with DB2 Connect.
Chapter 1. About DB2 Connect 11
DB2 for MVS
S/390, S/370
Web
Server
DB2 for VSE
DB2 for VM
OS/390
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
ESCON
DB2 Connect Enterprise Edition
WebSphere
Java Servlets,
JSP,
Enterprise Java Beans
DB2 for AS/400
tion 1
a
Applic
tion 2
a
Applic
...
AS/400
tion n
a
Applic
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 5. Java Server Support.
12 Quick Beginnings
Web Browser
Not all protocols are supported for all platforms.
DB2 for MVS
S/390, S/370
Windows NT Server 4.0
with Option Pack 2
IIS
&
MTS
DB2 for VSE
DB2 for VM
OS/390
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
ESCON
DB2 Connect Enterprise Edition
ADO
ASPs, COM Objects
DB2 for AS/400
tion 1
a
Applic
tion 2
a
Applic
...
AS/400
tion n
a
Applic
Web Browser
Not all protocols are supported for all platforms.
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 6. DB2 Connect working with Microsoft IIS.
Chapter 1. About DB2 Connect 13
Accessing DB2 Data from the Web Using Java
Java Database Connectivity (JDBC) and Embedded SQL for Java (SQLJ) are provided with DB2 to allow you to create applications that access data in DB2 databases from the Web.
Programming languages containing embedded SQL are called host languages. Java differs from the traditional host languages C, COBOL, and FORTRAN, in ways that significantly affect how it embeds SQL:
v SQLJ and JDBC are open standards, enabling you to easily port SQLJ or
JDBC applications from other standards-compliant database systems to DB2 Universal Database.
v All Java types representing composite data, and data of varying sizes, have
a distinguished value, null, which can be used to represent the SQL NULL state, giving Java programs an alternative to NULL indicators that are a fixture of other host languages.
v Java is designed to support programs that, by nature, are heterogeneously
portable (also called super portableor simply downloadable). Along with Java’s type system of classes and interfaces, this feature enables component software. In particular, an SQLJ translator written in Java can call components that are specialized by database vendors in order to leverage existing database functions such as authorization, schema checking, type checking, transactional, and recovery capabilities, and to generate code optimized for specific databases.
v Java is designed for binary portability in heterogeneous networks, which
promises to enable binary portability for database applications that use static SQL.
v You can run JDBC applets inside a web page on any system with a
Java-enabled browser, regardless of the platform of your client. Your client system requires no additional software beyond this browser. The client and the server share the processing of JDBC and SQLJ applets and applications.
The JDBC server and the DB2 client must reside on the same machine as the Web server. The JDBC server calls the DB2 client to connect to local, remote, host, and AS/400 databases. When the applet requests a connection to a DB2 database, the JDBC client opens a TCP/IP connection to the JDBC server on the machine where the Web server is running.
14 Quick Beginnings
DB2 for MVS
S/390, S/370
Web
Server
DB2 for VSE
DB2 for VM
OS/390
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
ESCON
DB2 Connect Enterprise Edition
JDBC driver
DB2 JDBC
Applet Server
DB2 for AS/400
tion 1
a
Applic
tion 2
a
Applic
...
AS/400
tion n
a
Applic
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 7. Using Java Applets.
JDBC and SQLJ applications can be run from any system that has a DB2 client installed; a Web browser and a Web server are not required.
Java-enabled Web Browser
Not all protocols are supported for all platforms.
Chapter 1. About DB2 Connect 15
For more information on Java enablement, refer to the DB2 Java Enablement web page at http://www.software.ibm.com/data/db2/java/. For more information on the JDBC API, point your browser to http://splash.javasoft.com/.
Accessing DB2 Data from the Web Using Net.Data
Net.Data is provided with DB2 to allow you to create applications that access data in DB2 databases from the Web.
Use Net.Data to create applications that are stored on a Web server and viewable from any Web browser. While viewing these documents, users can either select automated queries or define new ones that retrieve the specified information directly from a DB2 database.
Automated queries do not require user input; they are links in an HTML document and, when selected, they trigger existing SQL queries and return the results from a DB2 database. These links can be triggered repeatedly to access current DB2 data. Customized queries require user input. Users define the search characteristics on the Web page by selecting options from a list or by entering values in fields. They submit the search by clicking on a push button. Net.Data uses the information that is supplied by the user to dynamically build a complete SQL statement, and it sends the query to the DB2 database.
A demonstration of Net.Data applications is available from the IBM Software Net.Datapage at http://www.software.ibm.com/data/net.data.
Net.Data can be installed with a DB2 server to allow local access to databases. Net.Datacan be installed with a DB2 client to allow remote access to databases. In both cases, Net.Data and the Web server must be installed on the same system.
16 Quick Beginnings
DB2 for MVS
S/390, S/370
Web
Server
DB2 for VSE
DB2 for VM
OS/390
APPC TCP/IP*** MPTN
Coax* Ethernet Asynch Twinax**
SDLC Token-ring X.25
ESCON
DB2 Connect Enterprise Edition
Net.Data
Net.Data
Templates
DB2 for AS/400
tion 1
a
Applic
tion 2
a
Applic
...
AS/400
tion n
a
Applic
Not all protocols are supported for all platforms.
* For Host connections only
** For AS/400
*** TCP/IP connectivity requires DB2 for OS/390 V5R1, DB2 for AS/400 V4R2,
or DB2 for VM V6.1
Figure 8. Net.Data with DB2 Connect.
Web Browser
Chapter 1. About DB2 Connect 17
Managing Connections to Databases Using the Client Configuration Assistant
The Client Configuration Assistant (CCA) helps you manage your database connections to remote servers. The CCA is available on OS/2 and Windows 32-bit operating systems. This is the preferred method to set up any OS/2, Windows 9x, or Windows NT client to communicate with a server.
You can use the command line processor to set up DB2 clients on any platform. For more information, refer to the Installation and Configuration Supplement.
With the Client Configuration Assistant, you can: v Catalog databases so that they can be used by applications. Three methods
are available: – Search the network for available databases and selecting one. Client
access is automatically set up for that database. DB2 Connect Personal Edition is limited in that it cannot search for Host or AS/400 databases, except through a DB2 Connect Enterprise Edition server.
– Use a database access profile provided by a database administrator to
automatically define your connections. Client access is automatically set up for that database.
– Manually configure a connection to a database by entering the required
connection parameters.
v Remove cataloged databases, or change the properties of a cataloged
database.
v Test connections to local or remote databases identified on your system. v Bind applications to a database by selecting utilities or bind files from a list. v Tune the client configuration parameters on your system. Parameters are
logically grouped and suggested settings are provided on the interface as parameters are selected.
Developing Applications Using the DB2 Software Developer’s Kit
The DB2 Software Developer’s Kit is a collection of tools that are designed to meet the needs of database application developers. It includes libraries, header files, documented APIs, and sample programs to build character-based, multimedia, or object-oriented applications.
A platform-specific version of the DB2 Software Developer’s Kit is available for each of the supported operating systems and is currently available in the DB2 Universal Developer’s Edition and the DB2 Personal Developer’s Edition. Applications that are developed with the DB2 Software Developer’s Kit will run on any platform where the equivalent DB2 client component is installed.
18 Quick Beginnings
Loading...
+ 166 hidden pages