List of Attributes - OLE DB Provider for Teradata

OLE DB Provider for Teradata User Guide

Product
OLE DB Provider for Teradata
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2498
Product Category
Teradata Tools and Utilities

List of Attributes

A consumer can specify several custom Teradata Database attributes in the DBPROP_INIT_PROVIDERSTRING. The following table shows attributes supported by OLE DB Provider for Teradata, and the valid and default values for the attributes.

 

Table 8: Provider String Attributes 

Attribute

Valid

Values

Default Value

Programming Considerations

Account String

 

Empty String

Identifies an individual user account, and is associated with a specific User ID. The account identifier can be up to 30 characters long.

If an invalid account string is specified, Teradata Database behaves differently under the following circumstances:

1 If the consumer specifies an invalid account string without any leading spaces, OLE DB Provider for Teradata returns DB_E_SEC_AUTH_FAILED when IDBInitialize::Initialize is called. The error message returned is:

[Teradata Database]Invalid logon account

2 If the account string is not valid and it has leading spaces, OLE DB Provider for Teradata creates the session and initialize the Data Source. However, the account assigned to the user is the default account specified when the user was created in Teradata Database. The default account is not reflected in the provider string. The account that is not valid still appears in the provider string when the consumer calls IDBProperties::GetProperties to retrieve the contents of DBPROP_INIT_PROVIDERSTRING.

COPDownRetry

Any number greater than 0

15

Defines the number of minutes that OLE DB Provider for Teradata should wait before trying to connect to a server that is down.

Create Procedure With Print

N

P

N

Controls whether to use the print option when creating a stored procedure.

Use this attribute to display a stored procedure on Screen 5 of the Database Window.

N – Excludes the SPL PRINT statements from the compiled stored procedure.

P – Includes the SPL PRINT statements in the compiled stored procedure.

The P option includes in the compiled stored procedure object code all the Stored Procedure Language (SPL) PRINT statements specified in the stored procedure body. On executing the stored procedure, the SPL PRINT statement goes to Screen 5 of the Database Window.

For more information on stored procedures, see “Stored Procedures” on page 112

Create Procedure With SPL Text

YES

NO

YES

Controls whether Teradata Database stores the SPL source text (all the SQL and SPL statements comprising the stored procedure).

YES – Store SPL Text.

NO – Do not store SPL Text.

For more information on stored procedures, see “Stored Procedures” on page 112

Default Database

Name of an existing database.

Empty

Indicates the database selected when creating the session.

If the provider string does not include Default Database, Teradata Database uses the default database specified when the Teradata user was created.

OLE DB Provider for Teradata will not trim the leading or trailing spaces of the database name.

If Default Database specifies an invalid database, OLE DB Provider for Teradata still creates the Teradata session and initializes the Data Source. However, Teradata Database uses the database specified when the user was created to set the session. The database used is not reflected in the provider string. The invalid database name still appears in the provider string when the consumer calls IDBProperties::GetProperties to retrieve the contents of DBPROP_INIT_PROVIDERSTRING.

EnableLOBSupport

YES

NO

NO

LOBs are supported. See “Large Objects (LOBs)” on page 55 for more information.

Enable Parser

YES

NO

YES

Indicates whether to parse the SQ.

YES – Parse SQL

NO – Do not parse SQL.

