User Guide
Release 14.00
B035-2492-071A
November 2011
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Active Enterprise Intelligence, Applications Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast,
Gridscale, Managing the Business of Marketing, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision
Experts, Teradata Labs Logo, Teradata Raising Intelligence Logo, Teradata Source Experts, WebAnalyst, and Xkoto are trademarks or registered
trademarks of Teradata Corporation or its affiliates in the United States and other countries.
Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.
AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.
EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.
GoldenGate is a trademark of Oracle.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.
Intel, Pentium, and XEON are registered trademarks of Intel Corporation.
IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.
Linux is a registered trademark of Linus Torvalds.
LSI is a registered trademark of LSI Corporation.
Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United
States and other countries.
NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries.
Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.
Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.
QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.
SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.
SPARC is a registered trademark of SPARC International, Inc.
Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States
and other countries.
Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.
THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN AS-IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION
MAY NOT APPLY TO YOU. IN NO EVENT WILL TERADATA CORPORATION BE LIABLE FOR ANY INDIRECT, DIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS OR LOST SAVINGS, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
The information contained in this document may contain references or cross-references to features, functions, products, or services that are
not announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features,
functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions,
products, or services available in your country.
Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated
without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any
time without notice.
To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this
document. Please email: teradata-books@lists.teradata.com.
Any comments or materials (collectively referred to as Feedback) sent to Teradata Corporation will be deemed non-confidential. Teradata
Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform,
create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata
Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including
developing, manufacturing, or marketing products or services incorporating Feedback.
Copyright 2002-2011 by Teradata Corporation. All Rights Reserved.
Preface
Purpose
This book provides information about Teradata System Emulation Tool (SET), which is a
Teradata Tools and Utilities product. Teradata Tools and Utilities is a group of products
designed to work with Teradata Database.
Teradata SET imitates (emulates) the Optimizer-generated data from a target system,
generates query plans, and then imports that information to a test system where queries can
be run without impacting the production system.
Audience
This book is intended for use by:
Field engineers
Test engineers
Supported Releases
This book supports the following releases:
Go to http://www.info.teradata.com/.
Click Search.
Open the version of the Teradata Tools and Utilities ##.##.## Supported Platforms and
Product Versions spreadsheet associated with this release.
Preface
Prerequisites
The spreadsheet includes supported Teradata Database versions, platforms, and product
release numbers.
Prerequisites
The following prerequisite knowledge is required for this product:
Teradata SQL
Teradata Database
Description
November 2011,
14.00
Instances of UTF8 and UTF16 missing the hyphen (UTF-8 and UTF16).
Removed footnote for Teradata Database 14.0.
Preface
Additional Information
Additional Information
Additional information that supports this product and Teradata Tools and Utilities is available
at the web sites listed in the table that follows. In the table, mmyx represents the publication
date of a manual, where mm is the month, y is the last digit of the year, and x is an internal
publication code. Match the mmy of a related publication to the date on the cover of this book.
This ensures that the publication selected supports the same release.
Type of Information
Description
Access to Information
Release overview
1 Go to http://www.info.teradata.com/.
1 Go to http://www.info.teradata.com/.
Late information
Additional product
information
Preface
Additional Information
Type of Information
Description
Additional product
information
(continued)
CD-ROM images
Access to Information
Teradata Manager Installation Guide
B035-2402-mmyx
Teradata SQL Assistant for Microsoft Windows
User Guide
B035-2430-mmyx
Teradata Statistics Wizard User Guide
B035-2504-mmyx
Teradata Tools and Utilities Installation Guide for
Microsoft Windows
B035-2407-mmyx
Teradata Visual Explain User Guide
B035-2504-mmyx
Utilities
B035-1102-mmyx
SQL Data Definition LanguageB035-1184-mmyx
Teradata System Emulation Tool User Guide
B035-2492-mmyx
1 Go to http://www.info.teradata.com/.
2 Under the Online Publications subcategory,
Ordering
information for
manuals
1 Go to http://www.info.teradata.com/.
2 Under Print & CD Publications, click How to
Order.
3 Follow the ordering instructions.
General information
about Teradata
1 Go to Teradata.com.
2 Select a link.
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Supported Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Changes to This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Chapter 1:
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Key Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Uses Imported Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simplifies Data Capture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ensures Data Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
16
16
16
Emulation-Process Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Support Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
19
19
19
19
Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Export Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Import Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimate-Time Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Undo-Import Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
19
21
22
22
Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table of Contents
Chapter 2:
Connection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
ODBC Driver Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
CLIv2 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Connection Verification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Start Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Connect to a Teradata Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Connect Using ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Connect Using CLIv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Chapter 3:
Menus and Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Import Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Chapter 4:
Command-Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Command-Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Command-Line Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Log on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Undo Imported Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
Use the Input Command File Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
Chapter 5:
Session Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Customization Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Creating Restricted Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Connectivity Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Directory Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Error-Handling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Table of Contents
Chapter 6:
Export Methods and Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Export by Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Type a query manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load a query from a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load a query from a QCD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load a query from DBQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
62
62
63
64
Export by Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Export by Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Export Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cost Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cost Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Demographics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Execution Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Object Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
QCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Random AMP Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Workloads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
74
74
76
78
80
81
81
82
85
85
Chapter 7:
Import Methods and Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Import to a Test System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Change Import Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Specify Objects for Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Change RAS Byte Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Edit Import Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Change Permanent Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Retry a Failed SQL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Edit Information Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Save Changed Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Display Existing Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Rename a Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Undo Target Database Renaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Reorder Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Table of Contents
Chapter 8:
Administrative Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Set TLE Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Set TLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Reset TLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Perform Query Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
Perform a File Transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
Undo Imported Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Delete Exported Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
View Log Files and Summary Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
View a Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
View a Summary Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Retry Failed Import Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
Manage Missing Access Privilege Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
Disconnect and Close Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Disconnect from a Teradata Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Close Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Perform File Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
View Low Level Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
10
List of Figures
11
List of Figures
12
List of Tables
13
List of Tables
14
CHAPTER 1
Features
This chapter provides an introduction to Teradata System Emulation Tool (SET) features.
Included is information about system requirements, privileges, and online help.
To learn more about Teradata SET features, see:
Key Benefits
Emulation-Process Overview
Support Tools
System Requirements
Privileges
Key Benefits
Teradata SET imitates a target (production) system on a test system. System-level
environmental data is captured from the target system, then stored in relational tables. The
Teradata Query Optimizer (Optimizer) processes information from these tables, together with
appropriate column and index statistics, to generate query plans on the test system as though
the operation occurred in the production environment.
Use Teradata SET to:
Determine the source of Optimizer-based query issues using imported environmental cost
data and random AMP sample (RAS)-based statistical data.
Displays the Query, Explain Text, Step Report, and Summary Information for queries in the
Import window.
Allows editing of object definitions, statistics, RAS, cost parameters, and cost profiles
before import to a test system.
Exports and imports data demographics of tables from one Query Capture Database
(QCD) to another.
15
Chapter 1: Features
Key Benefits
Provides a summary report of the failures and successes of an import, export, or undo
(cleanup) operation.
Relevant data on the target system is read and then written to a staging area.
The staged data is imported to the test system and applied to the appropriate data tables.
Generate query plans that emulate those created on the target system under a given set of
conditions.
Note: A small test system can be used to generate query plans that emulate a much larger
target system.
Test, diagnose, and solve Optimizer-related performance questions that might occur in the
target system.
Teradata SET also works with Teradata Visual Explain to emulate how a target system
performs under specific conditions and workloads.
16
Chapter 1: Features
Emulation-Process Overview
Teradata SET also synchronizes all of the elements of a target environment. For example, all
the configuration settings, databases, data models, and data dependencies maintain the
correct relationships when exported and imported.
In addition, database objects are duplicated on the test system. Tables, views, macros, triggers,
join indexes, and stored procedures function just like they do on the target system. Use
Teradata SET to thoroughly debug and optimize queries in a safe, but equivalent, emulated
environment prior to introducing them into the production system.
Emulation-Process Overview
This section provides an overview of the typical Teradata SET emulation process. It is assumed
that SystemFE.Opt_Cost_Table and SystemFE.Opt_RAS_Table exist on the target system.
The process is as follows:
1
Create a target system profile that defines the databases, tables, views, macros, and related
environmental parameters or RAS to be captured and loaded onto the test system.
Perform an export operation from the target system to collect Optimizer cost parameters;
RAS; and any necessary object definitions, statistics, and test queries from the target
system. Then, place this emulation information on the system disk as data files that the test
system can import.
If the target and test systems are not connected to the same network, perform a pack
operation to combine all the data files into one file. (Pack files also can be compressed
using any standard compression method.) Transfer the files to the test system.
Perform an import operation to create the objects, emulate the statistics, and import the
data into SystemFE.Opt_Cost_Table and SystemFE.Opt_RAS_Table on the test system.
Set emulation on the test system, and use the data to test and resolve any problems or
discrepancies.
17
Chapter 1: Features
Support Tools
Figure 1 shows the relationship between Teradata SET, the ODBC and CLIv2 interfaces, target
systems, and test systems.
Figure 1: Teradata SET Architecture
Target System
Teradata Database
AMP Samples
Schema/DDL
Workstation
EXPORT
SYSTEM
INFORMATION
Teradata SET
QCD
GDO
Statistics
ODBC
IMPORT SYSTEM
INFORMATION
Cost Parameters
Test System
Teradata Database
QCD
Statistics
GDO
Tables
AMP Samples
Cost Parameters
2492D001
Support Tools
Teradata SET uses the following tools to emulate a target system on a test system:
System Requirements
The following topics describe the system requirements:
18
Operating System
Connectivity
Compatibility
Installation
Chapter 1: Features
Privileges
Operating System
To determine on which platforms Teradata SET is available and identify the compatible
Teradata Database versions, refer to Teradata Tools and Utilities Supported Platforms and
Product Versions B035-3119-mmyx. This spreadsheet shows version numbers and platform
information for all Teradata Tools and Utilities products in a release and is available at
www.info.teradata.com.
Connectivity
Connecting Teradata SET to a Teradata Database requires one of the following:
Note: Before retrieving system information from a target system, an ODBC driver or CLIv2
must be installed on the workstation. If an ODBC driver and CLIv2 are installed on the same
system, the user-configured ODBC driver is used to connect to Teradata Database after the
initial setup.
Compatibility
Teradata SET is certified to run with any Level-2-compliant, 32-bit ODBC driver. Teradata
SET is also certified to run with CLIv2. For details on the compatible versions, refer to
Teradata Tools and Utilities Installation Guide for Microsoft Windows B035-2407-mmyx.
Installation
Install Teradata SET as a standalone application using the standard Microsoft Windows
software installation instructions. For more information, refer to Teradata Tools and Utilities
Installation Guide for Microsoft Windows B035-2407-mmyx.
Privileges
To perform export, import, or undo import (cleanup) operations, establish:
Note: To learn more about privileges, refer to SQL Data Definition Language B035-1184mmyx.
Export Rights
Set privileges prior to performing export operations. When exporting by query, the right to
execute the SHOW QUALIFIED SQL statement and configuration data (RAS, statistics, object
definitions) is required if only those objects returned from this statement can be exported.
Table 1 lists the privileges required to export each type of information.
19
Chapter 1: Features
Privileges
Exported Information
Required Rights
Cost parameters
Execution plans
Object definitions
Machine configuration
RAS
Statistics
20
Chapter 1: Features
Privileges
Table 1: Export Rights (continued)
Exported Information
Required Rights
Demographics
QCD data
Workloads
Cost profiles
Import Rights
Set privileges prior to performing import operations. Table 2 lists the privileges required to
import each type of information.
Table 2: Import Rights
Imported Information
Required Rights
Cost parameters
Execution plans
Object definitions
RAS
INSERT on SystemFE.Opt_RAS_Table.
21
Chapter 1: Features
Privileges
Table 2: Import Rights (continued)
Imported Information
Required Rights
Statistics
Demographics
QCD data
Workloads
Cost profiles
Estimate-Time Rights
The following privileges are required to use the Estimate Time function when performing
export and import operations:
The corresponding rights listed in Table 1 on page 20 and Table 2 on page 21.
Undo-Import Rights
Table 3 lists the privileges required in order to restore the default test system environment
(also known as undo-import or cleanup operations).
Table 3: Undo-Import Rights
Undo-Import Information
Required Rights
Cost parameters
Execution plans
22
Object definitions
RAS
Statistics
Chapter 1: Features
Online Help
Table 3: Undo-Import Rights (continued)
Undo-Import Information
Required Rights
Demographics
QCD data
Workloads
Cost profiles
Online Help
Teradata SET online help answers questions about how to use Teradata SET features. Online
help (including context-sensitive help) opens in a browser window. Microsoft Internet
Explorer, version 6.0 or later, is the recommended browser for viewing online help and
context-sensitive help. A browser other than the recommended browser might result in
incorrectly displayed help.
The Help window opens. Use the tools available from the Help window to navigate to other
topics.
23
Chapter 1: Features
Online Help
24
CHAPTER 2
Connection Methods
This chapter contains procedures for establishing a connection to a Teradata Database using
either ODBC or CLIv2. Verify the connection before opening Teradata SET.
Open Microsoft ODBC Data Source Administrator by doing one of the following:
From the Teradata System Emulation Tool window (main window), click Tools>Define
Data Source.
The ODBC Data Source Administrator dialog box appears and displays the User DSN tab by
default.
2
Click Add.
25
Click Finish.
The ODBC Driver Setup for Teradata Database dialog box appears.
Verify the connection before opening Teradata SET and connecting to a Teradata
Database.
See Connection Verification on page 28.
26
CLIv2 Setup
When using CLIv2, define an IP address and provide the name of the Teradata Database to use
in the hosts file on the workstation.
Unlike the ODBC connection, no data source must be defined prior to connecting to a
Teradata Database. CLIv2 connections are defined from within Teradata SET. See Connect to
a Teradata Database on page 29.
Click NOTEPAD.
Click OK.
The hosts file opens in a Notepad window.
Click File>Save.
Verify the connection before opening Teradata SET and connecting to a Teradata
Database.
27
Connection Verification
Test the connection between the workstation and Teradata Database before starting
Teradata SET.
In the Open box, type PING followed by the name of the Teradata Database and the cop1
suffix:
PING ssscop1
28
The main window opens. See Main Window on page 33 for information on locating the
Teradata SET version number.
Click OK.
29
Click CLIv2.
Click Apply.
Click OK.
Click
Description
User Name
Select a user name from the list, or type a valid user name. The
user name must be defined for the server.
When using Single Sign On, ensure that the User Name and
Password boxes are blank.
Password
Type the password for the user name in the User Name box. The
password is concealed with asterisks in place of the characters as
they are typed.
More
30
ASCII
KANJISJIS_0S
UTF-16
UTF-8
Logon Information
Description
Authentication Mechanism
Authentication Parameter
Default Database
Account String
[Optional] Select the account string from the list or type the logon
parameters that define the user group.
Less
Click OK.
31
32
CHAPTER 3
This chapter provides information about the Teradata SET menus and toolbars. Use this
information to navigate the main window (Teradata System Emulation Tool window) and the
Import window.
Main Window
The main window (Figure 2) contains menus, commands, and a toolbar that access Teradata
SET primary functions and features. Use the options available in the main window to navigate
the Teradata SET application.
Figure 2: Teradata SET Main Window
Table 4 describes the main window options. Table 5 explains the information available in the
About Teradata System Emulation Tool dialog box, which is accessed from the Help menu.
Table 4: Main Window Menus, Commands, and Toolbar Buttons
Menu
Command
Button Description
File
Connect
Disconnect
Exit
None
33
Menu
Command
Button Description
View
Log File
Summary Report
Font
None
Display the Font dialog box to change the font style, size, or
color for text displayed in the main window. For example,
change the font used when displaying the log file or
summary report.
Toolbar
None
Status Bar
None
Tools
Export
Import
Undo Import
Display the Open dialog box and select a single .undo file of
imported information to remove it from a test system.
Customize Data
34
Set TLE
Reset TLE
Delete Files
Pack
Display the Pack dialog box to combine an .mcf file and its
associated files into one file (.pack). The UDF code files
specified (if any) in response to the Browse for UDF File
Open Dialog during export are also packed in the same file.
See Perform File Management on page 133.
Unpack
Menu
Command
Button Description
Execute SQL/SQL
Assistant
Options
None
Help
Help Topics
About Teradata
System Emulation
Tool
Toolbar button
None
None
Information
Description
Version
Date Created
System
Connection Type
Character Set
User
35
Information
Description
Import Window
The Teradata System Emulation Tool - Import window (Figure 3, hereafter referred to as the
Import window) contains menus, commands, and a toolbar that access Teradata SET Import
functions. To open the Import window, click
in the main window. Use the options
available in the Import window to navigate the Import feature.
Figure 3: Teradata SET Import Window
Note: The information that appears in the right pane of the Import window depends on what
was imported.
Table 6 describes the Teradata SET Import window options.
Table 6: Import Window Menus, Commands, and Toolbar Buttons
Menu
Command
Button Description
File
Save As
Import
36
Menu
Command
Button Description
Exit
Undo
Edit
Copy
Paste
Find
37
Menu
Command
Button Description
Apply Changes
View
Tool Bar
None
Status Bar
None
Font
None
Display the Font dialog box to change the font style, size,
or color for text displayed under Object Definitions
Information and Explain Text Information in the Import
window.
Source Machine
Configuration
Estimate Time
Options
Existing Databases
38
Object definitions
Execution plans
Workloads
QCD data
Import Options
Order Database
Set TLE
Menu
Command
Change PermSpace
Button Description
Display the Change PermSpace dialog box to specify
different permanent space (permspace) than that
calculated automatically by Teradata SET. Permanent
space is required for importing objects on a target system.
Help
Note: Help in the Import window is the same as Help in the main window. See Table 4 on page 33.
Toolbar buttons (no corresponding menu or commands)
None
None
None
None
39
40
CHAPTER 4
Command-Line Interface
This chapter explains command-line switches and how to perform tasks from the
command line.
Export, import, and undo-import (cleanup) operations can be performed for:
Object definitions
Statistics
RAS
Execution plans
Cost profiles
Demographics
Workload information
Command-Line Switches
Table 7 describes the command-line switches for Teradata SET. Command-line switches are
not case-sensitive.
Table 7: Command-Line Switches
Switch
Task
am
dsp
Capture execution plan information for a specific date when queries are added for
export using the function CURRENT_DATE. The date must be specified with this
switch in mm-dd-yyyy format. For example, -dsp 02-12-2008.
ed
esr
eqf
41
Switch
Task
eqt
ewl
ewr
icf
Read the command switches from the specified file instead of the command line.
lsr
Insert table data used by query optimization to tables on the test system.
qcd
scs
unx
Retrieve Data Dictionary information and QCD data using non-X views.
ux
uxq
xapp
dbql
Export DBQL query specified on the command line using the parameters DBQL
Database name and DBQL Query ID
tardbql
Import DBQL XML Plans into the specified Target DBQL Database. The target
DBQL Database name should be provided followed by the switch.
Export execution plans in XML form for queries either entered manually (specified
on the command line using switch eqt) or selected from file.
Table 8 describes the command-line switches specifically for export and import options.
Options can be specified in any combination and in any order. For example, typing -drs or
-d -s -r achieves the same result. If no option is specified, all options are considered.
Table 8: Command-Line Switches for Export and Import Options
42
Switch
Task
Switch
Task
Export, import, and undo Optimizer cost parameters and DBS Control information.
Export, import, and undo workload information, including workload definitions and
index recommendations.
Command-Line Tasks
Review the following topics before using the command line:
Log on
Export
Import
Log on
Use the Teradata SET command-line interface to log on to a Teradata Database using either
ODBC or CLIv2 connectivity.
Use the following command syntax to log on to a Teradata Database:
tset [-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
Note: When only the log-on switch is specified in the command, the application remains
open after a connection is established regardless of the xapp switch.
The following examples demonstrate ways to log on from the command line.
Syntax Example
Description
tset -c mydsn
tset -c mydsn\jeff\padres
43
Syntax Example
Description
tset -c mydsn\padres
tset -l mytdpid\jeff
tset -l mytdpid\jeff\padres
Export
Use the command line interface to export information for a specified database. To export
demographics, use the qcd switch to specify an existing QCD database.
Export by Database
Use the following command syntax to export by database:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
-ed <databasename>
[-qcd <qcdname>]
[-f <exportfile>]
[-d -s -r -p -o -g -w -e]
[-ux|-unx]
[-xapp]]
The following examples demonstrate ways to export by database from the command line.
44
Syntax Example
Description
Export by Query
Use the command line interface to export information for a specified query. Enter the query
on the command line or specify a file name containing one or more queries. To export
demographics, use the switch to specify an existing QCD database. If the qcd switch is not
specified when exporting execution plans, then the name qcd is used by default.
Use the following command syntax to export data by query:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
[-eqt <querytext>|-eqf <queryfile>]
[-dbql <DBQL DB Name DBQL Query ID>]
[-qcd <qcdname>]
[-f <exportfile>]
[-d -s -r -p -o -g -w -e]
[-ux|-unx]
[-esr]
[-x]
[-xapp]]
The following examples demonstrate ways to export by query from the command line.
Syntax Example
Description
Export by Workload
Use the command line interface to export information for a specified workload. This is useful
for extracting the information required to perform an index analysis on a test system using
Teradata Index Wizard. You must specify the workload name and the name of the QCD that
contains the workload.
Use the following command syntax to export by workload:
tset [-icf <commandfile> ]|
45
The following example demonstrates how to export by workload from the command line.
Type:
tset -l prod\dbc\dbc -qcd qcd -ewl wl1 -dsrpow -f workload1
Object definitions, statistics, and RAS for the objects referenced by the queries of workload
wl1 in the QCD named qcd from the system prod are exported. The execution plans for the
queries, the workload definition, plus any index recommendations and cost parameters are
also exported. This is all of the information needed to do an index analysis on a test system
using Teradata Index Wizard. The exported data is saved to a file named workload1.
Import
Use the command line interface to import information associated with a specified .mcf file
onto a Teradata Database. If the requested information is not available in the file, then the
switch is ignored.
Use the following command syntax to perform an import:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
[-i <importfile>
[-tardbql <targetDBQLName>]
[-d -s -r -p -o -g -w -e -q]
[lsr]
[-xapp]]
The following examples demonstrate ways to import from the command line.
46
Syntax Example
Description
tset -l test\dbc\dbc -i
prod.mcf
tset -c prod\dbc -i
<importfile> -tardbql dbqatxml
-q
The following are examples of how to clean up imported information from the command line.
Type:
tset -c test -u prod.31-Jul-04.22.33.12.undo
The information that was imported into a Teradata Database named test, as logged in the
specific .undo file, is cleaned up.
Type:
tset -c
test\dbc -u prod.31-Jul-04.22.33.12.undo -q
The DBQL XML Plans that were imported into a Teradata Database named test, as logged in
the specified .undo file, are cleaned up.
The following is an example of how to specify an input command file from the command line.
Type:
tset -icf command.txt
Command options are read from command.txt, and the command is executed.
47
48
CHAPTER 5
Session Options
Teradata SET sessions can be customized using the Options dialog box, which consists of the
following tabs:
Customize
Connectivity
Directory
Error Handling
Use the Customize tab to select options such as whether to create a log file. Use the
Connectivity tab to choose the interface to use when connecting to a Teradata Database. From
the Directory tab, specify the directory in which exported emulation information is saved. Use
the Error Handling tab to chose how errors are handled.
Selections take effect immediately and remain in effect until they are changed.
Customization Options
Use the Customize tab to set options such as whether to create a log file.
Note: It is not necessary to connect to Teradata Database for this procedure.
49
The Options dialog box appears with the Customize tab selected by default.
Description
50
Option
Description
Use Multi-Threading
Click Apply.
[Optional] To continue customizing a session, select another tab in the Options dialog box.
51
Teradata SET uses restricted views to restrict access to data dictionary information and QCD
data the logged in user owns or has access to.
Beginning with Teradata Database 12.00.00, each system view in the DBC database includes a
view that supports Unicode. All Unicode system views are identified by a suffix, V or VX,
when a restricted Unicode view is used.
Note: To learn more about X views, V views, and VX views, see Data Dictionary B035-1092mmyx and Database Administration B035-1093-mmyx.
Additional restricted views required by Teradata SET must be created in Teradata Database.
Teradata SET creates restricted views from a script file. There are three versions of the script
file:
The script files are located in the Teradata installation folder. For example:
C:\Program Files\Teradata\Teradata System Emulation Tool 14.00\DBCXViews62.bteq
Connectivity Options
Use the Connectivity tab to choose the interface used to connect to a Teradata Database.
Note: It is not necessary to connect to Teradata Database for this procedure.
52
Click Apply.
[Optional] To continue customizing a session, select another tab in the Options dialog box.
Directory Options
Use the Directory tab to specify the directory and file in which exported emulation
information is saved.
Note: It is not necessary to connect to Teradata Database for this procedure.
53
Click Browse.
ii
Click Apply.
[Optional] To continue customizing a session, select another tab in the Options dialog box.
Error-Handling Options
Use the Error Handling tab to specify how errors are handled.
Note: It is not necessary to connect to Teradata Database for this procedure.
54
Select one or more of the check boxes in the Error Handling tab.
Option
Description
General
Note: Applies to export, import, or undo import (cleanup) operations.
Log only failures in
Summary Report
55
Option
Description
Import
Note: Applies only to import operations. Depending on other settings selected under Import,
some errors might display. For example, if the Display Object exists dialog check box is selected,
an error appears if a table that is being imported already exists on the system. If this check box is
not selected, all Teradata Database error messages appear.
Display Failed SQL
statement dialog
Display the SQL Statement Failed dialog box. Use this dialog box
to do one of the following:
Abort the import.
Ignore the error and continue importing.
Enter SQL to correct insufficient privileges or permanent
space errors and then retry the failed statement.
Teradata Database errors that can be retried include:
2644
2843
3250
3523
3524
Clear the check box to prevent the SQL Statement Failed dialog
box from appearing. These errors are automatically ignored
during future import operations. See Retry Failed Import
Operations on page 130.
56
Option
Description
Option
Workloads
57
58
Click Apply.
[Optional] To continue customizing a session, select another tab in the Options dialog box.
CHAPTER 6
Teradata SET is used to quickly capture (export) emulation information, which can be edited,
and then import the information to a test system in order to imitate the target system. For
example, using system information exported from a target system with four nodes, cost
parameters and execution plans can be analyzed on the test system as if it also has four nodes.
See Chapter 7: Import Methods and Options.
The Export feature can be customized to ensure that the test system imitates the features of the
target system being analyzed (see Export Options on page 73). An overview of the process
follows:
1
Query: To identify database objects for export using one or more data manipulation
language (DML) statements. See Export by Query on page 59.
Export the information needed to emulate the target environment on the test system.
The following topics explain how to use Teradata SET to capture information from a target
system:
Export by Query
Export by Database
Export by Workload
Export Options
Export by Query
This export method uses DML statements to identify database objects to export. The
export-by-query operation uses the SHOW QUALIFIED statement; therefore, use only DML
statements as input. In other words, do not use Data Definition Language (DDL) statements.
59
For more information about the SHOW statement and restrictions, refer to SQL Data
Definition Language B035-1184-mmyx.
To export by query
1
Click Query.
In the File name box, type a file name for the exported emulation information.
Note: By default, the File Name box displays the name of the target system specified when
connecting. See Connect to a Teradata Database on page 29.
Specify a path to the folder in which to save the file named in step 3 by doing one of the
following:
By default, the In Folder box displays the path specified in the Options dialog box. See
Directory Options on page 53.
5
Click OK.
The Export By Query dialog box appears.
Figure 4: Export by Query
60
Define the default database for running queries by doing one of the following:
Click
Note: If adding a query and the database, tables, and view names in the new query are
fully qualified, it is not necessary to select a database.
7
Click
Load a query from a file. See Load a query from a file on page 62.
Load a query from a QCD. See Load a query from a QCD on page 63.
Load a query from DBQL. See Load a query from DBQL on page 64.
In Export Options, select the appropriate check boxes to define the exported information.
See Export Options on page 73.
10 [Optional] To further define the selected export options for the query, click Options.
The Export Options dialog box appears. The options available in this dialog box depend on
the selections made under Export Options on the Export By Query dialog box. See Export
Options on page 73.
Note: If a selected query contains a problem, clicking Options displays a Warnings dialog
box. To resolve the warning, change the query or remove it from Selected Queries.
11 [Optional] To customize the headings under Selected Queries:
a
12 [Optional] Click Estimate Time to view an estimate of the time needed to export each
object.
See Estimate-Time Rights on page 22 and Estimate Export Time on page 85.
13 Click Export to begin the export process.
61
Note: The export-by-query operation uses the SHOW QUALIFIED statement. To avoid
errors, only input DML statements, not DDL statements. If there is an error, a Warnings
dialog box appears. Modify the statement before restarting the export operation. After the
export operation completes, a summary report of the export operation results appears. See
View a Summary Report on page 129.
Click Add.
Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.
62
Select a file.
Click Open.
All of the queries in the selected file are added under Selected Queries in the Export By
Query dialog box.
Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.
63
Click OK.
All of the selected queries are added under Selected Queries in the Export By Query dialog
box.
Note: To remove a query, select the query and click Remove.
Under Export Options, select check boxes to define the exported information.
Query text is retrieved from the QCD specified in the QCD Name box. If the Execution
Plans check box is selected, the query plan also is retrieved from the database named in the
QCD Name box. See Export Options on page 73.
64
Description
Step Count
Result Rows
Click to open the Select Users and Accounts dialog box and
browse queries submitted by a set of users or accounts.
To select a user, enter the user name in the Select User box and
then click Add. You can also click List Users to list all users in
the Select User list box. Select a name and then click Add.
To select an account, enter an account in the Select Account
box and then click Add. You can also click List Accounts to list
all the accounts. Select an account and click Add.
To remove users or account names from the lists, select the user
or account name in the list, and then click Remove.
Select Criteria
Start Date
65
Option
Description
End Date
Start Time
End Time
Select QueryBand
Name
Value
List Names
Click to list all the Query Band Names in the Name-Value list.
Add
Rem
Name-Value
Filter
Click OK to close the Select Criteria dialog box and return to the DBQL Plans dialog box.
Click Browse DBQL to load the XML queries from DBQL to add to the Query List.
Click OK to add the XML queries to the Select Queries list in the Export by Query dialog.
Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.
includes the USING clause, TSET displays the Input USING Values to capture specific plans
screen.
Figure 6: USING Values to Capture Specific Plans
Use this screen to specify values for the USING clause shown for each selected query.
The Using Variables fields display data in the Name field and Datatype field. Enter data values
in the Value column for each query listed in the Using Query edit box.
Click OK to export specific execution plans that contain values for the USING clause.
Click Ignore to capture generic execution plans.
Click Ignore All to capture generic plans for all other export queries containing the USING
clause.
67
Export by Database
Use the export-by-database method to select database objects for individual export and to
define the information to export.
To export by database
1
Click Database.
In the File name box, type a file name for the exported emulation information.
By default, the File name box displays the name of the target system specified when
connecting. See Connect to a Teradata Database on page 29.
Specify a path to the folder in which to save the file named in step 3 by doing one of the
following:
By default, the In Folder box displays the path specified in the Options dialog box. See
Directory Options on page 53.
5
Click OK.
The Export By Database dialog box appears.
68
Enter the name of the database or user in the Specify Export Database box.
Click
Note: The Execution Plans check box is unavailable, by default, unless a database in
List of Objects pane is marked as a QCD, or a database is selected from the Specify
Export Database list and the Query Capture Database check box is selected.
ii
iii Repeat step i and step ii until all of the required objects are in the Selected List
pane.
ii
69
Note: To remove an object from the Selected List pane, select it and click Remove.
ii
Specify the database or user in the Specify Export Database in either of the
following ways:
Enter the name of the database or user in the Specify Export Database box.
Click the browse button to select a database or user from the Specify Export
Database list.
Note: If the Add button is not clicked, after specifying the database or user in the
Specify Export Database box, only the database specified in the Specify Export
Database box is available for export.
ii
Specify a query-capture database in the Specify Export Database box in either of the
following ways:
Enter the name of the query-capture database in the Specify Export Database
box.
Click the Browse button to select a query-capture database from the Specify
Export Database list.
iii Click Add to move the object to the Selected List pane.
Note: After selecting the Query Capture Database check box, and clicking the Browse
button, only query-capture database names populate the Specify Export Database list.
If the Query Capture Database check box is deselected and the Browse button is clicked,
all database names populate the Specify Export Database list. If the Add button is not
clicked after specifying a query-capture database in the Specify Export Database box,
only the query-capture database names specified in the Specify Export Database box
are available for export.
7
[Optional] Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.
70
In the List of Objects pane, right-click the name of a database to display the shortcut
menu.
Note: The Execution Plans check box under Export Options is available only when the
database is marked as a QCD.
10 [Optional] Click Estimate Time to see the estimated time required to process the export
request.
See Estimate-Time Rights on page 22 and Estimate Export Time on page 85.
11 Click Export to begin the export process.
After the export operation completes, a summary report of the export operation results
appears. See View a Summary Report on page 129.
Export by Workload
Use this export method to choose a QCD database and multiple workloads for export and to
define the details for the specific emulation information to capture.
To export by workload
1
Click Workload.
In the File name box, type a file name for the exported emulation information.
By default, the File Name box displays the name of the target system specified when
connecting.
Specify a path to the folder in which to save the file named in step 3 by doing one of the
following:
By default, the In Folder box displays the path specified in the Options dialog box. See
Directory Options on page 53.
5
Click OK.
71
Select a QCD database to be the source of the workload information by doing one of the
following:
Click
[Optional] To load index recommendations for the selected workload, do one of the
following:
ii
Press Enter.
72
Click Add.
Click Remove.
Note: For a workload without any recommendations, the Index tag and Recommendation
Time boxes are empty.
11 [Optional] To customize the headings under Workload Information or Selected Workload:
a
12 [Optional] Under Export Options, select check boxes to define the exported information.
The Export Options dialog box appears. The options available in this dialog box depend on
the selections made under Export Options on the Export By Workload dialog box.
14 [Optional] Click Estimate Time to see the estimated time required to process the export
request.
See Estimate-Time Rights on page 22 and Estimate Export Time on page 85.
15 Click Export to begin the export process.
After the export operation completes, a summary report of the export operation results
appears. See View a Summary Report on page 129.
Note: The Partition Tag column in the workload information and selected workloads
displays the partition recommendation tag name. When a partition recommendation tag
is displayed, the Index Tag column is blank. When the Index Tag column displays an index
tag, the Partition Tag column is blank.
Export Options
This section describes the purpose of each check box and explains how to use each option.
Check boxes also can be used in combination.
Select check boxes under Export Options, located in the export dialog boxes (Export By Query,
Export By Database, and Export By Workload), to define the information exported from a
target system. Availability of the check boxes varies according to the type of export selected.
73
When exporting by query and either typing a query manually or loading a query from a file,
the execution plans are captured and exported depending on the options selected for
Execution Plans, Export Plans in XML (Customization option), and Demographics as described
below.
Export Plans
in XML
Execution
Plans
Demographics
Description
Checked
Checked
Unchecked
Unchecked
Checked
Unchecked
Checked or
Unchecked
Checked
Checked
During an import operation, the plan is imported into the database listed in the QCD Name
box. If the Execution Plans check box is selected and the Export table data used by query
optimization check box is selected when customizing options (see Customization Options on
page 49 for more information), table data used by query optimization is captured.
For more information, refer to SQL Request and Transaction Processing B035-1142-mmyx.
Click Options, when available, to display the Export Options dialog box and modify the default
settings for:
Cost parameters
Cost profiles
Demographics
RAS
After defining the options, Teradata SET can be used to estimate how long the export will take
given the options selected. See Estimate Export Time on page 85.
All
Select the All check box to capture all of the elements listed in the dialog box except
demographics. This option can be used to capture the TLE information (or black-box test
environment) of specific, problem-causing queries to simulate the production environment
on a test system for debugging. To include demographics, select the Demographics and All
check boxes. See Demographics on page 78.
Cost Parameters
Select the Cost Parameters check box to export the Optimizer environmental cost parameters
and DBS Control information from a target system. Cost parameters are captured from the
system Globally Distributed Object.
74
75
Option
Description
Set Costs
Set and then export the cost parameters for a given row.
This option is available only when an entry exists in
SystemFE.Opt_Cost_Table. Only one cost parameter can be set
for a system. It ensures that the Optimizer ignores the current
system parameters and uses the new parameters when
generating an execution plan. Using this option is similar to
using a DIAGNOSTIC SET COST statement.
Note: This option is available only when exporting by query.
TLE must be turned on before setting cost parameters. Be
aware that TLE might cause system performance degradation.
For more information about TLE, refer to SQL Request and
Transaction Processing B035-1142-mmyx.
Click OK to close the Export Cost Parameters dialog box and return to the Export Options
dialog box.
Cost Profiles
Select the Cost Profiles check box to export cost profiles from a target system.
76
Description
77
Option
Description
Click OK to close the Export Cost Profiles dialog box and return to the Export Options
dialog box.
Demographics
Select the Demographics check box to export information about tables (demographic data).
Demographics can only be captured and imported when a QCD is specified during an export
operation. Captured demographics are collected in the specified QCD. To export
demographics information in addition to the information exported when All is selected, select
the Demographics check box.
Depending on the type of export operation performed, this feature either captures
demographics of the tables and indexes referenced in a query or samples of all of the tables in
a given database.
78
The Export Demographics dialog box appears and displays a list of the tables selected for
export.
Description
Capture Current
Demographics
79
The Demographics interface opens. Use the interface to display demographic data in
various formats. For more information about the Demographics interface, refer to
Teradata Index Wizard User Guide B035-2506-mmyx.
5
Click OK to close the Export Demographics dialog box and return to the Export Options
dialog box.
Execution Plans
Select the Execution Plans check box to export (in relational format) the Optimizer execution
plans that are created for queries. A DUMP EXPLAIN script of the queries also is captured.
Execution plans are selected for export based on the type of export operation: by query, by
database, or by workload.
Note: When the Execution Plans check box is selected, Explain Text, Step Report, and
Summary Information are also captured and displayed in the Import window.
Execution plans can only be exported and imported when a QCD is specified for the
export operation and the Execution Plans and Demographics check boxes are selected. If
selected, demographics information is collected in the QCD.
Select the Query Capture Database and the Execution Plans check boxes.
80
From the Export by Database dialog box, select a QCD database from the List of
Objects pane.
Object Definitions
Select the Object Definitions check box to export the data model and the DDL text of selected
objects or the objects referenced by a given query. Use this option to export the details of the
structure and instances of the objects used by a given query.
Exported object definitions are used to create the tables, views, macros, triggers, indexes,
stored procedures, User Defined Functions (UDFs), and UDTs on a test system. Object
definitions are selected for export based on the type of export operation.
When exporting by query, selecting the Object Definitions check box exports the UDFs and
UDTs returned by the SHOW QUALIFIED statement on the query.
When exporting by database, selecting the Object Definitions check box exports the UDTs
referenced by objects added for export and the UDTs added manually for export.
When exporting by workload, selecting the Object Definitions check box exports the UDFs and
UDTs returned by the SHOW QUALIFIED statement on the queries.
Note: While exporting UDFs, TSET retrieves only the CREATE/REPLACE FUNCTION DDL,
as TSET cannot retrieve UDF code files (source, header, or object). The user must supply the
UDF code files. TSET displays the File Open Dialog screen for browsing the UDF code files
during export. The screen title includes the UDF filename for C and C++ UDFs. For JAVA
UDFs, the JAR_ID and Java ClassName are included in the screen title. The supplied UDF
code filenames are copied to the Export path.
If C and C++ UDF code files are not copied to the export path, the pack operation fails.
If Java UDF code files are not copied to the export path, the pack operation does not fail, but
the Java UDF code files must be moved manually from the production system to the test
system.
Missing code files are displayed at the end of the export operation, and before an import
operation.
QCD Data
Select the QCD Data check box to export all execution plans, workloads, QCD statistics, and
demographics from a QCD database. This option applies only to databases marked as QCD
81
when defining the export-by-database operation. At least one database must be marked as
QCD for this option to be available.
Note: This option applies only to QCD databases with QCF version 03.00.00 or later.
Note: No more than 128 tables can be selected in the current session. However, an
unlimited number of rows can be exported from SystemFE.Opt_RAS_Table.
3
82
Description
83
Option
Description
Set Samples
Set the RAS for the selected row before exporting. This ensures
that the Optimizer uses this set of samples when generating an
execution plan. Only one RAS can be set for each table selected.
Note: This option is available only when exporting by query.
Click OK to close the Export Random AMP Samples (RAS) dialog box and return to the
Export Options dialog box.
Note that the option chosen is utilized for the remaining Duplicate Random AMP Sample.
Option
84
Description
Statistics
Select the Statistics check box to export statistics based on the type of export operation.
When exporting by query, this option exports the statistics that were collected (if any) for the
database objects referenced in the selected list of queries.
When exporting by database, this option exports the statistics of the database objects selected
for the export, if any were collected.
When exporting by workload, this option exports the statistics for the database objects
referenced by the workload query.
Workloads
Select the Workload check box to export specific queries and recommendations for a
workload.
Note: This option is available only when exporting by workload. See Export by Workload
on page 71.
85
86
Click Refresh to view estimates of the time needed to export each object.
[Optional] When exporting by query, a query can be removed or the estimated time for a
selected query or queries can be viewed:
a
CHAPTER 7
Use the import function to import emulation information to a test system where query plan
analysis can be performed. To prepare for an import operation:
1
The following topics explain Teradata SET import functions and options:
Reorder Databases
87
Export the information needed to emulate the target environment on the test system. See
Chapter 6: Export Methods and Options.
Import the information to the test system, modifying the import options if necessary. See
Chapter 7: Import Methods and Options.
Delete files.
Import Item
Change
Location
Cost parameters
No
Cost profiles
Data Dictionary
No
Demographics
Yes
Execution plans
Export QCD
Yes
Object definitions
Export database
Yes
RAS
SystemFE.Opt_RAS_Table
No
Statistics
Data Dictionary
No
Workload data
Export QCD
Yes
To change the owner of databases or users, use the Parent Database box in the Import Options
dialog box. To change the QCD, use the Target QCD box in the Import Options dialog box. See
Change Import Options on page 91.
To change the location or target database where objects are created, use the Rename function
in the Import window. See Rename a Target Database on page 105.
88
From the Open dialog box, select the .mcf file to use when importing information.
The preview pane (right pane) displays information about the file such as source system
information. To close the preview pane, clear the Show Preview check box.
Note: A confirmation message displays the name of any missing file along with a
statement that the corresponding option cannot be imported. Close the message box to
open the Import window.
3
Click Open.
The Import window opens and displays the file name in the title bar.
89
Note: The Import menus and toolbar differ somewhat from those in the main window. See
Import Window on page 36.
5
[Optional] Perform any of the following procedures before completing the import:
Click
90
Note:
To import C and C++ UDF code files that reside on the Client, the code files (source,
header, or object) must be available in the Import path. Object files must have been
generated to be compatible with the compiler/linker of the Database Server.
To import C and C++ UDF code files that reside on the Sever, files must be copied to the
appropriate path, as specified in the CREATE FUNCTION DDL, on the Server. If a path is
unspecified, the files must be copied to the default path. Refer to the Database
Administration manual for default paths.
To import Java UDF code files, the JAR file, supplied by the user during the export
operation, must be registered using the external stored procedure SQLJ.INSTALL_JAR().
Registering the JAR file with the JARID and ClassName specified in the CREATE
FUNCTION DDL can be done outside TSET using a BTEQ session.
91
Option
Description
92
Option
Description
Target DBQL
Specify the DBQL listed as the destination DBQL for the import of
XML plans.
Note: This option is only available when importing DBQL XML
Plans.
If a target DBQL is not selected, then the DBQL Database from which
the plans are exported becomes the target DBQL.
If the target DBQL is DBC, the import is terminated.
If the Target DBQL database specified does not exist, Teradata SET
either prompts for the creation of the DBQL, or it automatically
creates the DBQL depending on the selected import error handling
options. See Error-Handling Options on page 54.
QCD Selection
Target QCD
Specify the QCD listed as the destination QCD for the import
operation.
Note: This option is available only when importing execution plans,
QCD data, demographics, or workloads. If no target QCD is specified,
the information is imported into the QCD from which it was
exported. If the database does not exist, Teradata SET either prompts
for the creation of the QCD or automatically creates the QCD,
depending on the import error handling options. See
Error-Handling Options on page 54.
Source Version
Current Version
Display the QCF version number of the system to which Teradata SET
is connected.
Import Options
Object Definitions
Execution Plans
QCD Data
93
Option
Description
Cost Profiles
Statistics
Demographics
Workloads
Cost Parameters
DBQL Plans
Miscellaneous Options
Only synchronize
version of created
tables
Import original
statistics collection
timestamp
Type an owner name for any databases or users created during the import operation.
Click
to load the available databases and select one from the list.
By default, the Parent Database box displays the database name established when
logging on.
3
94
[Optional] In the Target QCD box, specify the destination QCD for the import by doing
one of the following:
Click
to load the available QCDs and select one from the list.
[Optional] Under Import Options, clear check boxes to exclude items from the import.
This results in a partial import. Options are available only if they were included in
the export.
[Optional] Click Error Handling to change how errors are handled during the import
operation.
See Error-Handling Options on page 54.
Click OK to close the dialog box and return to the Import window.
Note: A
appears next to the object in the left pane that corresponds to a selection
made under Import Options in the Import Options dialog box (see step 4).
[Optional] Click
The left pane (import tree) features an expandable view of the database objects, object
definitions, statistics, and RAS that can be imported.
The right pane provides information about any object selected in the left pane.
95
For example, see Figure 9. When an object definition is selected in the left pane, the associated
information appears in the right pane.
Figure 9: Importing Selected Objects
A check mark next to an object indicates that the object is selected for import. A check
mark appears next to every item by default.
Note: If there is no check mark next to an object, it is not available for import. To import
an object that is not included in the list of available objects, see Change Import Options
on page 91.
3
Clear the check box next to any database object that is not intended for import.
Note: Clearing a check box at the parent level automatically clears all check boxes at the
child level. Check boxes at the same child level can be selected separately.
96
[Optional] Click
Use this procedure only when importing to a hardware platform with dissimilar byte layout.
1
In the Source Machine Byte Order box, select one of the following:
Little-Endian
Big-Endian
In the Target Machine Byte Order box, select one of the following:
Little-Endian
Big-Endian
Click OK.
Make sure the check box located next to the RAS tag is selected so it is included in the
import.
[Optional] Click
97
Object definitions
RAS
Statistics
Cost profiles
From the Import window, select an object in the left pane to edit.
Corresponding information is displayed in the right pane.
Click
Statistics
RAS
Cost parameters
Cost profiles
Click
[Optional] Click
Permanent space requirements can be specified before importing objects from a target system.
Change the permanent space allotment to avoid messages about permanent space.
Note: Existing databases are highlighted in blue. Space cannot be specified for existing
databases.
The only editable box is Scale Factor(KB). The only editable column is User Specified
Space(KB).
Option
Description
Information
Warnings
99
Option
Description
Scale Factor(KB)
Databases
Database Name or
Query Capture Database
Calculated Space(KB)
100
Parent Database
Option
Description
Space Available(KB)
Space Required(KB)
Note: Selecting stored procedures in the left pane (import tree) does not affect the
permanent space calculation.
2
Description
Description
101
Command
Description
[Optional] Click
102
When the SQL Statement Failed dialog box appears, do one of the following:
Type a statement to grant the necessary privileges or increase the permanent space.
ii
Click Retry.
Click Retry to retry the failed statement if the error has been corrected by other means.
Click Ignore to ignore the error and proceed with the import of the remaining objects.
103
The right pane displays information about the file, such as source system information, the
exported options, and the export date. To close the right pane, clear the Show Preview
check box.
3
Click Open.
[Optional] Connect to a Teradata Database and import the new version to a test system.
See Import to a Test System on page 87.
Object definitions
Statistics
RAS
Cost parameters
Cost profiles
To save changes
1
Click Save.
A new .mcf file and corresponding data files are created containing the changes.
104
The Existing Databases dialog box appears and displays a list of existing databases and
database owners.
Statistics
RAS
Use the Replace dialog box to change the database name for all object definitions.
105
The Open dialog box appears and displays the available .mcf files.
2
Click Open.
Press Enter.
[Optional] To prevent the message from appearing each time this procedure is performed,
select the Dont ask this question again check box.
[Optional] To keep the original database name in the object definitions, click No.
The status bar displays:
Target database has been changed from old name to new name
The target database name is changed. The object definitions are not renamed. Skip the
remaining steps in this procedure.
10 [Optional] To update the name change in the object definitions, click Yes.
106
Option
Description
Find what
Replace with
Replace the database name listed in the Find what box with
this database name.
Match case
Search for characters that match the case used in the Find
what box.
Click Find Next to find the next matching instance in the object definitions.
Click Replace All to replace all instances of the database name in a single object
definition.
The total number of replacements appears at the bottom of the Replace dialog box.
Click Replace in all DDLs to replace all instances of the database name in all object
definitions.
The total number of replacements appears at the bottom of the Replace dialog box.
Note: The first time Replace is clicked, the Allow Edit command becomes available on
the Edit menu. When editing is allowed, object definitions, RAS, statistics, cost
parameters, DBS Control information, and cost profiles can be modified in the right
pane of the Import window.
107
dialog box.
14 To commit the name change, click
From the Import window, select the database that requires its name to be restored.
Click
A message appears stating that the target database name has been restored and noting that
any changes made to the object definitions must also be undone.
3
108
Reorder Databases
After performing an export operation, reorder the databases in the emulation information to
resolve referential integrity dependencies during import.
To reorder databases
This procedure is performed in the Import window and can be performed while offline or
while connected to a Teradata Database.
1
Click
In the left pane (import tree), drag the database icons to change their order.
Note: Only database icons can be reordered and only with other database icons at the
same level.
4
[Optional] Click
109
The Source Machine Configuration dialog box appears and displays details about the
machine from which the system information was exported.
Figure 10: Source Machine Configuration
Row Name
Description
Exported Option
Version
Release
Date
Time
CharSet
Machine Name
Name of the machine from which the system information was exported
Note: For a CLIv2 connection, the system name typed in the hosts file. For
an ODBC connection, the name typed under Teradata Server Info in the
ODBC Driver Setup for Teradata Database dialog box. See Chapter 2:
Connection Methods.
Number of AMPs
Number of PEs
Number of Nodes
Model
110
Note: The physical configuration boxes (Number of AMPs, Number of PEs, Number of
Nodes, and Model) are only available if the user has necessary access rights on the target
system. See Export Rights on page 19.
2
[Optional] Click
Click Open.
Click
The Estimated Time dialog box appears and displays time estimates for each element being
imported along with a total estimated time for the import operation.
111
[Optional] Click
112
CHAPTER 8
Administrative Functions
Teradata SET includes many administrative functions to facilitate the export and import
of data.
See the following topics to learn about Teradata SET administrative features:
Set TLE
Use the Set Target Level Emulation dialog box to define RAS, cost parameters, and cost
profiles. The Set Target Level Emulation dialog box can be accessed from either the main
window or from the Import window.
Note: This procedure explains the process of setting IFP and system levels for cost parameter
emulation or cost profile emulation that can only be set by a DBC or SystemFE user. This
limitation does not apply to setting RAS emulation. For more information, refer to SQL
Request and Transaction Processing B035-1142-mmyx.
113
Use the TLE function at any time during export and import operations. The following
scenario is typical:
1
Apply TLE using the Set Target Level Emulation feature in Teradata SET.
Reset RAS, cost parameters, and cost profiles on the test system using the Reset feature in
Teradata SET.
To set TLE
Before using Teradata SET to control emulation, turn on the TLE feature for the test system.
Using the DBS Control utility, set the general field 22 (Target Level Emulation) to TRUE. For a
description of the DBS Control utility, refer to Utilities B035-1102-mmyx.
1
The Set Target Level Emulation dialog box appears and displays the available emulation
information on the current system. The Set RAS tab is selected by default.
114
Select one of the following to define the level of the RAS emulation:
Session
System
Define the level of the cost emulation by selecting one of the following:
Session
IFP
System
Reset TLE
Reset the test system TLE back to the system default values after importing RAS, cost
parameters, and cost profiles.
To reset TLE
Before resetting the test system default values, turn on the TLE feature for the test system.
Using the DBS Control utility, set the general field 22 (Target Level Emulation) to TRUE. For a
description of the DBS Control utility, refer to Utilities B035-1102-mmyx.
115
The Reset Target Level Emulation dialog box appears with the Reset RAS tab selected by
default. Emulation is turned on for the tables shown.
Note: A sample can be reset at both session and system levels. Drag the scroll box to the
right to see the Level column, which contains the reset level of the samples.
3
Click the Reset Costs tab to display the cost parameters currently in effect at the
request (if set), session, IFP, and system levels.
116
Click the Reset Cost Profile tab to display the cost profiles currently in effect at the
session, IFP, and system levels.
117
Note: To select more than one cost profile, hold Shift and click with the left mouse
button.
c
5
Check the main window for verification that the reset was successful or for diagnostic
information explaining why the reset was unsuccessful.
Select the Use SQL Assistant rather than the Execute SQL window with ODBC
connectivity check box to use Teradata SQL Assistant instead of Execute SQL as the
query editor when connected to Teradata Database with ODBC connectivity.
Clear the Use SQL Assistant rather than the Execute SQL window check box to use the
Execute SQL window.
Note: When using a CLIv2 connection, Execute SQL is used regardless of how this option
is set.
3
Click Apply.
To test a query
1
Depending on how the query tool interface is set up and the connection mode, either
Teradata SQL Assistant or the Execute SQL main window opens. See the procedure To set
the query tool interface on page 118.
2
[Optional] If using Teradata SQL Assistant, refer to Teradata SQL Assistant for Microsoft
Windows User Guide B035-2430-mmyx.
[Optional] If using the Execute SQL main window, do one of the following:
118
Type the query to be tested in the Untitled window, which then becomes the Query
window.
If queries exist in the History window, click the cell under the Query column to
select one.
The query appears in the Query window.
Click
The results appear in the status bar at the bottom of the window.
5
Click
Click Open.
The query appears in the Query window.
Click
The results appear in the status bar at the bottom of the window.
119
The Using Query display box shows the query containing the USING clause.
The Using Variables display box shows the values for the Name and Datatype variables.
For the Value variable, enter the data values in the Value column.
Click OK or Cancel:
120
Note: All .pack files contain non-ASCII characters, so use binary mode when transferring
them using ftp.
To pack files
1
Click Pack.
The files associated with the selected .mcf file are combined into one file with a .pack
extension. UDF code files specified in response to the Browse for UDF File Open Dialog
during the Export operation are also included in the .pack file.
121
To unpack files
A pack file must be created in order to use this procedure. See the procedure To pack files on
page 121.
1
The Unpack dialog box appears and displays all available .pack files.
Click Unpack.
122
To undo an import
1
The Open dialog box appears and displays the available .mcf files.
Click Open.
123
The Undo Import File dialog box appears and displays the .undo file name in the title bar.
The .undo file is created during the import process and named using the following format:
file name.current timestamp.undo.
Under Undo Import Options, select the check boxes for the information to undo (clean up)
in the database.
Click Error Handling to change how errors are handled during the undo-import (cleanup)
operation.
See Error-Handling Options on page 54.
124
.ddl
.col
.dem
.log
.opt
.pack
.qcd
.ras
.rpt
.sql
.undo
.mcf
Note: If necessary, the deleted files can be restored from the Recycle Bin. The files are
automatically restored to the appropriate directory.
To delete files
1
The Delete Files dialog box appears and displays the available .mcf files.
2
125
[Optional] To remove the .pack file during the delete operation, select the Delete Pack File
check box.
Click Delete.
A confirmation message appears.
Note: During the Unpack and Delete File Operation, the user is prompted to confirm
overwriting or deletion of the UDF code files. The UDF files are also displayed with the
normal TSET files, such as .mcf, .log, .ddl, etcetera.
126
To view the log file for the current Teradata SET session
1
The Open dialog box appears and displays the available log file. The File name box displays
the name of the most recently used log file, by default.
127
Click Open.
The log appears in the main window.
128
Click
129
Click Open.
The report appears and displays a summary of the corresponding operation.
For detailed information about the operation, view the log file.
130
When the SQL Statement Failed dialog box appears, do one of the following:
Enter another SQL statement to grant the necessary privileges or increase the
permanent space.
ii
Click Retry.
Click Retry to retry the failed statement if the error has been corrected by other means.
Click Ignore to ignore the error and proceed with the import of the remaining objects.
When the Grant access privilege dialog box appears, displaying the
missing-access-privilege information, click Failed Statement to view the SQL causing the
error.
Click Retry to retry the failed statement when the required access privileges have been
granted using a application other than Teradata SET.
[Optional] In the Grant Statement box, enter the grant statement with the missing access
privileges.
Note: If the Grant Statement box is left empty, Teradata SET automatically generates the
grant statement with the required access privileges.
Select the Grant missing access rights without prompting check box to grant further
missing privileges without prompting the Grant access privilege dialog box.
Select the Submit grant statement from administrators session check box.
131
A dialog box appears, allowing entry of logon information. Which dialog box appears
depends on the connectivity type in use.
5
For ODBC connectivity, enter logon information in the Select a Data Source dialog
box.
For CLI connectivity, enter logon information in the Connect to Teradata Database
dialog box.
Note: The user ID entered must have the right to grant access privileges.
6
Click OK.
132
Click Yes to close the message and return to the main window.
133
Tracks elements (such as the object definition) that are selected and exported
Contains pointers to the raw data files that are created during the export process
Contains a version number, release number, and the date and time the system information
was exported from the target data source
File Type
File Extension
Saved During
Cleanup files
.undo
Import
Control information
.mcf
Export
.opt
Export
Demographics
.dem
Export
.qcd
Export
Log files
.log
Export
Import
Undo (cleanup)
Object definitions
.ddl
Export
Packed files
.pack
Pack
RAS
.ras
Export
SQL statements
.sql
Export
Statistics
.col
Export
Summary reports
.rpt
Export
Import
Undo (cleanup)
134
Glossary
A
Access Module Processor See AMP.
administrator
AMP Access Module Processor. A virtual processor that receives steps from a PE and
performs database functions to retrieve or update data. Each AMP is associated with one
virtual disk, where the data is stored. An AMP manages only its own virtual disk and not the
virtual disk of any other AMP.
C
Call-Level Interface, Version 2
See CLIv2.
D
database A related set of tables that share a common space allocation and owner. A
collection of objects that provide a logical grouping for information. The objects include
tables, views, macros, triggers, and stored procedures. See also column, field, row, and table.
Database System
See DBS.
data definition The statements and facilities that manipulate database structures and the
Data Dictionary information kept about these structures. These statements include CREATE,
DROP, ALTER, and MODIFY.
Data Definition Language See DDL.
Data Dictionary In Teradata Database, the information automatically maintained about all
tables, views, macros, databases, and users known to the Teradata Database system. Includes
information about ownership, space allocation, accounting, and access-right relationships
135
Glossary
between those objects. Data Dictionary information is updated automatically during the
processing of Teradata SQL data-definition statements. The parser uses the Data Dictionary to
obtain information needed to process all Teradata SQL statements.
data manipulation language See DML.
DBS
Database System
DBS Control information A group of fields used by Teradata Database for debugging and
diagnostic purposes, establishing known global system values, and conducting performance
tuning.
DDL Data Definition Language. In Teradata SQL, the statements and facilities that
manipulate database structures (such as CREATE, MODIFY, DROP, GRANT, REVOKE, and
GIVE) and the dictionary information kept about those structures. In the typical,
prerelational data management system, data definition and data manipulation facilities are
separated. The data definition facilities are less flexible and more difficult to use than in a
relational system.
DML data manipulation language. In Teradata SQL, the statements and facilities that
manipulate or change the information content of the database. These statements include
INSERT, UPDATE, and DELETE.
domain name A group of computers whose host names (the unique name by which a
computer is known on a network) share a common suffix, which is the domain name.
E
export Refers to extracting or transferring system information from the tables and views of
a given Teradata Database and saving that information so it can be manipulated or pulled into
another system.
F
field The basic unit of information stored in a Teradata Database. A field is either null or has
a single numeric or string value. See also column, database, row, and table.
G
Globally Distributed Object A data structure that is shared by all of the virtual processors
in the Teradata Database system configuration.
I
import The process of pulling system information into a program. To add system
information from an external source to another system. The system receiving the data must
support the internal format or structure of the data.
136
Glossary
J
join A select operation that combines information from two or more tables to produce a
result.
L
log A file that records events. Many programs produce log files, which can be reviewed to
determine what is causing a problem. Log files use the file extension .log.
M
macro A set of Teradata SQL statements stored by Teradata Database and executed by a
single EXECUTE statement. Each macro execution is implicitly treated as a transaction.
multi-threading An option in Teradata SET used to speed up export and import operations
with multiple connections.
N
name A user-supplied word that refers to an object such as a column, database, macro,
table, user, or view.
null
O
object In object-oriented programming, a unique instance of a data structure defined
according to the template provided by its class. Each object has its own values for the variables
belonging to its class and can respond to the messages or methods defined by its class.
object definition The details of the structure and instances of the objects used by a given
query. Object definitions are used to create the tables, views, macros, triggers, join indexes,
and stored procedures in a database.
ODBC Open Database Connectivity. Under ODBC, drivers are used to connect applications
with databases. The ODBC driver processes ODBC calls from an application, but passes SQL
requests to Teradata Database for processing.
Open Database Connectivity See ODBC.
P
parameter A variable name in a macro for which an argument value is substituted when the
macro is executed.
Parent Database box The Parent Database box specifies the owner for any databases or
users created during an import operation. Permanent storage space is taken from the owning
database or user for the new database or user. The Parent Database box corresponds to the
137
Glossary
FROM database_name clause in the CREATE DATABASE and CREATE USER SQL
statements. This box establishes a relationship in the hierarchy of ownership.
parser A program executing in a PE that translates user-entered Teradata SQL statements
into the steps that accomplish the users intentions.
Parsing Engine
See PE.
Q
QCD Query Capture Database. A database of relational tables that store the steps of any
query plan captured by the QCF.
QCF Query Capture Facility. Provides a method to capture and store the steps from any
query plan in a set of predefined relational tables called the QCD.
query
See QCF.
R
random AMP sample See RAS.
RAS random AMP sample. An arbitrary sample from an AMP. These are samples of the
tables in a query or all of the tables in a given database. See also AMP.
Relational Database Management System
See RDBMS.
row The fields that represent one entry under each column in a table. The row is the smallest
unit of information operated on by data-manipulation statements. See also column, database,
field, and table.
138
Glossary
S
session In client software, a logical connection between an application program on a host
and Teradata Database. Starting a session permits the application program to send one request
at a time to, and receive one response at a time from, Teradata Database.
SET
Single Sign On Allows users of Teradata Database on Windows 2000 systems to access the
Teradata Database based on their authorized network user names and passwords. This feature
simplifies the procedure requiring users to enter an additional user name and password when
logging on to Teradata Database using client applications.
SQL Structured Query Language. Pronounced as separate letters, S Q L. SQL is a
standardized query language for requesting information from a database. SQL consists of a set
of facilities for defining, manipulating, and controlling data in a relational database.
statement A request for processing by Teradata Database that consists of a keyword verb,
optional phrases, and operands. It is processed as a single entity.
statistics The details of the processes used to collect, analyze, and transform the database
objects used by a given query.
stored procedure Combinations of procedural and nonprocedural statements run using a
single call statement.
Structured Query Language
System Emulation Tool
See SQL.
See SET.
T
table A two-dimensional structure made up of one or more columns with zero or more
rows that consist of fields of related information. See also column, database, field, and row.
target system A Teradata Database from which Optimizer-specific information is exported
for modeling on a second, test system. Also known as a production system.
Target Level Emulation
See TLE.
139
Glossary
U
UDT User-Defined Type. A data type defined by someone other than Teradata. UDTs come
in two variations: distinct and structured.
user A database associated with a person who uses a Teradata Database. The database stores
the persons private information and accesses other Teradata Databases.
User-Defined Type
See UDT.
V
view An alternate way of organizing and presenting information in Teradata Database. A
view, like a table, has rows and columns. However, the rows and columns of a view are not
directly stored by Teradata Database. They are derived from the rows and columns of tables
(or other views) whenever the view is referenced.
X
X views An option in Teradata SET to set a restricted view of plans in the QCD information.
See Customization Options on page 49.
140
Index
Symbols
.col file
deleting 34, 125
saving 134
.ddl file
deleting 34, 125
saving 134
.dem file
deleting 34, 125
saving 134
.log file
saving 134
.mcf file
deleting 34, 125
packing 120
saving 134
undoing imported files 123
.opt file
deleting 34, 125
saving 134
.pack file
creating 120
deleting with .mcf file 126
saving 134
.qcd file
deleting 34, 125
saving 134
.ras file
deleting 34, 125
saving 134
.rpt file
saving 134
.sql file
saving 134
.undo file
deleting 34, 125
saving 134
A
About Teradata System Emulation Tool dialog box 35
About Teradata System Emulation Tool menu command 35
Account String box 31
acronym 135
Allow Edit menu command 37
AMPs
viewing number of 110
B
benefits of Teradata SET 15
Browse for Folder dialog box 54
C
Capture Current Cost Profile export option 77
Capture Current Costs export option 76
Capture Current Demographics export option 79
Capture from AMPs export option 84
Capture from QCD Database export option 79
Capture from Source export option
cost parameter 76
cost profile 77
RAS 83
Change PermSpace dialog box 99
Change PermSpace menu command 39
changing
audible notification default 50
displaying logon dialog box at startup 50
error handling options 54
Execute SQL default 51
font color 34, 38
font size 34, 38
font style 34, 38
log file default 50
log SQL statement default 50
multi-threading default 51
permanent space 98
RAS byte order 97
SQL Assistant default 51
using X views 50, 51
cleanup See undo import
CLIv2
choosing connectivity type 53
connecting to Teradata Database 29
connectivity 19
defining IP address 27
editing hosts file 27
141
Index
required version 19
setting up a connection 27
command line
exporting by database 44
exporting by query 45
exporting by workload 45
importing 46
log on 43
switches 41
syntax examples 43
undo (clean up) 47
compatibility
CLIv2 19
ODBC driver 19
configuration
viewing source machine 109
Connect menu command 33
Connect to Teradata Database dialog box 30
connection status 35
connectivity
choosing connectivity type 53
CLIv2 27, 29
CLIv2 required version 19
ODBC driver 25, 29
ODBC driver version 19
control file 133
control information file extension 134
Copy menu command 37
copyright statement 36
cost parameter
default import location 88
defining for export 74
export option 74
import location 88
privileges for exporting 20
privileges for importing 21
privileges for undoing an import 22
resetting for TLE 115
saving modifications 104
cost parameters
file extension 134
Cost Parameters check box 74
Cost Parameters option
Import Options dialog box 94
Cost Parameters, DBS Control, and Cost Profile records
check box 57
cost profile
default import location 88
defining for export 76
export option 76
importing 88
privileges for exporting 21
privileges for importing 22
privileges for undoing an import 23
142
D
data demographics See demographics
data dictionary
statistics default import location 88
data source
defining 25
selecting 29
database
renaming 105
reordering 109
reversing the renaming 108
saving name change 104
DBS Control information
saving modifications 104
DBS Control utility
setting TLE 114
Default Database box 61
default setting
audible notification 50
displaying logon dialog at startup 50
error handling 54
Execute SQL 51
import location for cost parameter 88
log file creation 50
multi-threading 51
SQL Assistant 51
SQL statement log 50
Define Data Source menu command 35
Delete dialog box 34
Delete Files dialog box 125
Delete Files menu command 34
Delete Pack File check box 126
deleting
.pack file with .mcf file 126
exported file 125
file recovery after 125
demographics
default import location 88
export option 78
Index
E
Edit menu
Allow Edit command 37
Apply Changes command 38
Copy command 37
Cut command 37
Find command 37
Import window 37
Paste command 37
Replace command 37
Select All command 37
Undo command 37
edit mode
Edit menu commands 37
turning on 37
editing
renaming a database 105
reordering databases 109
emulation-process overview 17
error handling
default options 54
retrying failed import operation 102, 130
Error Handling button 124
Estimate Time button
exporting by database 71
exporting by query 61
exporting by workload 73
Estimate Time function
privileges 22
Estimate Time menu command 38
Estimated Time dialog box
displaying 38
143
Index
export option
defining 73
demographics 78
during export by query 62, 63, 66
execution plans 80
exporting by database 70
exporting by workload 73
find objects 69
options for capturing during export by query 64
Export Options dialog box 74
Export Random AMP Samples (RAS) dialog box
Capture from AMPs option 84
Capture from Source option 83
selecting tables 82
Set Samples option 84
exporting
choosing options 73
defining cost parameters for 74
defining cost profiles for 76
demographics 78
estimating time 85
execution plans 80
from the command line 44
menu command 34
object definition 81
privileges 19
QCD data 81
RAS 82
statistics 85
workloads 85
exporting by database
estimating time 71, 73
export options 70
find objects 69
from the command line 44
how to 68
exporting by query
entering manually 62
estimating time 61
from the command line 45
how to 59
loading a query from a DBL 64
loading existing query 62, 63
exporting by workload
from the command line 45
how to 71
F
file
deleting exported 125
file extension 133
file management
deleting exported files 125
144
G
Grant access privilege dialog box 131
H
Help
online 23
Help menu
About Teradata System Emulation Tool command 35
Help Topics command 35
main window 35, 39
Help Topics menu command 35
hosts file
editing 27
I
IFP level 113
Ignore Teradata Database errors check box
error-handling options 55
retry failed import 130
retry failed SQL statement 102
import
menu command 34
retrying failed import operation 130
Import menu command 34, 36
Import Options dialog box
changing import options 92
Cost Parameters option 94
Cost Profiles option 94
Current Version option 93
Index
Demographics option 94
Execution Plans option 93
Import Options 93
Import window 38
Miscellaneous Options 94
Object Definitions option 93
Only synchronize version of created tables option 94
Parent Database Info 92
Parent Database option 92
QCD Data option 93
QCD Selection 93
Random AMP Samples option 93
Source Version option 93
Statistics option 94
Target QCD option 93
Workloads option 94
Import Options menu command 38
Import Options option
Import Options dialog box 95
import tree
reordering databases 38
saving changes to selection in 36
Import window
Edit menu 37
File menu 36
opening 36
Options menu 38
View menu 38
importing
cost parameter 88
cost profile 88
default import locations 88
demographics 88
execution plan 88
from the command line 46
full import 89
how to 89
import options 92
object definition 88
partial import example 96
performing partial import 95
privileges 21
RAS 88
reordering databases 109
retrying failed import operation 102
statistics 88
workload data 88
input command file
from the command line 47
Input USING values 119
INSERT EXPLAIN 74
installation 19
interface
CLIv2 connectivity 19
CLIv2 setup 27
ODBC connectivity 19
IP address
defining for CLIv2 27
L
loading a query from a DBL 64
loading existing queries 62, 63
log file
changing default setting 50
file extension 134
menu command 34
viewing 127
Log File menu command 34
Log only failures in Summary Report check box 55
Log SQL statements check box 50
logging on
changing default setting 50
from the command line 43
M
machine configuration
privileges for exporting 20
viewing 109
macro
deleting exported files 125
required privileges 20
main window
changing font 34
File menu 33
functions and features 33
Help menu 35, 39
navigating 33
opening Teradata SET 28
toolbar 33
Tools menu 34
View menu 34
mark as QCD 70
menu
Import window 36
main window 33
menu command
Import window
Allow Edit 37
Apply Changes 38
Change PermSpace 39
Copy 37
Cut 37
Estimate Time 38
Existing Databases 38
Exit 37
Find 37
Font 38
145
Index
Import 36
Import Options 38
Order Database 38
Paste 37
Replace 37
Save As 36
Select All 37
Set TLE 38
Source Machine Configuration 38
Status Bar 38
Tool Bar 38
Undo 37
main window
About Teradata System Emulation Tool 35
Connect 33
Customize Data 34
Define Data Source 35
Delete Files 34
Disconnect 33
Execute SQL 35
Exit 33
Export 34
Font 34
Help Topics 35
Import 34
Log File 34
Options 35
Pack 34
Reset TLE 34
Set TLE 34
Status Bar 34
Summary Report 34
Toolbar 34
Undo Import 34
Unpack 34
Miscellaneous Options
Import Options dialog box 94
multi-threading
changing default setting 51
N
navigation
main window 33
nodes
viewing number of 110
number of
AMPs 110
nodes 110
PEs 110
O
object definition
default import location 88
146
export option 81
file extension 134
finding and replacing a database name 106
finding and replacing text 106
import location 88
privileges for exporting 20
privileges for importing 21
privileges for undoing an import 22
reversing the renaming 108
Object Definitions check box 81
Object Definitions option
Import Options dialog box 93
ODBC
connecting with 29
driver connectivity 19
driver setup 25
required driver version 19
selecting a data source 29
setting connectivity 53
using Data Source Administrator 25
ODBC Data Source Administrator dialog box 25
ODBC Database Administrator dialog box 35
ODBC Driver Setup for Teradata Database dialog box 26
online Help
using 23
Only synchronize version of created tables option
Import Options dialog box 94
Open dialog box
importing to a test system 89
loading existing query from a file 62
undoing an import 123
viewing log file 127
opening Teradata SET main window 28
Opt_DBSCtl_Table
default import location for cost parameter 88
Optimizer 16
Option box 57
options
changing import options 92
Options dialog box
Cost Parameters, DBS Control, and Cost Profile records
check box 57
Create log file check box 50
Display Failed SQL statement dialog check box 56
Display logon dialog at startup check box 50
Display Object exists dialog check box 56
displaying 35
Ignore Teradata Database errors check box 55
Log SQL statements check box 50
main window 30
Option box 57
Prompt to create non-existing QCDs check box 57
Provide Audible Notification check box 50
Random AMP Samples check box 57
Index
P
Pack dialog box 34, 121
pack file
creating 120
saving 134
Pack menu command 34
Parent Database box
definition 137
selecting an imported database 94
using 94
Parent Database Info
Import Options dialog box 92
Parent Database option
Import Options dialog box 92
partial import
example 96
performing 95
Paste menu command 37
Path box 54
permanent space
changing 98
stored procedure 101
permission See privileges
permspace See permanent space
PEs
viewing number of 110
physical configuration 109
preview pane
closing 104
deleting exported files 125
displaying .mcf file information 89
packing export files 121
undoing imported files 123
unpacking export files 122
privileges
Estimate Time function 22
export requirements 19
exporting
cost parameter 20
cost profile 21
demographics 21
execution plan 20
machine configuration 20
macro 20
object definition 20
QCD data 21
statistics 20
SystemFE.Opt_Cost_Table 20
SystemFE.Opt_RAS_Table 20
workload 21
import requirements 21
importing
cost parameter 21
cost profile 22
demographics 22
execution plan 21
object definition 21
QCD data 22
RAS 21
statistics 22
SystemFE.Opt_Cost_Table 21
SystemFE.Opt_DBSCtl_Table 21
SystemFE.Opt_RAS_Table 21
workload 22
SystemFE.Opt_DBSCtl_Table 20
undo import
cost parameter 22
cost profile 23
demographics 23
execution plan 22
object definition 22
QCD data 23
RAS 22
statistics 22
workload 23
undo import (cleanup) requirements 22
User-Defined Type 20
product version numbers 3, 19
Prompt to create non-existing QCDs check box 57
Provide Audible Notification check box 50
purpose of Teradata SET 15
Q
QCD
mark as 70
QCD data
export option 81
147
Index
R
random AMP sample See RAS
Random AMP Samples check box 57, 82
Random AMP Samples option
Import Options dialog box 93
RAS
Capture from AMPs export option 84
Capture from Source export option 83
changing RAS byte order 97
default import location 88
export option 82
file extension 134
importing 88
privileges for importing 21
privileges for undoing an import 22
resetting defaults for TLE 115
saving modifications 104
Set Samples export option 84
setting RAS tags for TLE 114
SystemFE.Opt_RAS_Table 88
RAS tag box 82
RAS tags
setting for TLE 114
recording SQL statement 50
recovering deleted files 125
Refresh button
recalculating import time 112
updating time estimate 38, 86
renaming a database 105
reordering databases
how to 109
Replace dialog box 106
148
S
Save As dialog box 36
Save As menu command 36
saving
cost parameter modifications 104
cost profile modifications 104
DBS Control information modifications 104
file extension when 134
file extensions for Teradata SET 133
file extensions when 134
import tree changes 36
RAS modifications 104
statistics modifications 104
Select a Data Source dialog box 29
Select All menu command 37
Select Rows button
exporting cost parameters 75
exporting cost profiles 77
Select Tables button 78
Selected Queries list 62, 63
Set Cost Profile export option 78
Set Cost Profiles tab 115
Set Costs export option 76
Set Costs tab 115
Set Samples export option 84
Set Target Level Emulation dialog box
displaying from Import window 38
displaying from main window 34
setting TLE 114
Set TLE menu command 34, 38
setting TLE
menu command 34
parameter 113
Show Preview check box 89, 104
Single Sign On 30
software
creation date 35
version information 35
software releases
supported 3
Index
T
tables
deleting exported files 125
target database
renaming 105
Target QCD box 94
Target QCD option
Import Options dialog box 93
target system
viewing configuration of 109
Teradata Database Name box 30
Teradata SET main window See main window
Teradata SQL Assistant
changing default setting 51
setting to use 51
testing a query 118
Teradata Visual Explain
capturing query plans 114
testing a query 118
TLE
resetting 115
setting 113
typical scenario 114
Tool Bar menu command 38
toolbar
main window 33
Toolbar menu command 34
tools
emulation support 18
Tools menu
Customize Data command 34
Define Data Source command 35
Delete Files command 34
Execute SQL command 35
Export command 34
Import command 34
main window 34
Options command 35
Pack command 34
Reset TLE command 34
Set TLE command 34
Undo Import command 34
Unpack command 34
transferring pack files 120
U
Undo Files box 121, 123
undo import
file extension 134
from the command line 47
menu command 34
privileges 22
Undo Import button 124
149
Index
X
X views
from DBC and QCD 51
from QCD only 50
restricted views, creating 51
V
version information 35
version numbers 3, 19
view
deleting exported files 125
View menu
Import window
Estimate Time command 38
Font command 38
Source Machine Configuration command 38
Status Bar command 38
Tool Bar command 38
main window
Font command 34
Log File command 34
Status Bar command 34
Summary Report command 34
Toolbar command 34
View Workload dialog box 72
viewing
source machine configuration 109
Visual Explain See Teradata Visual Explain
W
Warnings dialog box 61, 62
workload
default import location 88
export option 73, 85
exporting 71
file extension 134
importing workload data 88
privileges for exporting 21
privileges for importing 22
privileges for undoing an import 23
150