IBM Informix Developer's Handbook

Total Page:16

File Type:pdf, Size:1020Kb

IBM Informix Developer's Handbook Front cover IBM Informix Developer’s Handbook Learn application development with supported APIs, drivers, and interfaces Understand Informix supported programming environments Follow practical examples to develop an Informix application Whei-Jen Chen Krishna Doddi Manoj Ghogale David Jay Javier Sagrera ibm.com/redbooks International Technical Support Organization IBM Informix Developer’s Handbook October 2010 SG24-7884-00 Note: Before using this information and the product it supports, read the information in “Notices” on page ix. First Edition (October 2010) This edition applies to IBM Informix Version 11.5. © Copyright International Business Machines Corporation 2010. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . ix Trademarks . x Preface . xi The team who wrote this book . xi Acknowledgements . xiii Now you can become a published author, too! . xiii Comments welcome. xiv Stay connected to IBM Redbooks . xiv Chapter 1. Introduction to IBM Informix . 1 1.1 Server options . 2 1.1.1 Informix servers. 2 1.2 Informix tools for developers . 9 1.2.1 Informix Connect . 9 1.2.2 Informix Client Software Development Kit. 9 1.2.3 4GL . 15 1.2.4 Ruby on Rails . 15 1.2.5 Informix DataBlade Developers Kit . 15 1.2.6 Informix Spatial DataBlade . 16 1.2.7 PHP on Informix . 17 1.3 Informix overview . 17 1.3.1 Architecture overview . 18 1.3.2 Informix developer environment . 21 1.3.3 Informix capabilities. 22 Chapter 2. Setting up an Informix development environment . 25 2.1 Server setup . 26 2.1.1 Planning for the installation . 26 2.1.2 Installing Informix Server. 26 2.1.3 Configuring Informix Server . 27 2.2 Client setup . 34 2.2.1 Informix Client options. 34 2.2.2 Installing and setting up Client SDK . 36 2.2.3 Setting up IBM Data Server drivers. 43 2.2.4 Setting up Informix JDBC . 53 Chapter 3. Working with the ODBC driver . 57 3.1 ODBC and Informix . 58 © Copyright IBM Corp. 2010. All rights reserved. iii 3.2 Setup and configuration . 58 3.2.1 IBM Informix ODBC Driver . 58 3.2.2 IBM Data Server Driver for ODBC and CLI. 70 3.2.3 Verifying connectivity . 74 3.3 Developing an ODBC application . 75 3.3.1 Connecting to the database . 75 3.3.2 Type mapping . 79 3.3.3 Performing database operations . 82 3.3.4 Handling special data types . 95 3.3.5 Error handling . 112 3.3.6 Troubleshooting . 117 Chapter 4. Working with ESQL/C . 125 4.1 Informix ESQL/C . 126 4.2 Setup and configuration . 127 4.3 Windows system configuration . 127 4.4 Developing an ESQL/C application . 128 4.4.1 Creating an ESQL/C application . 128 4.4.2 Performing database operations . 133 4.4.3 Data types mapping . 141 4.4.4 Handling special data types . 142 4.4.5 Exception handling . 148 4.4.6 Troubleshooting . 150 Chapter 5. Working with the JDBC drivers . 153 5.1 JDBC drivers for an Informix database . 154 5.1.1 IBM Informix JDBC Driver . 154 5.1.2 IBM Data Server Driver for JDBC and SQLJ . 156 5.2 Setup and configuration . 157 5.2.1 Configuration. 157 5.2.2 Verify connectivity with Informix JDBC Driver . 158 5.2.3 Verify connectivity with the Data Server Driver . 160 5.3 JDBC type mapping . 161 5.4 Performing database operations . 163 5.4.1 Connection to the database . 163 5.4.2 Manipulating data . 168 5.5 Informix additional features . 174 5.5.1 Batch inserts or updates and using ResultSet metadata . 175 5.5.2 BIGSERIAL data type . 177 5.5.3 Informix smart large objects . 178 5.5.4 Secure Socket Layer. 182 5.6 Typical errors. 185 5.6.1 Class not found errors. 186 iv IBM Informix Developer’s Handbook 5.6.2 Connectivity errors . 186 5.6.3 Syntax errors. 187 5.7 Tracing . 187 5.7.1 IBM Informix JDBC Driver . 187 5.7.2 IBM Data Server Driver for JDBC . 188 Chapter 6. IBM Informix with Hibernate . 189 6.1 Hibernate for Java . 190 6.1.1 Overview of Hibernate. 190 6.1.2 Hibernate concepts . 191 6.2 Setup and configuration . 192 6.2.1 Installation . 192 6.2.2 Configuration. ..
Recommended publications
  • ODBC Client Capability Customization Supplement
    TM Thoroughbred Basic ODBC Client Capability Customization Supplement Version 8.8.0 46 Vreeland Drive, Suite 1 • Skillman, NJ 08558-2638 Telephone: 732-560-1377 • Outside NJ 800-524-0430 Fax: 732-560-1594 Internet address: http://www.tbred.com Published by: Thoroughbred Software International, Inc. 46 Vreeland Drive, Suite 1 Skillman, New Jersey 08558-2638 Copyright 2013 by Thoroughbred Software International, Inc. All rights reserved. No part of the contents of this document may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Document Number: BDB8.8.0M001 The Thoroughbred logo, Swash logo, and Solution-IV Accounting logo, OPENWORKSHOP, THOROUGHBRED, VIP FOR DICTIONARY-IV, VIP, VIPImage, DICTIONARY-IV, and SOLUTION-IV are registered trademarks of Thoroughbred Software International, Inc. Thoroughbred Basic, TS Environment, T-WEB, Script-IV, Report-IV, Query-IV, Source-IV, TS Network DataServer, TS ODBC DataServer, TS ODBC R/W DataServer, TS DataServer for Oracle, TS XML DataServer, GWW, Gateway for Windows™, TS ChartServer, TS ReportServer, TS WebServer, TbredComm, WorkStation Manager, Solution-IV Reprographics, Solution-IV ezRepro, TS/Xpress, and DataSafeGuard are trademarks of Thoroughbred Software International, Inc. Other names, products and services mentioned are the trademarks or registered trademarks of their respective vendors or organizations. Preface After you install or upgrade Thoroughbred Environment 8.8.0, you must customize system files to ensure that Thoroughbred Basic can interact smoothly with databases created under other products, for example, Microsoft Access databases. The Thoroughbred Basic ODBC Client Capability Customization Supplement provides information that helps you establish and maintain connections between Thoroughbred products and ODBC-compliant databases.
    [Show full text]
  • Mysql Workbench Abstract
    MySQL Workbench Abstract This is the MySQL Workbench Reference Manual. It documents the MySQL Workbench Community and MySQL Workbench Commercial releases for versions 8.0 through 8.0.26. If you have not yet installed the MySQL Workbench Community release, please download your free copy from the download site. The MySQL Workbench Community release is available for Microsoft Windows, macOS, and Linux. MySQL Workbench platform support evolves over time. For the latest platform support information, see https:// www.mysql.com/support/supportedplatforms/workbench.html. For notes detailing the changes in each release, see the MySQL Workbench Release Notes. For legal information, including licensing information, see the Preface and Legal Notices. For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users. Document generated on: 2021-09-24 (revision: 70892) Table of Contents Preface and Legal Notices ................................................................................................................ vii 1 General Information ......................................................................................................................... 1 1.1 What Is New in MySQL Workbench ...................................................................................... 1 1.1.1 New in MySQL Workbench 8.0 Release Series ........................................................... 1 1.1.2 New in MySQL Workbench 6.0 Release Series ..........................................................
    [Show full text]
  • IBM Infosphere Optim Data Masking Solution Mask Data on Demand to Protect Privacy Across the Enterprise
    IBM Software Solution Brief IBM InfoSphere Optim Data Masking solution Mask data on demand to protect privacy across the enterprise Today’s organizations realize that data is a critical enterprise asset, so Highlights protecting that data and the applications that hold it makes good business sense. However, different types of information have different ●● ●●Safeguard personally identifiable informa- protection and privacy requirements. Therefore, organizations must tion, trade secrets, financials and other sensitive data take a holistic approach to protecting and securing their business-critical information: ●● ●●Easily mask data on demand using predefined transformations and site-specific routines ●●●Understand where data exists: Organizations can’t protect sensitive data unless they know where it resides and how it’s related across the ●● ●●Respond in real time to suspicious enterprise. requests for data ●●●Safeguard sensitive data, both structured and unstructured: ●● ●●Ensure a valid business need to know for Structured data contained in databases must be protected from sensitive data unauthorized access using data transformation techniques such as ●● ●●Discover hidden instances of private data masking or encryption. Unstructured data in documents, forms, image so they can be fully protected files, GPS systems and more requires privacy policies to de-identify ●● ●●Support compliance with privacy regula- or mask sensitive data while still allowing needed business information tions and corporate governance standards to be shared. ●●●Protect
    [Show full text]
  • IBM Informix 14.10: the High-Performance, Low-Footprint
    Solution Brief IBM Informix 14.10 IBM Informix 14.10 The high-performance, low-footprint database for analytics on the edge, in the cloud and on premises Enterprise databases have always needed to deliver fast transaction IBM Informix delivers: processing and the replication speeds necessary for continuous availability without adding undue administrative effort or sacrificing • Powerful, optimized time series and security. Yet, new opportunities like the Internet of Things (IoT) have geospatial data management also arisen, bringing an increase in data of various types, which businesses hope to turn into competitive advantage. For that reason, • Automated administration and self-management features many companies have turned to IBM® Informix®, a solution capable of satisfying database and analytics needs at the core of the enterprise or • Footprints under 100 MB for easy IoT at the edge of your IoT network. gateway embedding • IBM InformixHQ for collaboration and IBM Informix is an embeddable, high-performance database for management across multiple instances integrating SQL, NoSQL, JSON, time series and spatial data, which can be up and running in minutes, and is accessible from virtually any • Integrated in-memory warehouse desktop, laptop or mobile device. Its small footprint—lower than 100 MB accelerator in some cases1 —and ability to run on distributed devices with a variety of automated administrative capabilities means IBM Informix is easier to install and manage with fewer administrators, even when used across thousands of devices worldwide. These features make IBM Informix the database of choice for high-performance, multidatabase installations with remote management—as is the case for IoT edge gateways.
    [Show full text]
  • TS ODBC Dataserver Installation and Activation Guide
    TM TS ODBC DataServer Installation and Activation Guide Version 8.8.0 46 Vreeland Drive, Suite 1 • Skillman, NJ 08558-2638 Telephone: 732-560-1377 • Outside NJ 800-524-0430 Fax: 732-560-1594 Internet address: http://www.tbred.com Published by: Thoroughbred Software International, Inc. 46 Vreeland Drive, Suite 1 Skillman, New Jersey 08558-2638 Copyright 2013 by Thoroughbred Software International, Inc. All rights reserved. No part of the contents of this document may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Document Number: DDB8.8.0I01 The Thoroughbred logo, Swash logo, and Solution-IV Accounting logo, OPENWORKSHOP, THOROUGHBRED, VIP FOR DICTIONARY-IV, VIP, VIPImage, DICTIONARY-IV, and SOLUTION-IV are registered trademarks of Thoroughbred Software International, Inc. Thoroughbred Basic, TS Environment, T-WEB, Script-IV, Report-IV, Query-IV, Source-IV, TS Network DataServer, TS ODBC DataServer, TS ODBC R/W DataServer, TS DataServer for Oracle, TS DataServer, TS XML DataServer, GWW, Gateway for Windows™, TS ChartServer, TS ReportServer, TS WebServer, TbredComm, WorkStation Manager, Solution-IV Reprographics, Solution-IV ezRepro, TS/Xpress, and DataSafeGuard are trademarks of Thoroughbred Software International, Inc. Other names, products and services mentioned are the trademarks or registered trademarks of their respective vendors or organizations. INTRODUCTION The TS ODBC DataServer provides access to Thoroughbred data from third party applications. The DataServer is shipped in 2 models: Single-Tier and Multiple-Tier. This manual will detail how to install Single-Tier and Multiple-Tier client components, the Multiple-Tier server component, and the TS ODBC DataServer Expose Utility.
    [Show full text]
  • Platform Support Policy
    Platform Support Policy Purpose Simba designs, builds, and tests its software to run on specific platforms and with specific third- party components. The following platform support policy provides a guide to ensure our software is used on a platform that is generally supported by other required third parties. This allows us to better support your organization while using our products. Simba: Platform Support Policy Simba ODBC Drivers Simba provides both 32-bit and 64-bit ODBC drivers which are supported on the following platforms: Operating System Visual C++® Runtime Driver Manager OpenSSL® Microsoft Windows® • Windows 8.1, 10 One or both of Visual • Windows Server 2012, Studio® 2015, 2019 2012R2, 2016, 2019 Red Hat® Enterprise Linux® 7, 8 CentOS® Linux 7 Debian® Linux 9, 10 1.1.1 Ubuntu® Linux 18.04, 20.04 SUSE® Linux Enterprise Server iODBC 3.52.9 or 12, 15 later unixODBC 2.2.14 macOS® or later • Big Sur (Intel only) 11 • Catalina 10.15 • Mojave 10.14 magnitude.com Simba JDBC Drivers All JDBC drivers are supported on the following Java runtime environments: Vendor Version Lifecycle Oracle® Java® SE 8 http://www.oracle.com/technetwork/java/javase/eol-135779.html Operating System Support Microsoft Windows: • To ensure quality on the Windows platform, Magnitude|Simba will support the above stated versions of Windows Desktop and Server editions during Microsoft’s “mainstream” and “extended” support phases. Linux: The above stated Linux distributions and versions will be supported during the following phases as defined by the distribution: • Redhat: Support is provided up to and including the “Maintenance Support 2 Phase” • CentOS: Support is provided up to the support end of life date defined for each CentOS release • Debian / Ubuntu: Support is provided up to the end of life dates for the LTS (long term support) versions listed • SUSE Linux Enterprise: Support is provided up to the end of SUSE’s General Support dates macOS: • Apple does not publish an official end-of-life policy therefore Magnitude|Simba will support the three most recent macOS releases.
    [Show full text]
  • ODBC Driver Release Notes Release 18C, Version 18.1.0.0.0 E83801-01 February 2018
    Oracle® Database ODBC Driver Release Notes Release 18c, version 18.1.0.0.0 E83801-01 February 2018 ODBC Driver Release Notes The Oracle ODBC Driver Release Notes describe the following topics: • Description • New Features • Functionality • Software Required • Server Software Requirements • Hardware Required • Testing Matrix • More Information • Documentation Accessibility Description The Oracle ODBC Driver enables applications to connect to Oracle database from a Windows client as well as from a UNIX client that use Microsoft Open Database Connectivity (ODBC) API to read from and write to Oracle databases. The Oracle ODBC Driver distribution kit consists of Dynamic Link Libraries and shared libraries (for UNIX platforms), help file (on UNIX and Windows platforms), a copy of the license and this product description. To use an ODBC enabled application the following software is required in addition to the Oracle ODBC Driver: • Oracle Client & Net version 12.2 • Oracle Database Server Oracle ODBC Driver complies with ODBC 3.52 specifications. New Features Describes new features by release from release 10.1.0.2.0 to the current release. Oracle ODBC Driver new features are described for the following releases: 1 • ODBC Release 18c, Version 18.1.0.0.0 • ODBC 12.2.0.1.0 • ODBC 12.1.0.2.0 • ODBC 12.1.0.1.0 • ODBC 11.2.0.1.0 • ODBC 11.1.0.1.0 • ODBC 10.2.0.1.0 • ODBC 10.1.0.2.0 ODBC Release 18c, Version 18.1.0.0.0 Describes new features for release 18c, version 18.1.0.0.0 Features of the Oracle ODBC Driver release 18c, version 18.1.0.0.0 software for the Microsoft Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows 7, Windows 8, Windows 8.1, Windows 10, Linux X86-64 (32-bit, 64-bit), Sun Solaris SPARC64 (32-bit, 64-bit), IBM AIX 5L (32-bit, 64- bit), Sun Solaris X64 (32-bit, 64-bit), HPUX IA64 (32-bit, 64-bit), ZLinux (32-bit, 64-bit) operating systems are described as follows: • unixODBC ODBC Driver Manager is upgraded from unixODBC–2.3.2 to unixODBC–2.3.4.
    [Show full text]
  • Cisco and IBM Informix Database Software: Enhancing Collaboration
    White paper Cisco and IBM Informix Database Software: Enhancing Collaboration Introduction Cisco® Collaboration solutions help people work together to solve problems, make decisions, accelerate time to market, and transform entire industries faster, no matter how far apart the participants happen to be located. Businesses of all sizes use Cisco Highlights Collaboration solutions, from small businesses to large enterprises. This white paper addresses In fact, IBM® has a sizeable deployment of Cisco Collaboration a number of the features and technology across its offices worldwide. techniques Cisco uses to embed Informix in its solutions, The infrastructure required to power collaboration solutions like this and why. needs to be robust, scalable, and invisible. Cisco chose to embed IBM Informix® database software in their solutions because of the robust embeddability, high reliability, and extreme performance of Informix. Today, Cisco has over 100,000 instances of Informix Contents running in production environments; a number that continues to grow. When a customer makes a VoIP call using a Cisco 1 Introduction Collaboration solution, they have unknowingly just used Informix! 2 Deployment The number of product teams inside of Cisco using Informix is also growing. As a result, Cisco developed its own internal competency 3 Upgrades center around Informix so that its product groups are leveraging Footprint Optimization best practices and have an internal support community, in addition to the enablement support provided by IBM. 4 Backup and Restore This white paper addresses a number of the features and 5 System Monitoring Interface techniques Cisco uses to embed Informix in its solutions, and why. Storage Space Management It also highlights some of Informix’s newer features.
    [Show full text]
  • IBM Informix Performance Guide
    IBM Informix Version 11.70 IBM Informix Performance Guide SC27-3544-00 IBM Informix Version 11.70 IBM Informix Performance Guide SC27-3544-00 Note Before using this information and the product it supports, read the information in “Notices” on page C-1. This document contains proprietary information of IBM. It is provided under a license agreement and is protected by copyright law. The information contained in this publication does not include any product warranties, and any statements provided in this manual should not be interpreted as such. 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 IBM Corporation 1996, 2010. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Introduction .................................xiii About this publication ...............................xiii Topics beyond the scope of this publication .......................xiii Types of users .................................xiv Software dependencies ..............................xiv Assumptions about your locale ...........................xiv Demonstration databases .............................xiv What's new in performance for Informix, version 11.70 .....................xv Example code conventions ..............................xvii Additional documentation..............................xviii Compliance with industry standards ..........................xviii
    [Show full text]
  • Arcsde for IBM Informix
    ArcGIS® 9 Installation Guide: ArcSDE® for IBM® Informix® Copyright © 2006 ESRI All Rights Reserved. Printed in the United States of America. The information contained in this document is the exclusive property of ESRI. This work is protected under United States copyright law and the copyright laws of the given countries of origin and applicable international laws, treaties, and/or conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying or recording, or by any information storage or retrieval system, except as expressly permitted in writing by ESRI. All requests should be sent to Attention: Contracts Manager, ESRI, 380 New York Street, Redlands, CA 92373, USA. The information contained in this document is subject to change without notice. RESTRICTED/LIMITED RIGHTS LEGEND U.S. Government Restricted/Limited Rights: Any software, documentation, and/or data delivered hereunder is subject to the terms of the License Agreement. In no event shall the Government acquire greater than RESTRICTED/LIMITED RIGHTS. At a minimum, use, duplication, or disclosure by the Government is subject to restrictions as set forth in FAR §52.227-14 Alternates I, II, and III (JUN 1987); FAR §52.227-19 (JUN 1987); and/or FAR §12.211/12.212 [Commercial Technical Data/Computer Software]; DFARS §252.227-7015 (NOV 1995) [Technical Data]; and/or DFARS §227.7202 [Computer Software], as applicable. Contractor/Manufacturer is ESRI, 380 New York Street, Redlands, CA 92373-8100, USA. ESRI, MapObjects, ArcView, ArcIMS, ArcSDE, ArcInfo, ArcEditor, ArcGIS, ArcMap, ArcCatalog, ArcToolbox, ArcObjects, MapObjects, SDE, and the ESRI globe logo are trademarks of ESRI, registered in the United States and the European Community, or certain other jurisdictions.
    [Show full text]
  • DB2 UDB for Z/OS Security Target
    DB2 UDB for z/OS Security Target Version 1.3.13 Status: Final Last Update: 2007-12-06 DB2 UDB for z/OS Security Target IBM atsec is a trademark of atsec GmbH IBM, IBM logo, DB2 UDB for z/OS are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both: • Advanced Function Presentation • AFP • DFS • DFSORT • • IBM • Infoprint • MVS • PR/SM • Print Services Facility • Processor Resource/Systems Manager • RACF • VTAM • z/Architecture • z/OS • z/VM • zSeries Intel and Pentium are trademarks of Intel Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States, other countries, or both. Java and all Java-based products are trademarks of Sun Microsystems, Inc., in the United States, other countries, or both. Other company, product, and service names may be trademarks or service marks of others. This document is provided AS IS with no express or implied warranties. Use the information in this document at your own risk. This document may be reproduced or distributed in any form without prior permission provided the copyright notice is retained on all copies. Modified versions of this document may be freely distributed provided that they are clearly identified as such, and this copyright is included intact. Copyright (c) 2004, 2005 by atsec GmbH and IBM Corporation or its wholly
    [Show full text]
  • Fy11 Education Masterfile 10262010
    Page 1 FY10 CONTRACT #GS-35F-4984H Effective Date October 26, 2010 IBM Education Charge GSA GSA GSA DAYS PUBLIC PRIVATE ADD'L ST. STUDENTS 3A230 Exploring IBM solidDB Universal Cache - Instructor-led online 4.0 2,305 14,186 222 15 3L121 Query XML data with DB2 9 - Instructor-led online 3.0 1,729 10,640 222 15 3L131 Query and Manage XML Data with DB2 9 - Instructor-led online 5.0 2,882 17,733 222 15 3L141 Manage XML data with DB2 9 -Instructor-led online 2.0 1,153 7,093 222 15 3L282 Fast Path to DB2 9 for Experienced Relational DBAs - Instructor-led online 2.0 1,153 7,093 222 15 3L2X1 DB2 9 Administration Workshop for Linux, UNIX, and Windows Instructor Led OnLine4.0 2,305 14,186 222 15 3L2X2 DB2 9 Database Administration Workshop for Linux,UNIX and Windows - ILO 4.0 2,305 14,186 222 15 3L482 DB2 9 for Linux,UNIX and Windows Quickstart for Experienced Relational DBAs-ILO4.0 2,305 14,186 222 15 3L711 DB2 Stored Procedures Programming Workshop - Instructor-led online 2.0 1,153 7,093 222 15 3N230 Exploring IBM solidDB Universal Cache - Flex Instructor Led Online 5.0 2,305 14,186 222 15 3N312 DB2 9.7 for Linux, UNIX, and Windows New Features - Flex Instructor-led online2.0 864 5,320 222 15 3V410 DB2 9 for z/OS Data Sharing Implementation - Instructor Led Online 3.0 1,729 10,640 222 15 3V420 DB2 9 for z/OS Data Sharing Recovery and Restart - Instructor Led Online 2.0 1,153 7,093 222 15 3W700 Basic InfoSphere Streams SPADE programming Instructor-led Online 2.0 1,153 7,093 222 15 3W710 Advanced InfoSphere Streams SPADE Programming Instructor-led
    [Show full text]