The purpose of the parser is to:

  • Handle escape sequences specified in SQL statements.
  • Add the locking modifier that corresponds to the Isolation level specified when using ITransactionLocal::StartTransaction.
  • For more information, see “ITransactionLocal” on page 94.

    When Enable Parser is “YES”, OLE DB Provider for Teradata parses every SQL statement. This has a negative impact on performance. If the consumer only generates Teradata-specific SQL it is not necessary to parse the SQL. In this case, set the Enable Parser attribute to “NO” to improve performance.

    Map Call-Esc-Seq To Exec

    YES

    NO

    YES

    Specifies the behavior of a CALL statement that is within an escape clause:

     {CALL name(p1, p2,…)} 

    OLE DB Provider for Teradata uses this attribute to determine whether to call a macro or a stored procedure.

    YES – OLE DB Provider for Teradata considers the name in the escape clause to be a macro and converts the clause to:

    EXEC name(p1,p2…)

    NO – OLE DB Provider for Teradata considers the name in the escape clause to be a stored procedure and converts the clause to:

    CALL name(p1,p2,…)

    Refer to “Stored Procedures” on page 112 for information on stored procedure limitations.

    The parser is responsible for converting escape clauses into SQL syntax. Therefore, if the Map Call-Esc-Seq To Exec attribute is YES, the Enable Parser attribute must also be YES. If the parser is not enabled, OLE DB Provider for Teradata sends the unparsed escape clause to Teradata for processing, causing a database error.

    The Map Call-Esc-Seq To Exec attribute does not have any impact on the standard CALL statement:

    CALL name(p1,p2,…)

    OLE DB Provider for Teradata always considers the standard CALL statement as a stored procedure execution.

    Max Response Size

    400–65477

    8192

    Specifies the initial size of the buffers OLE DB Provider for Teradata uses to contain responses from Teradata Database. The value is adjusted higher dynamically if a response message exceeds the specified size.

    New Password

     

    Empty

    Specifies the secondary password to use when OLE DB Provider for Teradata detects that the original password has expired.

    When the original password expires, OLE DB Provider for Teradata does the following:

    1 Logs on to Teradata using the original password.

    2 Resets the password using the new password.

    3 Sets the property DB_AUTH_PASSWORD with the new password.

    4 Continues with the initialization of the Data Source.

    The new password is in effect for as long as the Data Source exists. To initialize a new Data Source, the new password must replace the original password when setting the initialization property DB_AUTH_PASSWORD.

    If the provider string does not specify a new password and the original password expires, IDBInitialize::Initialize returns the error code DB_SEC_E_AUTH_FAILED and with this error message:

    [Teradata Database]Password has expired, please use MODIFY USER statement to generate a new password.

    When this error occurs, there are two options to log on to Teradata Database:

  • Specify the New Password attribute in the provider string.
  • Use a Teradata data access utility, such as BTEQ or SQL Assistant, to change the password.
  • Number
    Of Cops

    0 to n

     

    Defines that number of cops/notes contained in the Teradata system, where n is the number of cops/nodes. See “Load Balancing” on page 67 for more details.

    Session Character Set

    ASCII

    KANJISJIS_0S

    (0 is zero, not letter O.)

    UTF8

    UTF16

    None

    Specifies the default character set for the session.

    The setting for single-byte character sets depends on the system:

  • For a Kanji session, set this attribute to KANJISJIS_0S.
  • For a UTF8 session, set the attribute to UTF8.
  • For a UTF16 session, set the attribute to UTF16.
  • See “TDPROP_INIT_SESSIONCHARACTERSET” on page 100.

    Session Mode

    ANSI

    DEFAULT

    TERADATA

    DEFAULT

    Specifies the session mode on Teradata Database. The selected mode applies for the duration of the session.

    DEFAULT is used to indicate that the system default will be used. (See “Date, Time, and Timestamp” on page 63 for more information.) To determine the default mode, ask your database administrator.

    Although Teradata Database implicitly starts a transaction when a session is in ANSI mode, OLE DB Provider for Teradata immediately commits each request submitted to the database. This is the default behavior when creating a session and is required by the OLE DB specification. Consumers start transactions explicitly by calling ITransactionLocal::StartTransaction. For more information about Teradata and ANSI modes, see SQL Request and Transaction Processing.

    The Teradata mode exists for backward compatibility. Over the years, a significant number of applications have been developed using Teradata SQL syntax; therefore, the recommendation for any new applications is to set the session mode to ANSI.

    Teradata Port Number

     

    1025

    Specifies the TCP/IP port number that the provider uses to connect to the Teradata Gateway.

    You must coordinate changes to this value with accompanying changes to the Gateway program.

    Use As Column Name

    COLUMNNAME
    COLUMNTITLE

    Empty

    See “TDPROP_INIT_USEASCOLUMNNAME” on page 101.

    Use X Views

    YES

    NO

    YES

    Specifies whether to use the X view or the standard view version of the data dictionary table. For more information on X Views, see the Data Dictionary.

    YES – Teradata Database uses X view database dictionary tables DBC.TablesX and DBC.ProceduresX when retrieving information for the schema rowsets: Tables, Procedures, and Schemata.

    NO – Teradata Database uses the DBC.Tables and DBC.Procedures data dictionary tables.

    Normally, both versions of the data dictionary views are installed on a Teradata system. However, a database administrator can choose to install either version or both versions. Ask your administrator which version is installed on your Teradata Database.