Unicode Pass Through is enabled or disabled at the session level and is valid only for Unicode sessions.
For sessions using the UTF8 or UTF16 client character sets, you can use the SET SESSION CHARACTER SET UNICODE PASS THROUGH [ON|OFF] statement to enable or disable UPT.
For example, SET SESSION CHARACTER SET UNICODE PASS THROUGH ON establishes a Pass Through Session (PTS).
The SET SESSION statement can also be added to the startup string as follows:
CREATE USER Unicode_upt_user AS PERM = 1e6, PASSWORD = emoji, STARTUP = ’SET SESSION CHARACTER SET UNICODE PASS THROUGH ON;’;
By default, Unicode Pass Through is not enabled.
Example: Enabling UPT Using BTEQ
You can enable UPT using the SET SESSION SQL statement.
.SESSIONS 5 .LOGON mysystem/uptuser,emoji .REPEAT 5 SET SESSION CHARACTER SET UNICODE PASS THROUGH ON;
Example: Enabling UPT in Teradata Parallel Transporter (TPT)
Use the following TPT syntax to enable UPT:
VARCHAR UnicodePassThrough = ‘ON’,
This syntax only applies to the following TPT operators:
- Load operator
- Update operator
- Export operator
- Stream operator
- DDL operator
- SQL Inserter operator
- SQL Selector operator
Note that the default value is OFF.
Example: Enabling UPT Using JDBC
You can enable UPT using a user startup string:
create user uptuser as password = emoji, startup = ’set session character set unicode pass through on’; Connection con = DriverManager.getConnection("jdbc:teradata://dbs/RUNSTARTUP=ON", "uptuser", "emoji");
You can enable UPT using the SET SESSION SQL statement:
stmt.executeUpdate("set session character set unicode pass through on");