Customizing the Teradata Environment

In this section:

The Adapter for Teradata provides several parameters for customizing the environment and optimizing performance. This topic provides an overview of customization options.


Top of page

x
Controlling the Column Heading in a Request

How to:

You can specify a column's heading in a report using the Web Console. Alternatively, you can issue the SET COLNAME command.



x
Syntax: How to Control Column Headings Using a Command
ENGINE SQLDBC SET COLNAME {NAME|TITLE}

where:

SQLDBC

Indicates the adapter. You can omit this parameter value if you previously issued the SET SQLENGINE command.

NAME

If you specify the NAME option, the Teradata column name will be used as the column heading.

TITLE

If you specify the TITLE option, the name you provide is used as the column heading. TITLE is the default value.


Top of page

x
Activating NONBLOCK Mode

How to:

The Adapter for Teradata has the ability to issue calls in NONBLOCK mode. The default behavior is BLOCK mode.

This feature allows the adapter to react to a client request to cancel a query while the adapter is waiting on engine processing. This wait state usually occurs during SQL parsing, before the first row of an answer set is ready for delivery to the adapter or while waiting for access to an object that has been locked by another application.

Tip: You can change this setting manually or from the Web Console by clicking Data Adapters on the menu bar, clicking a configured adapter, and choosing Change Settings from the menu. The Change Settings pane opens.



x
Syntax: How to Activate NONBLOCK Mode
ENGINE SQLDBC SET NONBLOCK {0|n}

where:

SQLDBC

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

n

Is a positive numeric number. 0 is the default value, which means that the adapter will operate in BLOCK mode. A value of 1 or greater activates the NONBLOCK calling and specifies the time, in seconds, that the adapter will wait between each time it checks to see if the:

  • Query has been executed.
  • Client application has requested the cancellation of a query.
  • Kill Session button on the Web Console is pressed.

Note: A value of 1 or 2 should be sufficient for normal operations.


Top of page

x
Obtaining the Number of Rows Updated or Deleted

How to:

PASSRECS returns the number of rows affected by a successfully executed SQL Passthru INSERT, UPDATE, or DELETE command.

Tip: You can change this setting manually or from the Web Console by clicking Data Adapters on the menu bar, clicking a configured adapter, and choosing Change Settings from the menu. The Change Settings pane opens.



x
Syntax: How to Obtain the Number of Rows Updated or Deleted
ENGINE SQLDBC SET PASSRECS {ON|OFF}

where:

SQLDBC

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

ON

Provides the number of rows affected in the application program SCB count member after the successful execution of an SQL Passthru INSERT, UPDATE, or DELETE command. ON is the default value.

OFF

Provides no information after the successful execution of an SQL Passthru INSERT, UPDATE, or DELETE command.


Top of page

x
Setting the Transaction Mode Within a Teradata Connection

How to:

x

You can control a Teradata connection's transaction mode using the Web Console or by issuing a command.



x
Syntax: How to Set the Transaction Mode of a Teradata Connection

To set the transaction mode of a Teradata connection, issue the following command in any profile or in a procedure

SQL SQLDBC SET TRANSACTION [ANSI|BTET|DEFAULT]

where:

ANSI

Sets the Teradata connection to the ANSI transaction mode. This is the default for a CLI connection.

BTET

Sets the Teradata connection to the Teradata transaction mode (also known as the BTET transaction mode).

DEFAULT

For ODBC connections only. Sets the Teradata connection to the Teradata system default transaction mode. This is the default for an ODBC connection.

For more information about how the Teradata system default is determined, see your Teradata documentation.

Note: The connection scope is different when setting the transaction mode for ODBC and CLI connections.


iWay Software