Explicit connection permits precise control over which tdp and userid to connect to. Implicit connection uses system defaults for the tdp and userid. (See Implicit Connection). For this reason, make an explicit connection to connect to a nondefault tdp or userid.
Explicit connections are generally advocated because of this precise control, even when default tdps and userids are satisfactory for the required level of security.
Specify an explicit connection to the database with a CONNECT or LOGON statement, which are described in Teradata Vantage™ - SQL Stored Procedures and Embedded SQL, B035-1148.
Statement | Specifications |
---|---|
CONNECT | Specify only the userid and password. The tdpid is taken from the system default value. The CONNECT userid and password are each restricted to eight characters. This statement is IBM SQL-compatible. |
LOGON | Specify a complete database system logon string, including tdpid and accountid. The userid and password each can be a maximum of 30 characters. On Windows platforms only:
The <userid> and <password> are optional on Windows NT. A LOGON string without a <userid> and <password> is interpreted as an SSO logon. |
If an explicit connection request is made when a connection or a transaction is already active, the following actions are taken.
Connection or Transaction Status | Action Taken |
---|---|
The application is already connected to the database. | The previous connection is dropped before the new connection is attempted. |
A transaction is active. |
|