how to configure informix connect and odbc james edmiston informix dba consultant/quest information...

26
How to Configure Informix How to Configure Informix Connect and ODBC Connect and ODBC James Edmiston James Edmiston Informix DBA Consultant/Quest Informix DBA Consultant/Quest Information Systems, Inc. Information Systems, Inc. Informix User Forum 2005 Moving Forward With Informix Atlanta, Georgia December 8-9, 2005

Upload: dominick-newman

Post on 27-Dec-2015

223 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

How to Configure Informix How to Configure Informix

Connect and ODBCConnect and ODBC James EdmistonJames Edmiston

Informix DBA Informix DBA Consultant/Quest Information Consultant/Quest Information

Systems, Inc.Systems, Inc.

Informix User Forum 2005 Moving Forward With Informix

Atlanta, Georgia December 8-9, 2005

Page 2: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Purpose

Identify Informix connectivity products and explain how to configure the related components for Microsoft Windows clients to enable client applications to access Informix databases through ODBC

Page 3: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Outline

• Overview of the latest IBM Informix Client SDK

• List available Operating System platforms

• Describe Client configuration

• Identify Informix client connectivity components

• Describe and Demonstrate configuration/testing

• Identify potential problems

• List Documentation

Page 4: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client SDK 2.9 Overview

Informix Client SDK V2.9 contains a collection of APIs that can speed development of applications that work with Informix database servers. Using Client SDK, developers can:

• Write applications in a number of languages including Java, C++, C, and ESQL

• Write applications using tools that work with ODBC and/or OLE/DB. This flexibility allows more choice in programming environments, promotes easier and faster application development, and can reduce the cost of training developers in new skills

• Build one application to access multiple Informix databases. This can save maintenance and support expenses, minimize downtime, and speed application development

Page 5: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client SDK 2.9 Components

• Informix ESQL/C V2.9

• Informix ODBC driver V2.9

• Informix OLEDB Provider V2.9 (Win32 only)

• Informix Object Interface for C++ V2.9

• Informix JDBC driver V3.0 (Type 4) and Informix Embedded SQLJ V1.01

• Informix Connect V2.9

• Informix .NET Provider V2.9 (Windows only)

Page 6: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client SDK 2.9 (cont)

• High performance OLE DB

– Supports Microsoft Visual Basic

– Supports Visual C++

• UniCode Enabled ODBC Driver

• Robust, Feature rich ESQL/C module

• ESQL/C interoperability with DB2 V8.2

• Supports .NET applications via Visual Studio .NET bridge

• Server support for IDS V10

Page 7: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client SDK for Windows

• Pentium™ 3, or higher microprocessor

• Windows NT™ V4.0 (Service Pack 5, or later), Windows 98/ME/XP, or Windows 2000

• 64 MB RAM

• 70 MB of available hard disk space

• TCP/IP protocol that is Windows Sockets 1.1 compliant

• Microsoft Visual C++ Compiler V6.0

• Install MTS 2.0 (to enable use of the MTS feature for ODBC and OLEDB) on Windows NT and earlier versions of Windows

Page 8: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client SDK Unix

• In a UNIX® workstation environment:

– 75 MB of available hard disk space

– Native TCP/IP protocol

– Native C/C++ compiler and Java™

– 32 and 64 bit

– Reference IBM/Informix web site

Page 9: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client Server Architecture

ClientServer

IBM Informix Client SDK/Connect

ODBC DSN

NetworkConnection

INFORMIXSERVER

ODBC Enabled Client Application

Page 10: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client Applications

Examples of Client Applications

• Application development tools

– PowerBuilder, Visual Basic

• Query and reporting tools

– BrioQuery

• Other

– Microsoft Access

– Custom Applications

Page 11: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Using ODBC

What is ODBC?

• Microsoft Open Database Connectivity

• Enforces standards that allow an application to access different database vendors

• Portable across platforms - may not be seamless because of individual features of the database products

What Informix products need to be installed?

Page 12: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

IBM Informix CSDK/Connect Components

Connectivity components of the IBM Informix (CSDK) and Informix Connect

• ODBC driver

• Setnet32 Configuration Utility

• Testing tools

Page 13: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Informix Connect

• Consists of the runtime connection libraries

• Bundled with IBM Informix Client SDK

• Informix Connect allows distribution of runtime versions with completed applications

Once Installed, know what to configure

Page 14: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Configure (3 Step Plan)

Client Components

– Setnet32

• Network service in services file

– ODBC data source (Data Source Name = DSN)

– Client application referencing DSN

Page 15: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Setnet32

• Configuration tool included in Informix products

• Sets INFORMIX environment variables on the client machine

• Creates a server entry with server identification and network parameters

• Setnet32 configures on the Windows client what the UNIX SQLHOSTS file and environment variables are to the Informix server

