DATABASE(dbname) -db dbname Syntax |Preprocessor2 for Embedded SQL (PP2) - DATABASE(dbname)
-db dbname - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Preprocessor2
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
nyr1691484085721.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
xfi1470440464166
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.