- In the makefile makesamp.win, add the correct paths to the include files.
By default the makesamp.win file is located in the following folder:
- Run the makefile to create the executable module clisamp:
# nmake -f makesamp.win
The default configuration is CFG="clisamp - Win32 Debug". Also supported is CFG="clisamp - Win32 Release".
- Change directory to the appropriate subfolder:
- Run the sample program by entering one of the following commands:
Run the sample program using the default logon information (dbc/systemfe,service):
Show help for the sample program using the -h option:
Run the sample program using a user-provided input string:
- proddev is the tdpid
- dbc is the user
- password is the password
The program does the following:
- Logs on using the default logon information (or the user-specified logon information) as shown above.
- Executes a simple query: SELECT * from dbc.sessioninfo;
Writes the results of the query to a CLISAMP.DAT file and displays information similar to the following:
clisamp CLIv2 version is version MTDP version is version MOSIOS version is version MOSIDEP version is version OSERR version is version Logging on to --> dbc/systemfe,service writing out to --> CLISAMP.DAT submitting --> select * from dbc.sessioninfo; writing out to --> CLISAMP.DAT Logging off.
For information about security and connecting to Teradata Vantage, see Teradata Vantage™ - Advanced SQL Engine Security Administration, B035-1100.