Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Revised: May 31, 2012
20751-12 Rev. 8
Note: Before using this information and the product that it supports, read the information in Notices and Trademarks on page C-1.
Copyright IBM Corporation 2011, 2012. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Table of Contents
Preface 1 Introduction
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 OLE DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
iii
ODBC Driver Managers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 ODBC Driver Manager Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Windows Driver Managers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Linux/UNIX Driver Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 unixODBC Driver Manager Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 DataDirect Driver Manager Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
iv
Appendix B: Troubleshooting
ODBC Debug Logging and Driver Manager Tracing . . . . . . . . . . . . . . . . . . . . . . . . . . B-1 ODBC Debug Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1 ODBC Driver Manager Tracing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2 JDBC Debug Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2 loglevel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 loggertype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 logdirpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 Connection String Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 OLE DB Debug Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4
Index
vi
List of Tables
Table 2-1: Table 2-2: Table 2-3: Table 2-4: Table 2-5: Table 3-1: Table 3-2: Table 4-1: Table B-1: Netezza Supported Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 OLE DB Windows Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Implementation, Netezza Driver/Provider, and Software Compatibility . 2-2 Netezza Driver Version Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Data Source Support Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Sample UNIX CD/DVD Mount Commands . . . . . . . . . . . . . . . . . . . . . 3-4 ODBC Driver Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Log Levels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
vii
viii
List of Figures
Figure 1-1: Figure 1-2: ODBC Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 JDBC Configuration.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
ix
Preface
This document describes the IBM Netezza appliance implementations of International standards for a Structured Query Language Call Level Interface (SQL CLI). This IBM Netezza ODBC, JDBC and OLE DB Installation and Configuration Guide brings together all the information you need to install and configure the ODBC drivers, JDBC drivers, OLE DB, and IBM Netezza appliance data sources.
Topic Overview
The following provides a brief overview of the contents of each chapter in this guide.
Chapter 1. Introduction. Describes the changes to this manual version, provides background on ODBC, JDBC, and OLE DB, describes the architecture of ODBC and JDBC, and lists the process steps for installing ODBC, JDBC, and OLE DB. Chapter 2. Supported Platforms and Release Compatibility. Lists the platforms that the IBM Netezza appliance supports and which software releases are compatible. Chapter 3. Installing and Uninstalling Client Tools. Details the steps and procedures for installing and uninstalling the IBM Netezza appliance client tools. Chapter 4. ODBC Drivers and Driver Managers. Discusses the functions of IBM Netezza ODBC and JDBC drivers and ODBC driver managers. Chapter 5. Installing and Configuring ODBC. Describes procedures for installing and configuring ODBC and configuring IBM Netezza appliance data sources. Chapter 6. Installing and Configuring JDBC. Describes procedures for installing and configuring JDBC and configuring IBM Netezza appliance data sources. Chapter 7. Installing and Configuring OLE DB. Describes procedures for installing and configuring OLE DB and configuring IBM Netezza appliance data sources.
xi
Appendix A. ODBC Configuration Files. Describes advanced considerations concerning the names and locations of the ODBC configuration files. Appendix B. Troubleshooting. Describes the methods for enabling debug logging and tracing, ways of tracking activity to aid in troubleshooting. Appendix C. Notices and Trademarks. Describes the legal product and trademark information.
Italics for emphasis on terms and user-defined values such as user input Upper case for SQL commands; for example INSERT, DELETE Bold for command line input; for example, nzsystem stop
The name and version of the manual that you are using Any comments that you have about the manual Your name, address, and phone number
Learning More
Find detailed specifications for the Microsoft ODBC implementation of the SQL CLI standards at the following:
http://msdn.microsoft.com/en-us/library
xii
Find more information on the Oracle Sun Developer Network JDBC implementation of the SQL CLI at the following:
http://java.sun.com/reference/api/index.html
xiii
xiv
CHAPTER 1
Introduction
Whats in this chapter
Background Architecture Process
This chapter provides general information about ODBC, JDBC, and OLE DB.
Background
The International standard for SQL defines a standard high-level language for accessing and manipulating the data stored in a relational database. The International standard for the SQL CLI defines an application programming interface (API) that programs use to issue SQL statements in a standardized manner through a series of well-defined API functions. The term Open Database Connectivity (ODBC) is a more commonly used term than SQL CLI, and in many contexts, the two terms are used synonymously. ODBC is actually a Microsoft specification for an API that constitutes an implementation of the International standards for the SQL CLI. ODBC is a superset of the SQL API, since it defines many functions that the International standards for the SQL API do not define. However, the SQL CLI and the Microsoft ODBC specification are closely aligned, and the two terms are used interchangeably especially in the C and C++ programming environments. Unless otherwise noted, the terms SQL CLI and ODBC mean the same thing in this document. Sun Microsystems developed a specification, called JDBC, that defines an API for the Java programming environment that Java programmers use to access relational databases and issue SQL statements. The JDBC specification defines many of the same types of functions for Java programmers that ODBC and the SQL CLI define for C and C++ programmers. It is possible for Java programs to directly invoke the API functions defined by ODBC and the SQL API. However, the nature of the Java programming environment makes this cumbersome. JDBC often provides a better solution than ODBC for the object-oriented Java programming environment. Like ODBC, JDBC is an implementation of the International standards for the SQL CLI. The JDBC implementation consists of a set of Java interfaces, classes, and methods that a Java programmer can use to do the same types of functions a C or C++ programmer uses when invoking ODBC function calls. Also like ODBC, JDBC constitutes a superset of the SQL CLI, since it defines many functions that the International standards for the SQL CLI do not define.
1-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
OLE DB was designed as a higher-level replacement for, and successor to, ODBC, to support a wider variety of non-relational databases that do not necessarily implement SQL (for example, object databases and spreadsheets). OLE has a client-provider model, where clients request access to data, and providers are the software component interface allowing access to the data.
Architecture
This section describes the architectural components of the various implementations.
ODBC
The ODBC implementation is a client-server architecture, with the following major components:
Application. The application is responsible for interacting with the user and for invoking ODBC API functions that submit SQL statements for processing by a file system or a database management system. Driver Manager. The Driver Manager accepts ODBC API functions from the application and passes them to an ODBC driver for processing. It also accepts results from the ODBC driver and passes them to the Application. ODBC Driver. The ODBC Driver processes the ODBC API functions it receives from the Driver Manager, interacts with the file system or database management system to access the required data, and returns results to the ODBC Driver Manager. Data Source. A Data Source contains the sets of data the ODBC Driver accesses, along with all the environments associated with the data. These environments might include file access or database access software, an operating system, and a networking platform.
To use ODBC to access a Netezza appliance, you need at least a two-tier client-server configuration, as shown in the example in Figure 1-1.
1-2
20751-12
Rev.8
Architecture
In a Netezza appliance two-tier client-server system, the data source is stored on the Netezza appliance, which handles all database access processing. The ODBC driver on the client system uses a network connection to a Postgres process running on the Netezza appliance host, which coordinates SQL statement processing functions.
JDBC
The JDBC architecture consists of four major components:
Java Application. The application, written in the Java programming language, is responsible for interacting with the user and for invoking JDBC API functions. These API functions submit SQL statements for processing by a file system or a database management system. The Java application uses interfaces, classes, and methods, defined by the Java API, to connect to and access a data source. Java Virtual Machine. When a Java application is compiled, the Java object program consists of byte codes. The Java virtual machine is responsible for converting the Java byte codes into instructions capable of being executed on the machine on which the application is running. The Java virtual machine functions as an intermediary between the Java object program and the machine on which the application is running. There is a different Java virtual machine implementation for each platform. The Java virtual machine makes it possible for the same Java program to be run, without changing or recompiling, on any machine for which a Java virtual machine has been implemented. JDBC Driver. The JDBC driver processes the JDBC API interfaces, classes, and methods in the Java application. The Java application uses the JDBC driver to interact with the file system or database management system to access the required data. It also returns results to the Java Virtual Machine, which, in turn, returns those results to the Java Application. There is a different JDBC driver for each vendors DBMS or data source type. Netezza provides a JDBC driver for Version 3.0 of the Oracle JDBC API specification. The driver is a Type 4, pure-Java driver that Netezza has tested for conformance with the Oracle JDBC specifications on Windows, Linux, and UNIX platforms. The Netezza JDBC driver supports all NZSQL data types, includes password encryption, and provides for connection options for host, port, and database. Starting with Netezza appliance Release 4.6, the JDBC driver requires Java release 1.5 and later. Data Source. A Data Source contains the sets of data the JDBC driver accesses, along with all the environments associated with the data. These environments might include file access or database access software, an operating system, and a networking platform.
To use JDBC to access a Netezza appliance, you need at least a two-tier client-server configuration, as shown in the example in Figure 1-2.
20751-12
Rev.8
1-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Figure 1-2: JDBC Configuration. In a Netezza appliance two-tier client-server system, the data source is stored on the Netezza appliance, which handles all database access processing. The JDBC driver on the client system uses a network connection to a Postgres process running on the Netezza appliance host, which coordinates SQL statement processing functions.
Process
This section describes the process steps for ODBC, JDBC, and OLE DB, and where to go for more detail.
ODBC
The process for setting up ODBC on your system is as follows. 1. Install the appropriate Netezza appliance client tools. See Chapter 3, Installing and Uninstalling Client Software. 2. (UNIX only) Download an ODBC driver manager. See Chapter 4, ODBC Drivers and Driver Managers. 3. Select the ODBC driver to install. See Chapter 4, ODBC Drivers and Driver Managers. 4. Configure the data source. See Chapter 5, Installing and Configuring ODBC. 5. Test connectivity. See Chapter 5, Installing and Configuring ODBC.
JDBC
The process for setting up JDBC on your system is as follows. 1. Install the appropriate Netezza appliance client tools. See Chapter 3, Installing and Uninstalling Client Software. 2. Install the JDBC driver. See Chapter 6, Installing and Configuring JDBC. 3. Configure the data source. See Chapter 6, Installing and Configuring JDBC.
1-4
20751-12
Rev.8
Process
OLE DB
The process for setting up OLE DB on your system is as follows. 1. Install the appropriate Netezza appliance client tools. See Chapter 3, Installing and Uninstalling Client Software. 2. Select the OLE DB provider to install. See Chapter 7, Installing and Configuring OLE DB. 3. Configure the data source. See Chapter 7, Installing and Configuring OLE DB.
20751-12
Rev.8
1-5
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
1-6
20751-12
Rev.8
CHAPTER 2
Support and Release Compatibility
Whats in this chapter
Supported Platforms Release Compatibility Matrix Driver Version Support Standards Conformance and API Versions JDBC Driver Data Source Support
Supported Platforms
Netezza supplies the following platforms for ODBC and JDBC: Table 2-1: Netezza Supported Platforms Operating System Windows Windows 2003 Windows 2008 Windows XP Windows Vista Windows 7 Linux Red Hat LAS Linux 4.0, 5.2, 5.3, 5.5, 6.1 SUSE Linux Enterprise Server 8 and 9 Intel/AMD Intel/AMD Intel/AMD Intel/AMD X X X X X X X X X X 32-bit 64-bit
2-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Table 2-1: Netezza Supported Platforms (continued) Operating System UNIX Oracle Solaris 8, 9, 10 Oracle Solaris 10 HP-UX 11i versions 1.6 and 2 (B.11.22 and B.11.23) IBM AIX 6.1 with 5.0.2.1 C++ runtime libraries SPARC x86 Itanium SPARC x86 Itanium 32-bit 64-bit
PowerPC
PowerPC
The OLE DB provider is supported on the Windows clients shown in Table 2-2: Table 2-2: OLE DB Windows Support Operating System Windows 2003 Server Windows 2008 Server Windows XP Windows Vista Business Windows 7 32-bit X X X X X 64-bit X X X X X
JDBC
2-2
20751-12
Rev.8
Table 2-3: Implementation, Netezza Driver/Provider, and Software Compatibility Implementation OLE DB Netezza Driver/ Provider 4.5.x 4.6.x 5.0.x 6.0.x Netezza Appliance Software 4.0.x, 4.0.x, 4.5.x, 4.6.x, 4.5.x, 4.5.x, 4.6.x, 5.0.x, 4.6.x, 5.0.x 4.6.x, 5.0.x, 6.0.x 5.0.x, 6.0.x 6.0.x
Note: Different driver/provider and software versions may have different available functions, so for full functionality, you may need to change your driver/provider or software version.
A distinguishing feature of the Microsoft ODBC Release 3.x specifications is that they are closely aligned with the X/Open and ANSI/ISO/IEC International standards for the SQL CLI. When you install an Netezza ODBC driver in a client computer system, you must choose one of the available drivers. You cannot install multiple Netezza ODBC drivers in the same client system.
The X/Open CAE Specification Data Management: SQL Call-Level Interface (CLI) ISO/IEC 9075-3:1995 (E) Call Level Interface (SQL CLI)
The X/Open and ISO/IEC standards for the SQL CLI are published in separate documents, but the two standards are closely aligned. For further information on JDBC conformance and API versions, see the Oracle/Sun Microsystems documentation.
20751-12
Rev.8
2-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
For further information on OLE DB conformance and API versions, see the Microsoft documentation:
http://msdn.microsoft.com/en-us/library
javax.sql.DataSource
org.netezza.datasource.NzConnection Pool
Basic DataSource implementation with connection pooling implemented inside it. Use the connections provided by this data source directly as normal connections. The Data Source internally handles the pooling. Do not use this data source if your server/ middleware vendor provides a connection pooling implementation. This data source is provided as a convenience only. Basic ConnectionPoolDataSource implementation.
javax.sql.ConnectionPoolData Source
org.netezza.jdbc2. optional.ConnectionPool
org.netezza.datasource.NzConnection PoolDatasource
2-4
20751-12
Rev.8
CHAPTER 3
Installing and Uninstalling Client Software
Whats in this chapter
Client Software Packages Windows Client Tools Software Installation UNIX Client Tools Software Installation Removing the IBM Netezza Tools Removing the CLI Clients from UNIX Systems
This chapter provides information about installing the Netezza appliance client tools software on your system. These tools help the ODBC drivers, JDBC drivers, and OLE DB Provider that Netezza supplies connect to an Netezza appliance from a client system. The first step in preparing a system for ODBC, JDBC, or OLE DB is to install the Netezza appliance client tools software on your system. If these client tools are already installed, skip this chapter. After the client tools have been installed, you can install the ODBC drivers, JDBC drivers, or OLE DB Provider. The following are the minimum disk space required to install each client:
3-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
The IBM Netezza Client Components Linux/UNIX DVD contains the interface softwaresuch as the CLI and the ODBC/JDBC drivers for Linux and UNIX clients, and the Web Admin interface. The IBM Netezza Client Components Windows DVD contains the interface softwaresuch as NzAdmin, some nz* commands, the ODBC/JDBC drivers, and the OLEDBProvider.
For supported operating systems for the CLI clients, see Support and Release Compatibility on page 2-1.
Installation Requirements
The installation package requires a computer system running a supported Windows operating system such as Windows 2003, XP (32- and 64-bit), VISTA (32-bit), 2008 (32- and 64-bit) and Windows 7 (32- and 64-bit). The client system must also have either a CD/DVD drive or a network connection. Note: If you will be using or viewing object names that use UTF-8 encoded characters, your Windows client systems require the Microsoft universal font to display the characters within the NzAdmin tool. The Arial Unicode MS font is installed by default on Windows XP systems, but you may need to run a manual installation for other Windows platforms such as 2003 or others. For more information, see the Microsoft support article at http:// office.microsoft.com/en-us/help/hp052558401033.aspx.
3-2
20751-12
Rev.8
The installation program displays a license agreement, which you must accept to install the client tools. It also allows you to specify the following information:
Destination folder You can use the default installation folder or specify an alternative location. The default folder is C:\Program Files\IBM Netezza Tools. If you choose a different folder, the installation program creates the folder if one does not exist. Setup type Select the type of installation: typical, minimal, or custom.
Typical Installs the nzadmin program, the help file, the documentation, and the console utilities, including the loader. Minimal Installs the nzadmin program and help files. Custom Displays a screen where you can select to install any combination of the administration application, console applications, or documentation.
After you complete the selections and review the installation options, the client installer creates the Netezza Tools folder, which has several subfolders. You cannot change the subfolder names or locations.
Bin Executables and support files Doc Copies of the Netezza user guides and an Acrobat Index to search the doc set Help Application help files jre Java runtime environment files for the Netezza tools sys Application string files Uninstall Netezza Tools Files to remove Netezza tools from the client system
The installation program displays a dialog when it completes, and on some systems, it could prompt you to reboot the system before you use the application. The installation program adds the Netezza commands to the Windows Start > Programs menu. The program group is IBM Netezza and it has the suboptions IBM Netezza Administrator and Documentation. The IBM Netezza Administrator command starts the NzAdmin tool. The Documentation command lists the PDFs of the installed documentation. Note: To use the commands in the bin directory, you must open a Windows command line prompt (a DOS prompt).
Environment Variables
Table 3-1 lists the operating system environment variables that the installation tool adds for the Netezza console applications. Table 3-1: Environment Variables Variable NZ_DIR PATH Operation set append Setting Installation directory (for example C:\Program Files\IBM Netezza Tools) <installation directory>\bin
20751-12
Rev.8
3-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
or
mount /media/cdrecorder
Table 2-2 describes other common mount commands for the supported UNIX clients. If you encounter any problems mounting or accessing the media drive on your client system, refer to your operating system documentation or command man pages. Table 3-2: Sample UNIX CD/DVD Mount Commands Platform Solaris HP-UX Command
mount -o ro -F hsfs /dev/dsk/c0t1d0s2 /tmp/cdrom
Export the library path, where the pathname is the location of the nz files. Note that the location of the Netezza client files is /usr/ local/nz or the location you choose to install them.
export SHLIB_PATH=/<path_to_installdir>/bin/lib
AIX
3-4
20751-12
Rev.8
4. To change to the mount point, use the cd command and specify the mount pathname that you used in step 3. This guide uses the term /mountPoint to refer to the applicable CD/DVD mount point location on your system, as used in step 3.
cd /mountPoint
5. Navigate to the directory where the unpack command resides and run the unpack command as follows:
./unpack
Note: On some UNIX systems such as Red Hat 5.3, the auto-mounter settings may notprovide execute permissions by default. If the unpack command returns a permission denied error, you can copy the installation files from the disk to a local directory and run the unpack command from that local directory. Note: For installations on Linux, be sure to use the unpack in the linux directory, not the linux64 directory (which contains only the executable for the 64-bit ODBC driver). Note: On an HP-UX 11i client, /bin/sh may not be available. You can use the command form sh ./unpack to unpack the client. 6. The unpack program checks the client system to ensure that it supports the CLI package and prompts you for an installation location. The default is /usr/local/nz for Linux, but you can install the CLI tools to any location on the client. The program prompts you to create the directory if it does not exist. Sample command output follows:
-----------------------------------------------------------------IBM Netezza -- NPS Linux Client 6.0.3 (C) Copyright IBM Corp. 2002, 2011 All Rights Reserved. -----------------------------------------------------------------Validating package checksum ... ok Where should the NPS Linux Client be unpacked? [/usr/local/nz] Directory '/usr/local/nz' does not exist; create it (y/n)? [y] Enter 0% 25% 50% 75% 100%
After the installation completes, the Netezza CLI commands will be installed to the specified destination directory.
20751-12
Rev.8
3-5
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
3-6
20751-12
Rev.8
CHAPTER 4
ODBC Drivers and Driver Managers
Whats in this chapter
ODBC Drivers ODBC Driver Managers
This chapter explains ODBC drivers and driver managers. You can have only one ODBC driver installed on your system at a time. If you need a different driver, remove the installed driver and install the different one. For more information on this procedure, see Chapter 3, Installing and Uninstalling Client Software. For driver installation and configuration detail, see Chapter 5, Installing and Configuring ODBC.
ODBC Drivers
An ODBC driver uses a layer of code that translates the ODBC standard API calls the application issues into vendor-specific functions. Netezza supplies an ODBC driver for many supported platforms (32-and 64-bit), and for many different versions of the Netezza database. ODBC drivers expose the capabilities of the underlying data source, and each ODBC driver is designed for a particular database management system. For example, an ODBC driver designed to access a different vendor database cannot be used to access an Netezza database.
Connecting to and disconnecting from data sources. Performing error checking functions. Submitting SQL statements to the database management system software for execution against a particular data source. Converting ODBC-standard SQL statements, if necessary, to DBMS-specific SQL statements. Sending data to and retrieving data from a data source. Performing data conversion functions, as specified by the application. Returning information about the success or failure of an ODBC function.
4-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Socket Buffer Size A numeric value that specifies the size of the communications buffer in bytes. The range is 1K to 32K. The default is 8192. Character Transla- The Netezza appliance uses the Latin9 character encoding for char tion Option and varchar types. The character encoding for many Windows systems is similar, but not identical. If your database includes characters that use only the basic subset of letters (a-z or A-Z), numbers (0-9), or punctuation characters, select the Optimize for ASCII character set option for the driver on Windows, which improves query performance. If your data includes special characters such as the Euro symbol or others, de-select the option so that the characters convert correctly. Unicode Translation Option For UNIX/Linux drivers, specifies the unicode encoding value. Valid values are utf8, utf16, and utf32. The default is utf8.
4-2
20751-12
Rev.8
For performance reasons, depending on the database management system software used, some API functions may bypass the driver manager and access the ODBC driver directly.
Loading into memory the ODBC driver required by the application and the data source it is accessing. Unloading from memory ODBC drivers when they are no longer needed. Passing ODBC API function calls from the application to an appropriate ODBC driver. Performing any required ODBC API function call conversions. For example, if an ODBC application issues ODBC 2.5 function calls and is using an ODBC 3.0 driver, the driver manager converts ODBC 2.5 function calls to their ODBC 3.0 equivalents when necessary. Performing error checking and validation functions on ODBC API function calls before passing them to the ODBC driver. Performing some character set conversions. For example, if the application uses an 8-bit ASCII character set, and the ODBC driver and DBMS work with character data in 16-bit Unicode format, the driver manager does the necessary character conversions.
Note: The driver manager component is used only with ODBC. There is no separate driver manager component in the JDBC architecture. With JDBC, all driver manager functions are performed in the Java application environment.
Open Source There are a number of driver managers available on the Web from open source software projects. Netezza supports the unixODBC driver manager component for Linux/UNIX platforms. You can find information about unixODBC at the following:
http://www.unixodbc.org
Commercial A number of commercial software vendors develop and market ODBC components, including driver managers. Netezza has licensed and provides support for the DataDirect driver manager from DataDirect Technologies, included with your system. It is not necessary to install the Netezza-licensed version of the DataDirect driver manager to access the Netezza ODBC drivers. Information is at the following:
http://www.datadirect.com
20751-12
Rev.8
4-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
The following procedure example is based on version 2.2.12, and assumes the name of the downloaded file is unixODBC-2.2.12.tar.gz. The file name might be different if you download a later release. Match the file and directory names in the procedure to correspond to the name of the file you download. Consult the README and INSTALL files contained in the downloaded package to determine whether the procedure needs to be modified.
4. Run the following command to extract the contents of the unixODBC-2.2.12.tar file:
tar -xvf unixODBC-2.2.12.tar
4-4
20751-12
Rev.8
5. Run the following command to change to the subdirectory created when the unixODBC-2.2.12.tar file was extracted:
cd unixODBC-2.2.12
6. Run the following command to configure the software and set the installation directory to /usr/local/unixODBC:
./configure --prefix=/usr/local/unixODBC
7. Run the following command to compile the package (note that this step may take a few minutes to complete):
make
8. Run the following command to install the programs, data files, and documentation:
make install
This step places the bin, etc, lib, and include subdirectories in the /usr/local/unixODBC directory. These subdirectories contain the programs, data files, and documentation for the unixODBC driver manager package. 9. Run the appropriate commands to add bin and lib subdirectories to the environment: For AIX:
export PATH=$PATH:/usr/local/unixodbc/bin export LIBPATH=$LIBPATH:/usr/local/unixodbc/lib
For HP-UX:
export PATH=$PATH:/usr/local/unixodbc/bin export SHLIB_PATH=$SHLIB_PATH:/usr/local/unixodbc/lib
Note: The above commands change the environment for the current session only. After you have verified that your environment modifications work correctly, edit your login script to set the environment variables when users log in. 10. If desired, delete the installation tar file from the file system:
rm unixODBC-2.2.12.tar
If preferred, you could move the installation tar file to somewhere else in the file system for safekeeping.
20751-12
Rev.8
4-5
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
4-6
20751-12
Rev.8
CHAPTER 5
Installing and Configuring ODBC
Whats in this chapter
Installing and Configuring ODBC for Windows Configuring ODBC for UNIX/Linux
This chapter describes the procedures used to install and configure ODBC drivers and data sources for Windows or UNIX/Linux systems. You can have only one ODBC driver installed on your system at any given time. If you need a different driver, you will need to remove the installed driver and install the different one. For more information on removing the driver, see Chapter 3, Installing and Uninstalling Client Software.
Note: For a silent install, run the setup with the silent option:
c:\>nzodbcsetup.exe -i silent
5-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
5-2
20751-12
Rev.8
After you click Install, the installation program does the following processing:
Installs the Netezza ODBC Driver. A 32-bit driver on a 32-bit system and a 64-bit driver on a 64-bit system are installed in the \WINDOWS\system32 folder. If installing both 32- and 64-bit drivers on a 64-bit system, the 32-bit driver is installed in the \WINDOWS\SysWOW64 folder. Places entries in the Windows registry to add your selected ODBC driver to the driver list. Places entries in the Windows registry to add the NZSQL data source to the data source list.
8. The Install Complete window is displayed. This indicates that the installation process has completed successfully. Click Done to close the program. Before trying to access an ODBC data source, you must configure it. The next section describes the configuration procedure.
A System DSN defines a data source available to all users of the client system. A User DSN defines a data source available only to the user who defined it.
Get the following configuration information from your Netezza system administrator:
The name of the system or user database on the Netezza appliance. The server host name or IP address of your Netezza appliance. A valid user ID for accessing the system or user data source. A valid password for accessing the system or user data source.
To configure an existing DSN, select the Configure button. To configure a new DSN, select the Add button.
2. Configure the DSN and Driver Options from the Driver Setup Window. 3. Test and verify the ODBC Connection. 4. Close any open configuration windows to finish the Data Source Configuration.
20751-12
Rev.8
5-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
ODBC Data Source Administrator Window The ODBC Data Source Administrator window allows you to make configuration selections. 1. Select Start > Settings > Control Panel > Administrative Tools > Data Sources (ODBC). The ODBC Data Source Administrator window is displayed. 2. Select either the System DSN tab or the User DSN tab and select either Configure or Add:
Selecting Add displays the Create New Data Source Window. Select NetezzaSQL as the driver and click Finish. The ODBC Driver Setup Window is displayed. Selecting the System DSN tab displays a list of System Data Sources. Selecting Configure displays the ODBC Driver Setup Window. The ODBC Driver Setup Window allows you to configure the
Select the DSN Options tab and enter appropriate values for the DSN Options. If your application supplies a user name and password, these can be left blank, since your applications user name and password take precedence over the ones specified here. If the application does not supply a user name and password, supply the values. For other options, you can accept the default values, or change the options as desired.
Data Source A name that identifies the database connection properties. Server The host name or IP address of the Netezza system to which the ODBC driver connects. Database The name of the database on the Netezza system. User Name The user ID of the account on the Netezza system used to access the data source. Description A description or comment about the data in the data source. Port The port number for the data source. The default is 5480. Password The assigned password for the user specified.
5-4
20751-12
Rev.8
The Advanced Options tab displays more options. You can change these or accept the default options.
Read Only A boolean value that controls whether the database allows read-only access (only SQL Select statements are allowed), or full access. The default is deselected, which allows full access. To modify data, do not select the checkbox. If you do, only SQL Select statements are allowed. Show System Tables When retrieving a list of tables, this boolean value controls whether the system tables are included in the list. The default is deselected to omit system tables. Legacy SQL Tables Behavior A boolean value that, when enabled, causes SQLTables to return a list of all the users that own a database. The default is deselected to omit the list of users. Treat Numeric as Char When selected, this boolean value causes the driver to treat SQL_C_NUMERIC buffers as SQL_C_CHAR buffers. By default, this is deselected, which means that SQL_C_NUMERIC are treated as Numeric Structures. Return SQL_BIT as 1/0 If enabled, when a return type is char or wchar, this boolean value returns the values 1 or 0 instead of t or f. The default is deselected to return t/f values. If you prefer that SQL_BIT return numeric boolean values (1/ 0), select the checkbox. Strip CR/LF If enabled, this removes the carriage return and line feed characters from the SQL statements. The default is deselected to not remove these characters. Selecting the checkbox strips control characters out of your data. Load Round Fraction If the value is true, it rounds the actual data for numeric columns whose precision exceeds the precision defined in the target table. The default is deselected, to not round. Login Timeout The number of seconds after which to terminate the login process. Valid values are 0 (no timeout) or any positive number. Query Timeout The number of seconds after which to terminate the query request. Valid values are 0 (no timeout) or any positive number. Load Max Errors Tells the system to abort after N bad input rows. Default is 1, and 0 means no limit, with a maximum of 2,147,483,647 (the largest signed 32bit integer). Date Format Specifies the desired date format as one of the following values:
Note that on Windows platforms, you specify the text value (such as YMD); on nonWindows platforms, specify the numeric value (such as 1). The SSL DSN Options tab shows Secure Socket Layer options. Select one of the following options for the Security Level, and enter a CA filename.
Only Unsecured Only connections that do not use SSL to encrypt data will be accepted. This provides increased performance but carries the risks that come with an unencrypted connection.
20751-12
Rev.8
5-5
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Preferred Unsecured Connections that do not use SSL are preferred, but a connection will not be refused solely because it uses SSL encryption. Preferred Secured (Default) Connections that use SSL are preferred, but a connection will not be refused solely because it does not use SSL encryption. Only Secured Only connections that use SSL to encrypt data will be accepted. This provides increased security but reduces performance somewhat, due to the necessity of encrypting the data stream.
CA Certificate File Enter the name of the CA (Certificate Authority) file (including the path) that will be used to authenticate connections. If a CA is being used for authentication, the name of the CA file must match the name defined by the system administrator for the database to which you are attempting to connect. Refer to the IBM Netezza Administrators Guide for information on security and authentication. Enable Debug Logging Select this box if you want the system to log information about each ODBC connection. This information may be helpful in debugging connection problems. For more information, see Appendix B, Troubleshooting. Log File Path The location of the debug log files. The default is c:\ on Windows systems. Optimize for ASCII character set The Netezza appliance uses the Latin9 character encoding for char and varchar types. The character encoding for many Windows systems is similar, but not identical. If your database includes characters that use only the basic subset of letters (a-z or A-Z), numbers (0-9), or punctuation characters, select the Optimize for ASCII character set option for the driver on Windows, which will improve query performance. If your data includes special characters such as the Euro symbol or others, de-select the option to ensure that the characters convert correctly. Prefetch Count A numeric value that sets the number of rows the driver will fetch at a time from an Netezza database. The default is 256 rows. To tune your application, set a value that optimizes network use versus memory use. Realize that the higher this value, the more memory will be required to hold these rows. Socket Buffer Size A numeric value that specifies the size of the communications buffer in bytes. The range is 1K to 32K. The default is 8192.
The Driver Options tab allows you to configure global driver options.
Test the Connection When finished selecting DSN and Driver options, select the DSN Options tab and and click the Test Connection button to establish a connection to this data source on your Netezza appliance server. A message box displays, indicating that the connection attempt was either successful or failed. If the connection attempt fails, check for erroneous configuration information, correct it, and test the connection again. If you cannot establish a connection after checking for errors, contact your Netezza system administrator. Finish the Configuration A successful connection message indicates that you have successfully configured an entry for the system data source. To end the configuration process, close all the open dialog boxes.
5-6
20751-12
Rev.8
= = = = = =
DebugLogging = false LogPath = /tmp UnicodeTranslationOption = utf8 CharacterTranslationOption = all PreFetch = 256 Socket = 8192
[ODBC] Trace TraceAutoStop TraceFile
= 0 = 0 = /tmp/sql.log
20751-12
Rev.8
5-7
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Note: The Netezza ODBC driver properties are explained in Table 4-1 on page 4-2. Use this table to select appropriate values for the configuration entries in your .odbcinst.ini file. The CharacterTranslationOption can be set to all or latin9.
For HP-UX:
export PATH=$PATH:/usr/local/nz/bin export SHLIB_PATH=$SHLIB_PATH:/opt/datanz/nz/bin
Note: The above commands change the environment for the current session only. After you have verified that your environment modifications work correctly, edit your login script to set the environment variables when users log in. 3. Configure Netezza ODBC drivers by using a text editor to modify the contents of the .odbcinst.ini configuration file. You normally place the .odbcinst.ini file in your home directory while logged in as an ordinary user. You may want to place the .odbcinst.ini file in a different location, and you may want to do the configuration as the superuser, rather than as an ordinary user. These issues are discussed in Appendix A, ODBC Configuration Files.
5-8
20751-12
Rev.8
This step assumes you are logged in as an ordinary user and are placing the .odbcinst.ini file in your home directory. What you do in this step depends on whether or not the .odbcinst.ini file already exists in your home directory.
The Configuration File Exists. Use a text editor, such as vi, to examine the .odbcinst.ini configuration file if it already exists in your home directory, which may occur for different reasons, including the following:
Your client system was previously configured for one or more ODBC drivers other than the Netezza ODBC driver. If you still want to use those ODBC drivers, do not modify existing entries in the .odbcinst.ini file. In this case, add the entry in the odbcinst.ini.sample file to the end of the existing contents of the .odbcinst.ini file. The Netezza client software and an Netezza ODBC driver were previously installed on your client system, and the Netezza ODBC driver has already been configured. If this is so, you may not have to add any entries to the .odbcinst.ini file. If your .odbcinst.ini file already contains an entry similar to that found in the odbcinst.ini.sample file, do nothing. If it does not, then add the entry in the odbcinst.ini.sample file to the end of the existing contents of the .odbcinst.ini file.
The Configuration File Does Not Exist. If the .odbinst.ini configuration file does not yet exist in your home directory, copy the entire odbcinst.ini.sample file into your home directory and rename it .odbcinst.ini.
4. The entry from the odbcinst.ini.sample file can usually be used without modification in your .odbcinst.ini file. Consult your Netezza system administrator to see if any configuration entries need to be changed for your installation.
Database The name of the system database on the Netezza appliance. Username A valid user ID for accessing the system data source. Servername The server host name or IP address of your Netezza appliance. Password A valid password for accessing the system data source.
20751-12
Rev.8
5-9
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
The following shows the contents of a file named odbc.ini.sample, which is in the nz/ lib directory after you have installed your ODBC drivers. The sample file describes a system data source found on every Netezza appliance, and includes comments explaining each parameter. Use the contents of this sample file, along with the administrator information you substituted, to configure your own .odbc.ini file. Note: Because there may be differences between some source and target datatypes, add the following to your .odbc.ini file to prevent issues:
UnicodeTranslationOption=utf8
;A decription used to identify the database connection properties. Description = NetezzaSQL ODBC
;The name of a machine or IP address where the database is located. Servername = 127.0.0.1
;Only Select SQL statements will be allowed if this field is checked. ReadOnly = false
;When set to true, system tables will be included in the available table list.
5-10
20751-12
Rev.8
ShowSystemTables
= false
;When set to true, use old (2.5) functionality for returning schemas in SQLTables. LegacySQLTables = false
;When selected, driver treats SQL_C_NUMERIC buffers as SQL_C_CHAR buffers. NumericAsChar = false
;When enabled, replaces all occurences of CRLF, CR and LF with a single space. StripCRLF = false
;Specifies maximum errors allowed. 0 value means no limit on loadMaxErrors value. ;loadMaxErrors = 1
;If value is true, it rounds the data of numeric columns whose precision exceeds the precision defined. ;loadRoundFraction = 0
20751-12
Rev.8
5-11
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Note: The data source properties are explained starting on page 5-4. Use this information to select appropriate values for the entries in your .odbc.ini file.
The Configuration File Exists. If the .odbc.ini configuration file already exists in your home directory, use a text editor to examine the contents of the .odbc.ini file to see if it already contains entries for the Netezza appliance data sources to access. If it does not, copy the contents of the odbc.ini.sample file to the end of your existing .odbc.ini file. Do not modify any existing entries in the file. The Configuration File Does Not Exist. If the .odbc.ini configuration file does not yet exist in your home directory, copy the entire odbc.ini.sample file into your home directory and rename it .odbc.ini.
2. Once you have initially set up the .odbc.ini configuration file, use a text editor to modify entries in the file to describe the Netezza appliance data sources to access, as described in the section Data Source Configuration File on page 5-9. To access additional Netezza appliance data sources, supply a set of configuration entries, similar to that found in the odbc.ini.sample file, for each data source to access.
5-12
20751-12
Rev.8
Once connected, you can run the same queries as used in the following examples. The system should return the same results.
2. Start the isql interactive SQL application, and connect to the NZSQL system data source by entering the following command:
20751-12
Rev.8
5-13
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
isql -v NZSQL
If your connection is successful, you will see a response similar to the following:
+---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | +---------------------------------------+
3. The system database in the NZSQL data source contains a table named _t_dslice. Enter the following command to query the _t_dslice table:
select * from _t_dslice
4. If your ODBC driver is correctly installed, and your system data source is correctly configured, the isql program displays the contents of the _t_dslice table from the system database in the NZSQL data source. You will see a response similar to the following:
+------------+------------+------------+------------+ | ds_id | ds_pridskid| ds_priptid | ds_mirdskid| +------------+------------+------------+------------+ | 1 | 1002 | 0 | | +------------+------------+------------+------------+
5. Enter the quit command to end the connection to the NZSQL system data source and exit the isql program. Then restart isql and connect to the Test_User user data source by entering the following command:
isql -v Test_User
If your connection is successful, you will again see a response similar to the following:
+---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | +---------------------------------------+
6. The example assumes the system database in the Test_User data source contains a table named a_inventory. Enter the following command to query the a_ inventory table:
select * from a_inventory
7. If the ODBC driver is correctly installed, and the user data source is correctly configured, the isql program displays the contents of the a_inventory table from the system database in the Test_User data source:
+------------+----------+------------+ | part_no | part_name| on_hand | +------------+----------+------------+ | 181 | Wheel | 449 | | 124 | Bolt | 900 | | 105 | Gear | 0 | | 134 | Nut | 743 | +------------+----------+------------+
5-14
20751-12
Rev.8
CHAPTER 6
Installing and Configuring JDBC
Whats in this chapter
Installing JDBC for Windows Installing JDBC for UNIX/Linux Configuring JDBC for Windows Configuring JDBC for UNIX/Linux
This chapter describes the procedures to install and configure JDBC. You can have only one JDBC driver installed on your system at any given time. If you need a different driver, you will need to remove the installed driver and install the different one. For more information on removing the driver, see Chapter 3, Installing and Uninstalling Client Software. Note: After installation, when you run an application trying to use JDBC, you are prompted for a value called Class Name. For the Netezza Driver, enter the following:
org.netezza.Driver
6-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Note: Before you use JDBC, verify that your system has Java installed (JDK Release 1.5 or later). For more information, go to http://www.java.com where you can test your system for Java software support and download the latest version for your system. Run the following command to modify your CLASSPATH environment variable to include the location of the Netezza JDBC Version 3.0 driver:
export CLASSPATH=.:/usr/local/nz/lib/nzjdbc3.jar
Note: The above export commands change the environment for the current session only. Once you have verified that your environment modification works correctly, you can edit your login script to set the environment variable when users log in.
6-2
20751-12
Rev.8
2. Use the rcp or ftp command (using binary transfer mode) to copy the JDBC driver to your client machine. The following is a command example:
rcp nzjdbc3.jar <client machine>
3. Modify the CLASSPATH environment variable on the client machine to include the path of the directory in which you placed the JDBC driver.
20751-12
Rev.8
6-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
2. The list of data sources screen is displayed. Select Add to add a new data source. 3. The Datasource Configuration screen is displayed. Select the Connection Options tab and enter the information in the appropriate fields:
Data Source Name of the data source (Mandatory). Host Name of the host to connect to (Mandatory). Port Port number (Mandatory). Database Database (Catalog) name (Mandatory). Description Description for the data source. User Username to connect to the database. Password Password for authentication. Test Connection Tests the connection with the given parameters.
4. Select the Advanced Options tab and enter the information in the appropriate fields:
Batch Size Number of rows to be fetched in a cycle. Default - 256. Login Timeout Maximum wait time to make a connection. Default - infinite. Read Only Read Only property for the connection. Default - false. Auto Commit Auto Commit property for the connection. Default - true. Log Level Log Level for the connection. Default - OFF. Logger Type The type to be used for logging. Default - TEXT. Logger Directory Log directory where the log files will be dumped. Database Metadata When selected, you can get metadata information that is not restricted to the current catalog/schema. Not selecting this means your information will be restricted to the current catalog/schema. Default - not selected. Defaults Selects the defaults for these options.
5. Select the SSL Options tab and enter the security level information as appropriate:
Preferred Unsecured Connections that do not use SSL are preferred, but a connection will not be refused solely because it uses SSL encryption. Only Unsecured Only connections that do not use SSL to encrypt data will be accepted. This provides increased performance but carries the risks that come with an unencrypted connection. Preferred Secured Connections that use SSL are preferred, but a connection will not be refused solely because it does not use SSL encryption. Only Secured Only connections that use SSL to encrypt data will be accepted. This provides increased security but reduces performance somewhat, due to the necessity of encrypting the data stream.
6-4
20751-12
Rev.8
CA Certificate File Enter the name of the CA (Certificate Authority) file used to authenticate connections. If a CA is being used for authentication, the name of the CA file must match the name defined by the system administrator for the database to which you are attempting to connect. Refer to the IBM Netezza Administrators Guide for information on security and authentication. 6. When finished entering Datasource Configuration options, test the connection by selecting the Test Connection button on the Connection Options tab. When the connection is established, a confirmation screen displays. Select OK. 7. When all your options have been entered and your connection has ben tested, select Ok on the Datasource Configuration screen. The Data Source and description appears in the List of Data Sources screen. 8. Select Exit when finished.
2. The options screen is displayed. Enter data source information and parameter values for configuration, as detailed on page 6-4. Note: Alternatively, you can use the console option -c to be prompted for each parameter. 3. After all parameters are entered and saved, the nzjdbc.ini file is created. Make sure this file is in the CLASSPATH. Note: For a test application, you can use the DSN defined in the INI file. 4. To test the connection, run the following jar file with the -t option. This is tested without WebSphere.
java -jar nzjdbc3.jar -t
You can enter additional values in the test, such as the following:
java -jar nzjdbc3.jar -t -host <yourhostname> -u <username> -pw <password> -db <database>
20751-12
Rev.8
6-5
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
6-6
20751-12
Rev.8
CHAPTER 7
Installing and Configuring OLE DB
Whats in this chapter
Installing OLE DB Provider Configuring an OLE DB Data Source
This chapter describes the procedure for installing the Netezza OLE DB provider on a Windows client system, configuring the provider and data sources, and testing for connectivity to Netezza appliance data sources.
c:\>nzoledbsetup.exe (full GUI install) c:\>nzoledbsetup.exe -i silent (silent install, VS2010 Libraries not installed) c:\>nzoledbsetup.exe -i silent -DVC8_LIB_INSTALL=1 (silent install, VS2010 Libraries installed)
c:\>nzoledbsetup64.exe (full GUI install) c:\>nzoledbsetup64.exe -i silent (silent install, VS2010 Libraries not installed) c:\>nzoledbsetup64.exe -i silent -DVC8_LIBS_INSTALL=1 (silent install, VS2010 Libraries installed)
7-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
4. Install the Visual Studio 2010 libraries. 5. Review the installation options. 6. Finish the installation.
Installs the Netezza OLE DB provider. A 32-bit provider on a 32-bit system and a 64-bit provider on a 64-bit system are installed in the \WINDOWS\system32 folder. On a 64-bit system, both providers are installed, and the 32-bit provider is installed in the \WINDOWS\SysWOW64 folder. Places entries in the Windows registry to add the Netezza OLE DB Provider to the provider list.
6. The Install Complete window is displayed, which indicates that the installation process has completed successfully. Click Done to close the installation program. Before trying to access an OLE DB data source, you must configure it. The next section describes the configuration procedure.
7-2
20751-12
Rev.8
4. Specify the Netezza system. 5. Enter User ID and Password. 6. Select a database catalog to connect to. 7. Test the database connection. 8. Verify the connection. 9. In case of an unsuccessful connection, review parameters. The following sections describe each of the steps in the above procedure to validate OLE DB connectivity to the system data source.
20751-12
Rev.8
7-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
7-4
20751-12
Rev.8
APPENDIX
ODBC Configuration Files
Whats in this appendix
Netezza ODBC Driver unixODBC Driver Manager DataDirect Driver Manager
This appendix introduces advanced considerations for configuring ODBC drivers and data sources on Linux/UNIX client systems, with respect to locating the .odbcinst.ini and .odbc.ini configuration files.
Hidden Files. When you place the two ODBC configuration files in the users home directory, the Netezza ODBC driver expects the files to have the hidden file names .odbcinst.ini and .odbc.ini. Non-Hidden Files. When you place the two ODBC configuration files in a directory other than the users home directory, the Netezza ODBC driver expects the files to have the non-hidden file names odbcinst.ini and odbc.ini.
A-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
3. If the driver does not find hidden configuration files in the current users home directory, it next looks in the /usr/local/etc directory for the two non-hidden files odbcinst.ini and odbc.ini. If the two configuration files exist as hidden files in the /usr/local/etc directory, the driver ignores them.
Compatibility
The methods the Netezza ODBC driver and the unixODBC driver manager use to locate the configuration files are compatible. It is relatively easy to ensure that the Netezza ODBC Driver and the unixODBC driver manager find the two ODBC configuration files in the same place. Their uses of hidden and non-hidden files are also compatible.
A-2
20751-12
Rev.8
Place hidden configuration files in each users home directory if each user needs to access different Netezza appliance data sources. Place non-hidden configuration files in the /usr/local/etc directory if all users will access the same Netezza appliance data sources. With the unixODBC driver manager, you do not need to use the NZ_ODBC_INI_PATH environment variable.
Incompatibilities
The following are incompatibilities between the Netezza ODBC drivers and the DataDirect driver manager: 1. The DataDirect driver manager looks first in the current users home directory for nonhidden configuration files instead of hidden ones. 2. The DataDirect driver manager looks next in the /etc directory instead of in the /usr/local/etc directory. 3. The DataDirect driver manager also looks at the value of the environment variable ODBCINI to determine the location of the odbc.ini file to use. To work around the DataDirect driver managers ODBC configuration file search incompatibilities, do one of the following: 1. Separate Configuration Files in Each Home Directory. Use this method if you would like each user of the Linux/UNIX client system to use a separate set of ODBC configuration files. Netezza ODBC drivers look for hidden configuration files, and the DataDirect driver manager looks for non-hidden files. To overcome this incompatibility, create two soft links in each users home directory so the DataDirect driver manager finds non-hidden files in the home directory and the Netezza ODBC driver finds hidden files:
A soft link so odbcinst.ini points to .odbcinst.ini A soft link so odbc.ini points to .odbc.ini
20751-12
Rev.8
A-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
2. Shared Configuration Files. Use this method if you would like all users of the Linux/ UNIX client system to use the same set of ODBC configuration files. Configure the NZ_ODBC_INI_PATH environment variable so it specifies the /etc directory, and place the two non-hidden configuration files odbcinst.ini and odbc.ini in the /etc directory. The DataDirect driver manager and the Netezza ODBC driver then both find the configuration files in the /etc directory. 3. Two environment variables. Use this method if you would like both the Netezza ODBC driver and DataDirect driver manager to find the configuration files no matter where they are on the filesystem. Use both NZ_ODBC_INI_PATH and ODBCINI together to point to the odbc.ini and odbcinst.ini files anywhere on the filesystem.
The information displayed by the above command tells you if there are any entries in the environment that contain the characters ODBC. You might see a result like the following:
ODBC_HOME=/opt/odbc
or
ODBCINI=/opt/odbc/odbc.ini
Results such as the above give you clues as to how the client system is presently configured. You can than look in the referenced directories for ODBC configuration files, and then configure the Netezza ODBC driver to look in those same directories for the ODBC configuration files.
A-4
20751-12
Rev.8
APPENDIX
Troubleshooting
Whats in this appendix
ODBC Debug Logging and Driver Manager Tracing JDBC Debug Logging OLE DB Debug Logging
This appendix introduces methods for tracking system activity, which can help in detecting problems and troubleshooting issues. A debug log provides you with a record of system activity, so you can take steps to correct problems.
B-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
B-2
20751-12
Rev.8
loglevel
You can set the following case-insensitive log levels: Table B-1: Log Levels Level off debug info entry_exit fatal Number 0 2 3 4 5 Result No messages will be logged (default). Logging is done at debug level. Every message will be logged. Only information messages, entry exit statements, and fatal messages will be logged. Only entry exit statements and fatal messages will be logged. Only fatal messages will be logged.
Enter the log level either by type or by number, as in the following examples: loglevel=entry_exit loglevel=4
loggertype
You can set the following case-insensitive log format types:
logdirpath
You can set the directory path for the log files, as in the following: logdirpath=<path on the local file system> The default values for logdirpath are as follows:
Windows:
C:\
UNIX/Linux: /tmp/
nzjdbc_<Time_stamp>.<LOGEXTENSION>
Note: The log file name for JDBC is: Where Time_stamp is in the format YYYY-MM-DD_HH-MI-SS, and the logextension is either log or html, depending on whether the loggertype is text or html.
UNIX logdirpath:
jdbc:netezza://tom/will;user=admin;password=password;loglevel=2; logdirpath=/jdbc_log_file
20751-12
Rev.8
B-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
Windows logdirpath:
jdbc:netezza://tom/will;user=admin;password=password;loglevel=2; logdirpath=C:\
Provider Enter NZOLEDB User ID Enter your user ID Password Enter your password Data Source Enter the Netezza appliance hostname Initial Catalog Enter the database name Port Enter the port number (default is 5480) Logging Level Enter 1 to enable logging or 0 for no logging Log Path Enter the path for the log file (for example, c:\logs)
B-4
20751-12
Rev.8
APPENDIX
Notices and Trademarks
Whats in this appendix
Notices Trademarks Electronic Emission Notices Regulatory and Compliance
This section describes some important notices, trademarks, and compliance information.
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to: This information was developed for products and services offered in the U.S.A. IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to: IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106-0032, Japan The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
C-1
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact: IBM Corporation Software Interoperability Coordinator, Department 49XA 3605 Highway 52 N Rochester, MN 55901 U.S.A. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us. Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only. All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without notice. Dealer prices may vary. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.
C-2
20751-12
Rev.8
Trademarks
COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. Each copy or any portion of these sample programs or any derivative work, must include a copyright notice as follows: your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs. Copyright IBM Corp. _enter the year or years_. If you are viewing this information softcopy, the photographs and color illustrations may not appear.
Trademarks
IBM, the IBM logo, ibm.com and Netezza are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or ), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at Copyright and trademark information at ibm.com/legal/copytrade.shtml. Adobe is a registered trademark of Adobe Systems Incorporated in the United States, and/ or other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. NEC is a registered trademark of NEC Corporation. UNIX is a registered trademark of The Open Group in the United States and other countries. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Red Hat is a trademark or registered trademark of Red Hat, Inc. in the United States and/or other countries. D-CC, D-C++, Diab+, FastJ, pSOS+, SingleStep, Tornado, VxWorks, Wind River, and the Wind River logo are trademarks, registered trademarks, or service marks of Wind River Systems, Inc. Tornado patent pending. APC and the APC logo are trademarks or registered trademarks of American Power Conversion Corporation. Other company, product or service names may be trademarks or service marks of others.
20751-12
Rev.8
C-3
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
C-4
20751-12
Rev.8
European Community contact: IBM Technical Regulations, Department M456 IBM-Allee 1, 71137 Ehningen, Germany Telephone: +49 7032 15-2937 Email: tjahn@de.ibm.com Germany Class A Statement Deutschsprachiger EU Hinweis: Hinweis fr Gerte der Klasse A EU-Richtlinie zur Elektromagnetischen Vertrglichkeit Dieses Produkt entspricht den Schutzanforderungen der EU-Richtlinie 2004/108/EG zur Angleichung der Rechtsvorschriften ber die elektromagnetische Vertrglichkeit in den EUMitgliedsstaaten und hlt die Grenzwerte der EN 55022 Klasse A ein. Um dieses sicherzustellen, sind die Gerte wie in den Handbchern beschrieben zu installieren und zu betreiben. Des Weiteren drfen auch nur von der IBM empfohlene Kabel angeschlossen werden. IBM bernimmt keine Verantwortung fr die Einhaltung der Schutzanforderungen, wenn das Produkt ohne Zustimmung der IBM verndert bzw. wenn Erweiterungskomponenten von Fremdherstellern ohne Empfehlung der IBM gesteckt/eingebaut werden. EN 55022 Klasse A Gerte mssen mit folgendem Warnhinweis versehen werden: Warnung: Dieses ist eine Einrichtung der Klasse A. Diese Einrichtung kann im Wohnbereich Funk-Strungen verursachen; in diesem Fall kann vom Betreiber verlangt werden, angemessene Manahmen zu ergreifen und dafr aufzukommen. Deutschland: Einhaltung des Gesetzes ber die elektromagnetische Vertrglichkeit von Gerten Dieses Produkt entspricht dem Gesetz ber die elektromagnetische Vertrglichkeit von Gerten (EMVG). Dies ist die Umsetzung der EU-Richtlinie 2004/108/EG in der Bundesrepublik Deutschland. Zulassungsbescheinigung laut dem Deutschen Gesetz ber die elektromagnetische Vertrglichkeit von Gerten (EMVG) (bzw. der EMC EG Richtlinie 2004/108/EG) fr Gerte der Klasse A Dieses Gert ist berechtigt, in bereinstimmung mit dem Deutschen EMVG das EG-Konformittszeichen - CE - zu fhren. Verantwortlich fr die Einhaltung der EMV Vorschriften ist der Hersteller: International Business Machines Corp. New Orchard Road Armonk, New York 10504 914-499-1900 Der verantwortliche Ansprechpartner des Herstellers in der EU ist: IBM Deutschland Technical Regulations, Department M456 IBM-Allee 1, 71137 Ehningen, Germany Telephone: +49 7032 15-2937 Email: tjahn@de.ibm.com Generelle Informationen: Das Gert erfllt die Schutzanforderungen nach EN 55024 und EN 55022 Klasse A.
20751-12
Rev.8
C-5
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
This is a Class A product based on the standard of the Voluntary Control Council for Interference (VCCI). If this equipment is used in a domestic environment, radio interference may occur, in which case the user may be required to take corrective actions. Japan Electronics and Information Technology Industries Association (JEITA) Statement
Japan Electronics and Information Technology Industries Association (JEITA) Confirmed Harmonics Guidelines (products less than or equal to 20 A per phase) Japan Electronics and Information Technology Industries Association (JEITA) Statement
Japan Electronics and Information Technology Industries Association (JEITA) Confirmed Harmonics Guidelines (products greater than 20 A per phase) Korea Communications Commission (KCC) Statement
This is electromagnetic wave compatibility equipment for business (Type A). Sellers and users need to pay attention to it. This is for any areas other than home. Russia Electromagnetic Interference (EMI) Class A Statement
C-6
20751-12
Rev.8
20751-12
Rev.8
C-7
IBM Netezza ODBC, JDBC, and OLE DB Installation and Configuration Guide
C-8
20751-12
Rev.8
Index
Index
A
architecture 1-2 URL -xiii
M
MDAC 4-3 Microsoft Data Access Component (MDAC) 4-3
C
Character Translation Option window 5-2 configuration files. See ODBC driver or data source configuration files. configuration. See ODBC or JDBC driver or data source configuration.
O
ODBC data source configuration Linux 5-9 Windows 5-3 data source configuration file, Linux 5-9 data source configuration procedure Linux 5-12 Windows 5-4 data source configuration steps Linux 5-12 debug logging B-1 driver configuration Linux 5-7 driver configuration file, Linux 5-7 driver configuration procedure, Linux 5-8 driver configuration steps, Linux 5-8 driver functions 4-1 driver installation procedure for Windows 5-2 Windows 5-1, 5-7 driver manager tracing B-2 driver manager. See driver manager driver properties 4-2 IBM Netezza driver version support 2-3 IBM Netezza-supported platforms 2-1 installation Windows 5-1, 5-7 online documentation Microsoft URL -xii, -xiii validating connectivity Linux 5-13 validating connectivity procedure Linux 5-13 validating connectivity steps Linux 5-13 ODBC configuration files A-1 OLE DB debug logging B-4 provider installation steps for Windows 7-1 provider installation for Windows 7-2 validating connectivity 7-2, 7-3 Optimize for ASCII character set option 5-2
D
data source configuration. See ODBC or JDBC data source configuration. data sources. See ODBC or JDBC data sources. DataDirect driver manager A-3 driver configuration. See ODBC or JDBC driver configuration. driver installation. See ODBC or JDBC driver installation. driver manager absence in JDBC architecture 4-3 DataDirect configuration file search behavior A-3 IBM Netezza ODBC driver incompatibilities A-3 functions 4-2 in Linux/UNIX systems 4-3 in Windows systems 4-3 introduction 4-2 Recommendation for Linux/UNIX systems 4-3 unixODBC compatibility with IBM Netezza ODBC drivers A-2 configuration file search behavior A-2 installation procedure 4-4 installation steps 4-4
I
installation. See client tools, ODBC or JDBC installation.
J
JDBC configuration Linux 6-2 Windows 6-5 data source configuration Windows 6-5 debug logging B-2 driver configuration, Windows 6-5 driver data source 2-4 installation Linux 6-2 unsupported platforms 6-3 Windows 6-1 online documentation Oracle Sun Developer Network
R
release compatibility 2-2
Index-1
Index
S
supported platforms 2-1
U
unixODBC driver manager A-2 installation procedure 4-4 installation steps 4-4
V
Visual Studio 8 (VC8) Libraries 5-2
Index-2