- 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:
- \program-files\Teradata\Client\version\CLIv2\clisamp
For information about the program-files variable, see About the program-files Variable in the Default Installation Path.
- Open a command prompt.
- Run the makefile to create the executable module clisamp:
- # nmake -f makesamp.win
- Change directory to the appropriate subfolder:
- Release
- Debug
- Run the sample program by entering one of the following commands:
- Run the sample program using the default logon information
(dbc/systemfe,service):
- clisamp
- Show help for the sample program using the -h option:
- clisamp -h
- Run the sample program using a user-provided input string:
- clisamp proddev/dbc,password
- where proddev is the tdpid,
- dbc is the user,
- and password is the password.
- Run the sample program using the default logon information
(dbc/systemfe,service):
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 a Teradata Database, see Security Administration, B035-1100.