Language Definition Files - SQL Assistant

Teradata SQL Assistant for Microsoft Windows User Guide

SQL Assistant
Release Number
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

Language Definition Files

Syntax highlighting is based on language definition files (*.lng). These files are automatically installed when you install or upgrade Teradata SQL Assistant and are located in:
c:\Program Files\Teradata\Client\15.10\bin

There is a corresponding language file for each database type. The file name is the SQLType attribute defined in theVendors.config file for that database vendor, with ‘.lng’ appended. (For ‘unknown’ database types it uses the SQL Type reported by ODBC.) The appropriate language file is loaded when you connect to a database. If you are not connected to a database, Teradata SQL Assistant loads the previously used language file.

Note: The first time Teradata SQL Assistant is started, it uses the Teradata language file.

The BASE language file contains the most commonly used definitions found in most SQL languages. This file is the default that is used if you connect to a database type that Teradata SQL Assistant does not recognize. If you plan to work with an unknown database frequently, you can make a copy of the BASE file and save it with an appropriate name to match this unknown database. You can then modify it to match the syntax and keywords used by that language.

In addition to the vendor specific files, there are ANSI language files that defines the ANSI 2008 SQL language. Select View > ANSI SQL if you want to switch the syntax highlighting to ANSI mode. If you are connected to Teradata this will use the ANSI language file which supports ANSI compatible Teradata syntax. Otherwise it will use the ANSI2008 file which is a full implementation of the ANSI 2008 specification without regard to whether the vendor supports those statements or keywords.

The language files generally define the complete language. A DBA can, however, modify the files to suit the site requirements.

The most useful changes to language files would be:

  • Adding a keyword that is not defined in the file
  • Matching an optional database setting. (For example, some databases have a switch to define the use of double quotes. If the language file says that these double quotes define “Quoted Names”, but you have the option set to allow them to act as string delimeters, you could modify the file accordingly.)
  • Preventing users from submitting certain types of statements. Teradata SQL Assistant declares a statement invalid if the primary keyword (generally the first keyword in the statement) is not found in the “MainKeywords”, “BeginTrans” or “EndTrans” lists. (For example, you can prevent users from executing a DROP statement by moving the DROP keyword from the “MainKeywords” list to the “NewLineKeywords” list.)
  • Note: Any user with administrative rights can however reverse the changes made to these files, so this can not be used as a security feature.