Using the odbctest utility
The odbctest utility allows you to test Open DataBase Connectivity (ODBC) connections to a target database and, once connected, to issue a variety of commands.
About this task
Procedure
- From a command prompt on the Unica Campaign server,
run the odbctest utility.
The utility returns a list of databases that you can connect to, similar to the following:
Registered Data Sources: MS Access Database (Microsoft Access Driver (*.mdb)) dBASE Files (Microsoft dBase Driver (*.dbf)) Excel Files (Microsoft Excel Driver (*.xls))
-
Enter the following information exactly at the prompts:
- The name of the database that you want to connect to (taken from the list of Registered Data Sources)
- A database user ID
- The password associated with the database user ID
The utility does not prompt for confirmation of your selections.
-
When you have successfully connected to the database, the utility prints out
messages like the following and presents you with a command prompt:
Server ImpactDemo conforms to LEVEL 1. Server's cursor commit behavior: CLOSE Transactions supported: ALL Maximum number of concurrent statements: 0 For a list of tables, use PRINT.
- You can enter the following commands at the prompt:
- bulk
[number_of_records]
Sets the number of records to return, as specified by number_of_records. The default is 1.
- descresSQL_command
Describes the columns returned by the SQL command specified by SQL_command.
- describepattern
Describes the table or tables specified by pattern. Returns the corresponding type, data type, storage length, precision, and scale.
exit
Terminates the database connection and exits.
help
Displays a list of supported commands.
print[pattern]
Returns a list of tables. Can optionally specify a search pattern.
quit
Terminates the database connection and exits.
SQL_command
Executes any valid SQL command or series of SQL commands.
typeinfo
Returns a list of supported data types for the database.
- bulk
[number_of_records]