Syntax - Advanced SQL Engine - Teradata Database

Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
ynh1604715438919.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1102
lifecycle
previous
Product Category
Teradata Vantageā„¢
tdlocaledef {
  [ -input filename ] [ -output { filename | new } ] |
  
  -reverse { current | filename } [ -source filename ]
}
-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.

-output filename and -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 and -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.