Page 16: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Setnet32 (cont)

• Records entries in the Windows registry

• Allows save/load of entries to/from a file

• Test Client/Server connection Using DBPing and ILogin Demo Tool

ILogin Demo returns “select * from customer” of stores database

Page 17: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Network Services file

Network ‘services’ file• 9x - c:\windows\services• NT/2K/XP - c:\winnt\system32\drivers\etc\services• ASCII text

– Service name– Port number– Protocol

• Service name corresponds to ‘Service’ value from the Setnet32 entry

Example services file entry

Demonstration of Setnet32 and Test Connection

Page 18: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

ODBC Data Source Name (DSN)

• Consists of:– Database name– ODBC driver specification– Database server– Host name– Network protocol

• Configured using the ODBC administrator

• Test database connection

Demonstration of ODBC DSN

Page 19: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Client Application

• Reference ODBC DSN

– Brio Query demo

– MS Access demo

Page 20: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Potential Problems

• May need to reboot the client machine after installing CSDK/Connect before creating the ODBC data source

• Informix error message text may reference the UNIX environment, while the problem really applies to the Windows environment

• Informix error -908

Verify the listening port number defined on the server matches the client

Page 21: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Potential Problems (cont)

• Informix error -931

Verify the service file entry matches the service name in the Setnet32 ‘Server Information’ tab

• Informix error -951 or -956

Password? Client machine name or IP in /etc/hosts

• Informix error -329

Invalid Database Name

Page 22: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Potential Problems (cont)

• System error code 126client environment problem

– NT/2K/XP - Using the Control Panel, System properties, set system variables in the ‘Environment’ tab

– 95/98 - make entries in the autoexec.bat file

– Variables to set (example):

INFORMIXDIR=c:/informixPATH=c:/informix/bin;...

Page 23: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Documentation• Embedded SQLJ User's Guide, Version 1.01 (G251-1270-00)

This manual contains information about using IBM Informix Embedded SQLJ. IBM Informix Embedded SQLJ enables you to embed SQL statements in your Java programs. It consists of the SQLJ translator, which translates SQLJ code into Java code, and a set of Java classes that provide runtime support for SQLJ programs. When you run a SQLJ program, it uses IBM Informix JDBC Driver to connect to an IBM Informix database.

• IBM Informix Client Products Installation Guide for UNIX, Linux, and Windows (G251-1269-00)

This manual explains how to install IBM Informix Client Software Developer's Kit (Client SDK), Version 2.5, and IBM Informix Connect, Version 2.5, on computers that use UNIX, Linux, and Windows.

• IBM Informix ESQL/C Programmer's Manual, Version 9.53 (G251-1342-00)This manual describes the features that make up the IBM Informix implementation of embedded SQL for C.

• IBM Informix GLS User's Guide, Version 9.4/8.4 (G251-1241-00)This manual describes the Global Language Support (GLS) feature, which allows IBM Informix application-programming interfaces (APIs) and database servers to handle different languages, cultural conventions, and code sets.

Page 24: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Documentation (cont)

• IBM Informix OLE DB Provider Programmer's Guide, Version 2.81This manual describes the software requirements for using IBM Informix OLE DB Provider, shows how to install and configure the provider for your use, and explains how to use IBM Informix OLE DB Provider to enable client applications, such as ActiveX Data Object (ADO) applications and Web pages, to access data on an IBM Informix server.

• IBM Informix Object Interface for C++ Programmer's Guide, Version 2.5 This guide describes the architecture of the C++ object interface and provides a complete class reference.

• JDBC Driver Programmer's Guide, UNIX and Windows Environments, v2.21 This guide describes how to install, load, and use Informix JDBC Driver to connect to an Informix database from within a Java application or applet. You can also use Informix JDBC Driver for writing user-defined routines that are executed in the server.

• ODBC Driver Programmer's Manual, Version 3.82This manual is a user guide and reference manual for Informix ODBC Driver, which is the Informix implementation of the Microsoft Open Database Connectivity (ODBC) interface, Version3.0. This manual explains how to use the Informix ODBC Driver application programming interface (API) to access an Informix database and interact with an Informix database server.

Page 25: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Tuesday, May 24, 2005

Summary

• Latest IBM Informix CSDK 2.9 and Informix Connect

• Client connection to Informix databases

• Install Informix client connectivity products

• Configure Setnet32, ODBC, service file

• Test connection

• Potential problems

• Documentation

– For accompanying article:http://www.questinfosys.com/CSDK_Article/CSDK_Article.htm

Page 26: How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward

Happy Connecting!Happy Connecting!

James EdmistonJames [email protected]@questinfosys.comwww.questinfosys.comwww.questinfosys.com

Informix User Forum 2005 Moving Forward With Informix

Atlanta, Georgia December 8-9, 2005