DATABASE(dbname)
-db dbname - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide

Product
Teradata Preprocessor2
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-19
dita:mapPath
whb1544831946911.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Specifies a default database for use during preprocessing.

Usage Notes

Unqualified table, view, or macro references are qualified by this database name. In the absence of this option, references are qualified by the default database for the userid that is specified by the USERID option.

The DATABASE option does not affect the qualification of such unqualified references at application execution time. These are determined by one of the following:

  • SQL DATABASE statements (if any)
  • The default database for the userid specified by a SQL LOGON or CONNECT statement
  • Userid under which the program implicitly connected to the server

If the DATABASE option value contains any Kanji or other multibyte character set characters, specify the CHARSET option before the DATABASE option.

Use the DATABASE PP2 option in a consistent manner. The option does not have to name the same database that will be used at application execution time. However, all unqualified object references in the application program must, at application execution time, resolve to objects that are compatible with the ones to which they resolve at preprocess time.