15.00 - Chapter 26 Teradata Locale Definition Utility (tdlocaledef) - Teradata Database

Teradata Database Utilities

Product
Teradata Database
Release Number
15.00
Content Type
Configuration
Publication ID
B035-1102-015K
Language
English (United States)
Last Update
2018-09-25

The Teradata Locale Definition utility, tdlocaledef, is a command-line utility that allows you to define or change how Teradata Database formats numeric, date, time, and currency output.

Tdlocaledef converts a specification for data formatting (SDF) text file into a Teradata Database globally distributed object (GDO), an internal binary format file that stores configuration information. The GDO is made available simultaneously to all nodes of an MPP system. The utility can also convert the text file to a local, non-distributed, binary file, that can be converted back to text in order to ensure the formatting syntax is valid.

Note: Format changes take effect only after Teradata Database is restarted, and do not affect columns that were created prior to the restart.

Scenarios Runs From

Tdlocaledef runs from the Linux command line.

For general information on starting the utilities from different interfaces, see Appendix B: “Starting the Utilities”

Scenarios Syntax

 

Syntax element ...

Is ...

-input filename

Specifies the text file containing the SDF settings.

If filename does not include the full path to the SDF file, tdlocaledef assumes the named file is in the current directory.

If the -input option is not specified, tdlocaledef looks for a tdlocaledef.txt SDF file located in
/etc/opt/teradata/tdconfig.

By default there is no tdlocaledef.txt file in those locations. Teradata provides a sample file in
/usr/tdbms/etc.

Teradata recommends that you never modify the sample tdlocaledef.txt file directly, but instead copy the file to another location and make changes to the copy.

For more information on customizing Teradata Database output formatting settings, see “SDF File” on page 899.

-output filename

-output new

Specifies what happens to the compiled, binary version of the SDF formatting settings that is produced by tdlocaledef.

  • filename specifies that the compiled settings be stored only in a local file. This file is suitable for use with the ‑reverse option to verify that the syntax used in the SDF text file is correct. If no path is specified, the binary file is placed in the current directory.
  • new specifies that the settings become effective at the next Teradata Database restart. The settings are compiled into a GDO, and used by all nodes of the system. A copy of the SDF text file is stored on every node in
    /etc/opt/teradata/tdconfig.
  • If the -output option is not specified, tdlocaledef creates a local binary file named tdlocaledef.loc in
    /etc/opt/teradata/tdconfig.

    -reverse current

    -reverse filename

    Specifies that the compiled output format settings currently in effect or stored in a local binary file be written to a text file suitable for viewing and editing.

    This option is primarily used for creating an editable text file of the current output formatting settings that can be used to customize or change the output formatting that Teradata Database uses for dates, times, numbers, and currency.

    -reverse can also be used to verify correct syntax in an edited SDF text file.

  • current specifies that the output formatting settings currently in effect be written to a text file.
  • filename specifies that the SDF settings in a local compiled binary file be converted to a text file. Use this option to ensure that a previously compiled SDF text file uses proper syntax. If the original text file does not match the file produced using the -reverse filename option, there is a syntax error in the original SDF file.
  • -source filename

    Specifies the SDF text file tdlocaledef should create based on the specified -reverse options. If ‑source is not specified, tdlocaledef creates an SDF file named tdlocaledef.txt in /etc/opt/teradata/tdconfig.