Enabling and Disabling UNICODE PASS THROUGH | VantageCloud Lake - Enabling and Disabling UNICODE PASS THROUGH - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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

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");