Teradata SQL Assistant Tutorialby Leena Kudalkar
Teradata SQL Assistant is a client utility based on the Open Database Connectivity (ODBC) technology. It provides a Query writer to send SQL commands to the database, creates reports, exports and imports data between an ODBC-compliant database and tools or spreadsheets, maintains history, and provides a visual Database Explorer to view the database objects. It has two editions, namely, Teradata SQL Assistant for Microsoft Windows and Teradata SQL Assistant Web Edition. While the difference in the two editions is mainly pertaining to connectivity, this tutorial will focus on the Windows edition.
Install the ODBC driver for your RDBMS data source on the server PC. The driver comes from the RDBMS vendor in the installation package. Also see "Teradata Tools and Utilities Installation Guide for Microsoft Windows" on the Web page in References.
Click on the Windows "Start" menu, select "Programs" and "Teradata SQL Assistant."
Select "Tools" and then "Define Data Source" from the Teradata SQL Assistant that you launched in Step 1.
Choose the type of data source you want to create: User, System or File DSN. Click on "Add" and then "OK." In the "Create New Data Source" dialog, select the appropriate driver listed under "Name" and click "Finish." You have selected a driver for your RDBMS. A dialog appears.
In the dialog, enter a name and description for this data source. Enter the IP address or name of the server on which your RDBMS resides, username and password. If you did not check "Use Integrated Security," select a security mechanism from the drop-down list. If the list is empty, consult the database administrator (DBA). Enter a value for "Parameter" as a password for the security mechanism. Optionally, add values for "Default Database" and "Account String." Account String is the account (database server login) that the DBA assigned to the username when the username was created. Click "OK" twice to close dialogs. Teradata SQL Assistant is ready to be used.
To connect to a data source, from the main window of Teradata SQL Assistant select "Tools" and "Connect." Click the icon on the toolbar to select the data source and click "OK." In the dialog box, either select "Use Integrated Security," enter the Mechanism and Parameter, or enter the Username and Password. Optionally, enter a Default Database or an Account String. Click "OK."
Navigate through the various panes in the main window of Teradata SQL Assistant. You will see the Query window, Answerset (results) window, a History window, and a window for Database Explorer where you can expand the tree and view all database objects in a hierarchical list.
Select "Insert" or "Delete" from the main command list and right-click on the object for the shortcut menu to add or remove a database, table, view or column.
To paste database object names in the SQL code in the active Query window, select the object from the Database Explorer window, right-click and select "Quick Paste" from the shortcut menu. Shortcut menu option "Browse" copies the entire list of columns from the selected table or view, to add to a simple select statement such as "select
To list all tables in a database or columns in a table, select "Tools" and "List Tables" or "List Columns," respectively. Enter the desired database name and table or view name. Click "OK."
To disconnect from your data source, select "Tools" from the main window and "Disconnect."
- Press "F1" from anywhere in the SQL Assistant software for context-sensitive help.
Items you will need
- ODBC-compliant RDBMS (such as Teradata, Oracle, Sybase, Microsoft SQL Server, Microsoft Access or MySQL)
- ODBC driver and connectivity software for the RDBMS
- Teradata SQL Assistant for Microsoft Windows
- data image by jeancliclac from Fotolia.com