Creating data type mappings
Use the CREATE TYPE MAPPING statement to create a data type mapping. You can run the statement from the command line processor, or include it in an application program.
Before you begin
The privileges held by the authorization ID associated with the statement must have SYSADM or DBADM authority.
About this task
See the CREATE TYPE MAPPING statement for specific use information.
Restrictions
- The local_data_type value cannot be LONG VARCHAR, LONG VARGRAPHIC, or a user-defined data type.
- The data_source_data_type value cannot be a user-defined type.
- For nonrelational data sources, the degree to which you can override existing data type mappings or create mappings is limited.
Procedure
Run the CREATE TYPE MAPPING statement to create a data
type mapping.
To specify a server type in the CREATE TYPE MAPPING statement, you must use one of the following as the server-type value:
| Data source | Server type |
|---|---|
| Db2® | DB2/CS
DB2/UDB DB2/NT DB2/SUN DB2/HP DB2/HPUX DB2/AIX DB2/6000 DB2/PE DB2/PTX DB2/SCO DB2/LINUX DB2/EEE DB2/2 |
| Db2 for z/OS® | DB2/MVS
DB2/ZOS DB2/390 |
| Db2 Server for VSE and VM | DB2/VM
DB2/VSE SQL/DS |
| Db2 for IBM® i | DB2/400
DB2/ISERIES |
| Oracle | ORACLE |
| Informix® | INFORMIX |
| ODBC | ODBC |
| Microsoft SQL Server | MSSQLSERVER |
| JDBC | JDBC |
| Teradata | TERADATA |
| Sybase | SYBASE |