To enable ODBC to take advantage of authentication cascading, you will use the following parameters in the connection string to configure the ODBC driver to connect to the Aster Database:
Parameter | Required? | Description |
---|---|---|
SERVER | Required | The exact IP address of the Queen. |
Driver | Optional | Specifies the driver to use. If passing this parameter, specify {AsterDriver}
You must include either the Driver or the DSN. |
DSN | Optional | Specify your DSN as specified in the ODBC configuration file odbc.ini. This example uses the DSN Beehive: DSN=Beehive;
You must include either the Driver or the DSN. |
Database Name | Optional | If not supplied, the system will re-connect to the database you are currently logged into. |
Port Number | Optional | Will connect to default port: 2406 |
-
First, construct the connection string. You will specify AUTOAUTHENTICATE=true in the ODBC connection string as follows:
- If using the Aster Driver:
sprintf((char*)connect_str,"Driver={AsterDriver};SERVER=xxx.xxx.xxx.xxx;AUTOAUTHENTICATE=true");
- If using the DSN name:
sprintf((char*)connect_str,"DSN=Beehive;SERVER=xxx.xxx.xxx.xxx;AUTOAUTHENTICATE=true");
Do not change the ODBC configuration file. If you need to specify parameters in the configuration file on the workers, you should contact Teradata Support.
- If using the Aster Driver:
-
Once you have constructed the connection string, connect using a function call like:
rc = SQLDriverConnect(hdbc, (SQLPOINTER) NULL, connect_str, SQL_NTS, buffer1, 255, &outlen, SQL_DRIVER_NOPROMPT)