SQL Reference

CREATE WRAPPER

The CREATE WRAPPER statement registers a wrapper--a mechanism by which a federated server can interact with a certain category of data sources--to a federated database.

Invocation

This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (SQLSTATE 42509).

Authorization

The authorization ID of the statement must have SYSADM or DBADM authority.

Syntax

>>-CREATE WRAPPER----wrapper-name------------------------------->
 
>-----+--------------------------+-----------------------------><
      '-LIBRARY--'library-name'--'
 

Description

wrapper-name
Names the wrapper. It can be:

LIBRARY 'library-name'
Names the file that contains the wrapper module. The LIBRARY option is only necessary when a user-supplied wrapper-name is used. This option should not be used when a predefined wrapper-name is given. The default file names for the predefined wrapper-names are:

Table 26. Default file names for LIBRARY option
Platform DRDA SQLNET NET8 OLEDB
AIX libdrda.a libsqlnet.a libnet8.a -
HP-UX libdrda.sl libsqlnet.sl libnet8.sl -
SOLARIS libdrda.so libsqlnet.so libnet8.so -
UNIX libdrda.a libsqlnet.a libnet8.a -
WINNT drda.dll sqlnet.dll net8.dll db2oledb.dll

Notes

Refer to Installation and Configuration Supplement for more information on how to select and define wrappers.

Examples

Example 1: Register a wrapper that the federated server can use to interact with an Oracle data source that is supported by Oracle's SQL*Net client software. Use the predefined name.

   CREATE WRAPPER SQLNET      

Example 2: Register a wrapper that the federated server on an AIX system can use to interact with DB2 for VM and VSE data sources. Specify a name to indicate that these data sources are used for testing.

   CREATE WRAPPER TEST 
      LIBRARY 'libsqlds.a'      
The extension in the library name (a) indicates that wrapper TEST is for data sources that reside in an AIX system.


[ Top of Page | Previous Page | Next Page ]