Sei sulla pagina 1di 148

Teradata System Emulation Tool

User Guide
Release 02.03.00
B035-2492-115A
November 2005
The product described in this book is a licensed product of Teradata, a division of NCR Corporation.
NCR, Teradata and BYNET are registered trademarks of NCR Corporation.
Adaptec and SCSISelect are registered trademarks of Adaptec, Inc.
EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.
Engenio is a trademark of Engenio Information Technologies, Inc.
Ethernet is a trademark of Xerox Corporation.
GoldenGate is a trademark of GoldenGate Software, Inc.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.
IBM, CICS, DB2, MVS, RACF, OS/390, Tivoli, and VM are registered trademarks of International Business Machines Corporation.
Intel, Pentium, and XEON are registered trademarks of Intel Corporation.
KBMS is a registered trademark of Trinzic Corporation.
Linux is a registered trademark of Linus Torvalds.
LSI, SYM, and SYMplicity are registered trademarks of LSI Logic Corporation.
Active Directory, Microsoft, Windows, Windows Server, and Windows NT are either registered trademarks or trademarks of Microsoft
Corporation in the United States and/or other countries.
Novell is a registered trademark of Novell, Inc., in the United States and other countries. SUSE is a trademark of SUSE LINUX Products GmbH,
a Novell business.
QLogic and SANbox are registered trademarks of QLogic Corporation.
SAS and SAS/C are registered trademark of SAS Institute Inc.
Sun Microsystems, Sun Java, Solaris, SPARC, and Sun are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. or other
countries.
Unicode is a registered trademark of Unicode, Inc.
UNIX is a registered trademark of The Open Group in the US and other countries.
NetVault is a trademark and BakBone is a registered trademark of BakBone Software, Inc.
NetBackup and VERITAS are trademarks of VERITAS Software Corporation.
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 NCR CORPORATION (NCR) 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 NCR intends to announce such features, functions, products,
or services in your country. Please consult your local NCR 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. NCR 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 e-mail: teradata-books@lists.ncr.com
Any comments or materials (collectively referred to as Feedback) sent to NCR will be deemed non-confidential. NCR 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, NCR 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-2005 by NCR Corporation. All Rights Reserved.
Teradata System Emulation Tool User Guide iii
Preface
Purpose
Teradata

Tools and Utilities is a group of products designed to work with the Teradata
Database.
This book provides information about the Teradata System Emulation Tool (hereafter referred
to as Teradata SET).
Teradata SET enables you to imitate (emulate) the Optimizer-generated data from a target
system, generate query plans, and then import that information to a test system where you can
run queries without impacting your production system.
Audience
This book is intended for:
Database administrators and relational database developers
Field engineers
Test engineers
Supported Releases
This guide supports the following releases:
Teradata Database V2R6.1
Teradata Tools and Utilities 08.01.00
Teradata System Emulation Tool 02.03.00
To find out on which platforms a given product is available and the compatible Teradata
Database versions, refer to Teradata Tools and Utilities 08.01.00 Supported and Certified
Versions, B035-3119-115K. This spreadsheet shows version numbers and platform
information for all Teradata Tools and Utilities release 08.01.00 products and is available at
www.info.ncr.com.
To learn more about product dependencies and system requirements, see System
Requirements.
Preface
Prerequisites
iv Teradata System Emulation Tool User Guide
Prerequisites
You should be familiar with the following:
Computer technology and terminology
Teradata SQL
Teradata Database
Relational database management systems
Connectivity software, such as ODBC or WinCLI
Microsoft

Windows

2000, Windows NT

, or Windows XP operating system


Utilities that load and retrieve data
Changes to This Book
The following changes were made to this book to support the current release and are marked
with change bars:
Date/Release Description
November 2005
02.03.00
Teradata SET now supports UTF-8 and UTF-16 character sets. Teradata
SET is now Unicode-enabled.
Enhanced Teradata SET to import and export cost profiles.
Added capability to import and export DBS Control information.
Updated Demographics export information to indicate that
demographics are not included when All is selected for export.
Enabled export and import of User Defined Types (except UDTs that
include methods).
Updated version numbers and copyright notices.
Revised naming to Teradata Database where it has been changed to
conform to the Teradata branding standard.
Modified the Exporting Estimated Time interface.
Updated Export by Query and Export Options interfaces.
Added command line switch -scs for session character set.
Preface
Changes to This Book
Teradata System Emulation Tool User Guide v
November 2004
02.02.00
After renaming a target database, change object definitions
automatically. See Renaming a Target Database on page 80. You can
also undo the renaming of a database. See Undoing the Renaming of a
Database on page 82.
In the command line interface, use the xapp switch to keep the
application open and connected following an export, import or clean up
operation. By default, the application automatically disconnects and
closes after the operation completes or an unsuccessful log on occurs.
See Table 26: Command Line Switches on page 111.
Added support for saving RAS information. See Table 20 on page 67.
Additional level of cost emulation was added at the Request level. See
Setting Target Level Emulation on page 87 and Resetting Target Level
Emulation on page 89.
Support enhanced security. For Windows, see Connecting to a Teradata
Database on page 34. For the command line interface, see Logging on
Using the Command Line on page 112.
When exporting by query, only DML statements should be given. If not,
a Warnings dialog box appears where you can proceed with the export
or cancel to alter your statement before proceeding with the export. See
Exporting by Query on page 38.
Specify different permanent space (permspace) required for importing
objects on a target system than what is calculated automatically by
Teradata SET. See Changing PermSpace on page 72.
When importing random AMP samples to a different hardware
platform with dissimilar byte layout, you must change the byte order.
See Changing RAS Byte Order on page 70.
Enhanced online Help to display in a Web browser.
To comply with NCR corporate branding requirements, changed the
term RDBMS to Teradata Database wherever possible.
Enhanced version and copyright information. See Version and
Copyright Information on page 21.
Improved format and layout consistency throughout the book.
Enhanced information for the following:
Displaying existing databases. See Displaying Existing Databases on
page 78.
Executing a query. See To execute a query on page 92.
Added information about using online Help. See Online Help on
page 9.
Date/Release Description
Preface
Changes to This Book
vi Teradata System Emulation Tool User Guide
September 2003
02.01.00
Instead of importing all database object level information during
import, perform partial imports by selecting specific database object
level information such as definitions, statistics, and random AMP
samples.
Save the changes you make to the import tree and the Import Options
dialog box so you can use them again for future import operations.
A preview pane displays information available in the files when
importing, undoing importing, packing, unpacking, and deleting files.
You can change how errors are handled during export, import, or undo
import operations.
When importing object definitions, certain errors may occur. You can
retry failed statements.
You can turn off emulation for individual tables by resetting the TLE.
For results of an export or clean-up (undo) operation, you can view a
summary report.
Reorganized Chapter 6 for usability.
In the Tools menu, changed the name of the Set RAS/Cost and Reset
RAS/Cost commands to Set TLE and Reset TLE.
When defining your export (RAS and cost tags), Teradata Visual Explain
will automatically insert the file name as the default.
When defining your export, the capture options for RAS, cost, and
demographics are saved and retained if you restart Teradata SET.
Use Service Pack 6 or later when running on Microsoft Windows NT
4.0.
December 2002
02.00.00
Revised information about enhancement to query capture capabilities.
Added the ability to edit cost parameters before importing.
Added a new import GUI with new menus and a new toolbar.
Added the ability to export, import, and view data demographics and
related information from the Index Wizard.
Added a feature that allows users to view existing databases and to
reorder databases in the import GUI.
Added the ability to export, import, and view workload
recommendations.
Added the ability to export and import execution plans.
Revised and expanded the capability to export by workload, by database,
and by query.
Added the capability to view a summary report.
Revised the menu selections and toolbar of the main window to reflect
new features.
Added a features that allows users to set Target Level Emulation
parameters for random AMP samples and cost parameters.
Added the ability to create queries.
Added the ability to edit emulation information between export and
import operations.
Date/Release Description
Preface
Additional Information
Teradata System Emulation Tool User Guide vii
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.
December 2002
02.00.00
Revised and added command line interface information.
Added new options to set defaults for a Teradata SET session,
specifically, multi-threading, X views, SQL editor, and a toggle for
viewing full summary reports versus import summary report.
Revised import and export options.
Added a new capabilities to clean-up (or remove) data from a test
system after an import operation to restore system defaults.
Revised the GUI to reflect the new organization of user interface
elements and features in the software.
Revised permissions information.
Revised system requirements.
Added new file types to list of file extensions.
Added a new packing/unpacking feature that zips files to make file
transfer easier.
Date/Release Description
Type of Information Description Source
Overview of the
release
Information too late
for the manuals
The Release Definition provides the
following information:
Overview of all the products in the
release
Information received too late to be
included in the manuals
Operating systems and Teradata
Database versions that are certified to
work with each product
Version numbers of each product and
the documentation for each product
Information about available training
and support center
http://www.info.ncr.com/
Navigate to General Search >
Publication Product ID, and enter 2029 to bring up
the following Release Definition:
Teradata Tools and Utilities Release Definition
B035-2029-mmyx
Preface
Additional Information
viii Teradata System Emulation Tool User Guide
Additional
information related
to this product
Use the NCR Information Products
Publishing Library site to view or download
the most recent versions of all manuals.
Specific manuals that supply related or
additional information to this manual are
listed.
http://www.info.ncr.com/
Click General Search, and do one of the following:
In the Product Line field, select Software -
Teradata Tools and Utilities (TTU) for a list of all
of the publications for this release,
In the Publication Product ID field, enter one of
the following book numbers:
Database Administration
B035-1093-mmyx
Graphical User Interfaces: Database Window
and Teradata MultiTool
B035-1095-mmyx
ODBC Driver for Teradata User Guide
B035-2509-mmyx
SQL Reference: Data Definition Statements
B035-1144-mmyx
SQL Reference: Statement and Transaction
Processing
B035-1142-mmyx
Teradata Index Wizard User Guide
B035-2506-mmyx
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
CD-ROM images This site contains a link to a downloadable
CD-ROM image of all customer
documentation for this release. Customers
are authorized to create CD-ROMs for their
use from this image.
http://www.info.ncr.com/
Navigate to General Search > Title or Keyword, and
enter CD-ROM.
Ordering
information for
manuals
Use the NCR Information Products
Publishing Library site to order printed
versions of manuals.
http://www.info.ncr.com/
Click Print & CD Publications > How to Order.
Type of Information Description Source
Preface
Additional Information
Teradata System Emulation Tool User Guide ix
General information
about Teradata
The Teradata home page provides links to
numerous sources of information about
Teradata. Links include:
Executive reports, case studies of
customer experiences with Teradata,
and thought leadership
Technical information, solutions, and
expert advice
Press releases, mentions, and media
resources
Teradata.com
Type of Information Description Source
Preface
Additional Information
x Teradata System Emulation Tool User Guide
Teradata System Emulation Tool User Guide xi
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Supported Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Changes to This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Chapter 1: Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Terms You Should Know. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
What is Teradata SET? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
How Teradata SET Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Supporting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Access Rights and Required Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Chapter 2: Getting Connected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Setting Up an ODBC Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Setting Up a WinCLI Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Verifying Your Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Opening Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table of Contents
xii Teradata System Emulation Tool User Guide
Chapter 3: Navigating Teradata SET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Overview of Menus and Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Teradata SET Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Main Window Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Version and Copyright Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Main Window Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Teradata SET Import Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Import Window Menus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Import Window Toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Chapter 4: Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Customizing Your Teradata SET Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Choosing Session Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Choosing a Connectivity Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Choosing a Save Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
Choosing How Errors Are Handled. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Connecting to a Teradata Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Connecting through ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Connecting through WinCLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Estimating Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Chapter 5: Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Selecting an Export Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Exporting by Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Exporting by Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Exporting by Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Estimating Export Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Working with Export Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Cost Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Cost Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Demographics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Execution Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Object Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
QCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
Table of Contents
Teradata System Emulation Tool User Guide xiii
Random AMP Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Workloads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Chapter 6: Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Before You Begin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Default Import Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Importing to a Test System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Changing Import Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Selecting Objects for Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Changing RAS Byte Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Editing Import Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Changing PermSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
SQL Statement Failed Dialog Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Customizing Emulation Information Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Modifying Information Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Using the Save As Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Displaying Existing Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Renaming Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Renaming a Target Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Undoing the Renaming of a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Reordering Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Viewing Machine Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Estimating Import Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Chapter 7: Managing Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Target Level Emulation (TLE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Setting Target Level Emulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Resetting Target Level Emulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Testing a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Packing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Creating a Packed File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Unpacking Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Undoing Imported Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Deleting Export Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Viewing Log Files and Summary Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Table of Contents
xiv Teradata System Emulation Tool User Guide
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
Changing Error Handling Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
Retrying Failed Import Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Disconnecting and Closing Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
Understanding Teradata SET File Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
Appendix A: Command Line Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . .111
Command Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111
Using the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
Logging on Using the Command Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
Exporting Using the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Importing Using the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Cleaning Up Imported Information Using the Command Line . . . . . . . . . . . . . . . . . . . .116
Using the Input Command File Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Teradata System Emulation Tool User Guide xv
List of Figures
Figure 1: Teradata SET Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Figure 2: Example of Object Definitions in the Import Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 3: Example of Export Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 4: Example of the Import Window with Object Definition Information . . . . . . . . . . 69
Figure 5: Example of a Partial Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Figure 6: Example of Editing Statistics in the Import Window . . . . . . . . . . . . . . . . . . . . . . . . 72
List of Figures
xvi Teradata System Emulation Tool User Guide
Teradata System Emulation Tool User Guide xvii
List of Tables
Table 1: Terms You Should Know. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Table 2: Export Privileges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Table 3: Import Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Table 4: Undo Import Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Table 5: File Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 6: View Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 7: Tools Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 8: Help Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 9: About Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 10: Toolbar Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 11: File Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 12: Edit Menu Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 13: View Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 14: Options Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 15: Import Window Toolbar Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 16: Options Dialog Box: Customize Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 17: Connect to Teradata Database Dialog Box Description . . . . . . . . . . . . . . . . . . . . . . 36
Table 18: Description of Export Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 19: Default Import Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Table 20: Description of Import and Miscellaneous Options. . . . . . . . . . . . . . . . . . . . . . . . . . 67
Table 21: Change PermSpace Dialog Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 22: Replace Dialog Box Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Table 23: Source Machine Configuration Dialog Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Table 24: Options Dialog Box: Error Handling Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Table 25: Teradata SET File Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Table 26: Command Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 27: Command Line Switches for Export Options and Import Options . . . . . . . . . . . 112
Table 28: Logging on to the Teradata Database: Syntax Examples. . . . . . . . . . . . . . . . . . . . . 113
Table 29: Exporting by Database: Syntax Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Table 30: Exporting by Query: Syntax Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Table 31: Exporting by Workload: Syntax Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Table 32: Importing: Syntax Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
List of Tables
xviii Teradata System Emulation Tool User Guide
Table 33: Cleaning Up Imported Information: Syntax Examples . . . . . . . . . . . . . . . . . . . . . .116
Table 34: Input Command File Switch: Syntax Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
Teradata System Emulation Tool User Guide 1
CHAPTER 1 Before You Begin
The following topics give an introduction to the Teradata SET and information about system
requirements, access rights, and using online Help:
Terms You Should Know
What is Teradata SET?
System Requirements
Access Rights and Required Permissions
Online Help
Terms You Should Know
Before you begin, review the following common terms used in this guide:
Table 1: Terms You Should Know
Term Description
Emulation information or
system information
The elements you can capture (export) from a target environment,
such as cost parameters, execution plans, object definitions, random
AMP samples, statistics, data demographics, cost profiles, and
workload.
Query capture database
(QCD)
A QCD is a set of predefined relational tables. These tables store the
execution plans created by the Teradata Query Optimizer and
captured by the Query Capture Facility (QCF). The QCD also stores
data demographics, workload definition, index recommendations,
and more.
Note: Unless otherwise specified, all references to the QCD refer to
the user-defined QCD.
Target system A type of Teradata Database. To analyze query plans for a target
system, use Teradata SET to capture (export) emulation information
from a target system and import the information to a test system.
Also called a production system.
Test system A type of Teradata Database to which you can import system
information so you can emulate a target system, create and analyze
queries, and test new features.
Chapter 1: Before You Begin
What is Teradata SET?
2 Teradata System Emulation Tool User Guide
What is Teradata SET?
Teradata SET allows you to imitate a target (production environment) system on a test system.
System-level environmental data is captured from the target system, then stored in relational
tables. You can then use the information from these tables, together with appropriate column
and index statistics, to make the Optimizer on the test system generate query plans as if you
are operating in the production environment.
The goal of Teradata SET is to:
Imitate the impact of environmental changes on SQL statement performance.
Provide an environment for determining the source of Optimizer-based production
database query issues using environmental cost data and random AMP sample-based
statistical data.
Capturing data from a target (production) system and applying it to a test system is a
two-phase process:
The first phase reads relevant data on the target system and then writes it to a staging area.
The second phase imports the staged data to a test system and applies it to the appropriate
data tables and system files.
Using Imported Data
You can use imported data to do the following:
Recreate the Optimizer performance characteristics of the target system.
Note: The Teradata Query Optimizer generates query execution plans based on many
factors, such as available system resources, indexes, primary and secondary keys, and
available statistics. All of these factors impact how the Optimizer creates the most effective
execution plan for a query.
Generate query plans that emulate those created on the target system under a given set of
conditions.
Note: You can use a test system of virtually any size and still generate query plans that
emulate the target system.
Do what-if modeling.
Test, diagnose, and solve Optimizer-related performance questions that might occur in the
target system.
Teradata SET also works with the Teradata Visual Explain tool to emulate how a target system
will perform under specific conditions and workloads.
Simplifies Data Capture
Teradata SET provides an easy way to resolve Optimizer-related problems and discrepancies
on a target system and to capture system information. Without Teradata SET, using SQL
statements is the only solution, which means that you have to know exactly what information
Chapter 1: Before You Begin
What is Teradata SET?
Teradata System Emulation Tool User Guide 3
to capture and what SQL statements to use. However, using SQL statements is
time-consuming and prone to user-introduced errors.
Teradata SET allows you to capture system information without knowing what to capture or
what SQL statements are required. Teradata SET completely automates the process of
exporting and importing system information for query plan generation.
Ensures Data Integrity
Teradata SET saves essential system information in specific file types based on the export
options you choose. When you import system information to your test system, it is
automatically loaded in the correct format.
Teradata SET synchronizes all the elements of a target environment. For example, all the
configuration settings, databases, data models, and data dependencies maintain the correct
relationships when they are exported and imported.
In addition, database objects are exactly duplicated on your test system. That means that
tables, views, macros, triggers, join indexes, and stored procedures function just like they do in
the target system. Using Teradata SET ensures that queries are thoroughly debugged and
optimized in a safe, but equivalent, emulated environment prior to introducing them into the
production system.
How Teradata SET Works
The following steps provide a high-level overview of the typical Teradata SET process,
assuming that you have already created SystemFE.Opt_Cost_Table and
SystemFE.Opt_RAS_Table on the target system:
1 Connect to a Teradata Database using a Teradata ODBC driver or WinCLI.
2 Before exporting, create a target system profile to define the databases, tables, views,
macros, and related environmental parameters or random AMP samples to be captured
for loading onto the test system.
3 Perform an export operation from the target system to collect Optimizer cost parameters;
random AMP samples; 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.
4 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. You can also compress the pack file using
any standard compression methods. Transfer the files to the test system location.
5 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.
6 Set the emulation on the test system and use the data to test and resolve any problems or
discrepancies.
The following figure shows the relationship between Teradata SET, ODBC and WinCLI
interfaces, target systems, and test systems.
Chapter 1: Before You Begin
What is Teradata SET?
4 Teradata System Emulation Tool User Guide
Figure 1: Teradata SET Architecture
Key Features
Following are the key features of Teradata SET:
Works as a stand-alone application.
Interfaces with a Teradata Database using WinCLIv2 or ODBC.
Exports system information from a target system to a specified file on your workstation.
Imports system information from your workstation to a test system.
Enables editing of object definitions, statistics, random AMP samples, cost parameters,
and cost profiles before you import them to a test system.
Exports and imports data demographics of tables from a QCD to another QCD.
Provides a summary report of the failures and successes of an import, export, or undo
(cleanup) operation.
Allows users to visually reorder databases.
Exports and imports workload recommendations.
Allows other client applications to use Teradata SET functions.
Supporting Tools
Teradata SET works with these independent tools, facilities, and SQL statements to emulate a
target system on a test system:
Query Capture Facility (QCF)
SQL SHOW statement
Target Level Emulation (TLE)
2492C001
Teradata Database
AMP Samples Schema/DDL
Statistics
QCD
GDO Cost Parameters
IMPORT SYSTEM
INFORMATION
Workstation
Teradata SET Client Tool
WinCLI
ODBC
Teradata SET
Data
Files
Test System
Teradata Database
GDO
Tables
AMP Samples
Statistics
Cost Parameters
QCD
EXPORT SYSTEM
INFORMATION
Target System
Chapter 1: Before You Begin
System Requirements
Teradata System Emulation Tool User Guide 5
System Requirements
Operating Systems
To find out on which platforms Teradata SET is available and the compatible Teradata
Database versions, refer to Teradata Tools and Utilities 08.01.00 Supported and Certified
Versions, B035-3119-115K. This spreadsheet shows version numbers and platform
information for all Teradata Tools and Utilities release 08.01.00 products and is available at
www.info.ncr.com.
Connectivity
Teradata SET requires one of the following connections:
NCR ODBC Driver for Teradata Database 03.05.00
Teradata Call-Level Interface version 2 (CLIv2) for Network-Attached System 04.08.01
Note: Before using Teradata SET to retrieve system information from a target system, you
must install either an ODBC driver or WinCLI on your workstation. If your system has both
an ODBC driver and WinCLI, the user-configured ODBC driver is used to connect to the
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 WinCLIv2. For details on the compatible versions, refer to
Teradata Tools and Utilities Installation Guide for Microsoft Windows. See Additional
Information on page vii.
Installation
Install Teradata SET as a stand-alone application using the standard Windows software
installation instructions. For more information, refer to Teradata Tools and Utilities
Installation Guide for Microsoft Windows. See Additional Information on page vii.
Access Rights and Required Permissions
Before using Teradata SET to export, import, or undo import (cleanup) operations, you must
have specific access rights to the database objects you want to export or import. In addition,
you must have a valid Teradata Database user ID and password.
Note: To learn the specifics for some of these access rights, refer to SQL Reference: Data
Definition Statements. See Additional Information on page vii.
Chapter 1: Before You Begin
Access Rights and Required Permissions
6 Teradata System Emulation Tool User Guide
Privileges Required for Export Operations
Before using Teradata SET to export, you need the following access rights:
Table 2: Export Privileges
Information That Can Be
Exported Required Privileges
Cost parameters INSERT, SELECT, and DELETE on the SystemFE.Opt_Cost_Table
and the SystemFE.Opt_DBSCtl_Table tables.
Execution plans When exporting an existing plan, you must have SELECT on the
Query Capture Database (QCD) tables or SELECT on the QCD;
EXECUTE on QCD macros.
To generate and export a new plan, you must have sufficient
privileges to execute the DUMP EXPLAIN statement for the given
query.
To generate and export a new plan with demographics, you must
have sufficient privileges to execute the INSERT EXPLAIN
statement for the given query and EXECUTE privileges on the QCD
macros.
Note: New plans can be generated only from the Export By Query
dialog box. For more information, see Exporting by Query on
page 38.
Object definitions For join indexes, macros, tables, triggers, stored procedures, and
User Defined Types (UDTs), you must have sufficient privileges to
execute the corresponding SHOW statement for the database
objects. If you are exporting object definitions for view, you must
also have SELECT on the view in order to perform the SHOW
QUALIFIED statement. If you are exporting by database, SELECT
on DBC.Columns and DBC.Tables is required to export referenced
UDTs.
Machine configuration MONRESOURCE on the database.
Note: This information is exported automatically only when a
WinCLI connection is used. For more information, see Viewing
Machine Configuration on page 83.
Random AMP samples SELECT on the tables selected for export; and INSERT, SELECT,
and DELETE on the SystemFE.Opt_RAS_Table.table.
Statistics You must have the privileges required to execute the HELP
STATISTICS statement on the table or join index referenced, and
SELECT on the DBC.IndexStats, the DBC.ColumnStats, and the
DBC.MultiColumnStats views.
Demographics SELECT privilege on data demographics table and corresponding
views of the table, and sufficient privileges to execute COLLECT
DEMOGRAPHICS statement. SELECT on QCD views, and
EXECUTE on QCD macros.
Note: This option is only available in export by database and export
by query operations.
Chapter 1: Before You Begin
Access Rights and Required Permissions
Teradata System Emulation Tool User Guide 7
Note: When exporting by query, the user needs privileges to execute the SHOW QUALIFIED
SQL statement and configuration data (random AMP samples, statistics, object definitions) if
only those objects returned from this statement can be exported.
Privileges Required for Import Operations
Before using Teradata SET to import, you need the following access rights:
QCD data SELECT privilege on QCD tables and views, and EXECUTE
privilege on QCD macros.
Note: This option is only available in export by database
operations.
Workloads SELECT privilege on QCD tables and views, and EXECUTE
privilege on QCD macros.
Note: This option is only available in export by workload
operations.
Cost profiles SELECT on the DBC.CostProfiles_v and DBC.CostProfileValues_v
views.
Table 2: Export Privileges (continued)
Information That Can Be
Exported Required Privileges
Table 3: Import Privileges
Information That Can Be
Imported Required Privileges
Cost parameters INSERT on the SystemFE.Opt_Cost_Table and the
SystemFE.Opt_DBSCtl_Table tables.
Execution plans INSERT, SELECT, and UPDATE privileges on the QCD tables and
views.
Object definitions CREATE for making database objects, such as join indexes, macros,
tables, triggers, stored procedures, and UDTs, on the user or
database into which the information will be imported. For stored
procedures, you must also have CREATE PROCEDURE WITH
GRANT OPTION privileges for the database in which you want to
create the stored procedures. UDTTYPE access to the SYSUDTLIB
database is required to create a UDT. UDTUSAGE access is required
to include a UDT with a CREATE TABLE statement.
Random AMP samples INSERT on the SystemFE.Opt_RAS_Table.
Statistics You must have the privileges required to execute the COLLECT
STATISTICS statement for the table or join index referenced.
Demographics INSERT, SELECT, and UPDATE privileges on data demographics
table and corresponding views of the table; EXECUTE privileges for
demographics macros.
Chapter 1: Before You Begin
Access Rights and Required Permissions
8 Teradata System Emulation Tool User Guide
Privileges Required for Estimate Time Function
If you want to use the Estimate Time function when performing an export operation or an
import operation, you need the following privileges:
The corresponding privileges listed in Table 2 on page 6 or Table 3 on page 7.
CREATE DATABASE privilege on the default database.
Privileges Required for Undo Import Operations
Before you are able to restore the default environment of your test system (also known as undo
import or cleanup operations), you need the following access rights:
QCD data INSERT, SELECT, and UPDATE privileges on QCD tables. SELECT
privilege on QCD views.
Workloads INSERT, SELECT, and UPDATE privileges on QCD tables. SELECT
privilege on QCD views.
Cost profiles EXECUTE on the DBC.CreateNewCostProfile and
DBC.InsertConstantValue macros.
Table 3: Import Privileges (continued)
Information That Can Be
Imported Required Privileges
Table 4: Undo Import Privileges
Information That Can Be Cleaned
Up Required Privileges
Cost parameters DELETE on the SystemFE.Opt_Cost_Table and the
SystemFE.Opt_DBSCtl_Table, or DELETE on SystemFE.
Execution plans DELETE on the QCD tables, or DELETE on the QCD. EXECUTE
privilege on QCD macros.
Object definitions Sufficient DROP privileges on the parent database, or DELETE
on the database object.
Random AMP samples DELETE on the SystemFE.Opt_RAS_Table table, or DELETE on
the SystemFE database.
Statistics You must have the privileges required to execute the DROP
STATISTICS statement for the table or join index referenced.
Demographics DELETE privilege on data demographics table and
corresponding views of the table; EXECUTE privilege on
demographics macros; EXECUTE privilege on QCD macros.
QCD data DELETE privilege on QCD tables and views; EXECUTE privilege
on QCD macros.
Workloads DELETE privilege on QCD tables and views; EXECUTE privilege
on QCD macros.
Chapter 1: Before You Begin
Online Help
Teradata System Emulation Tool User Guide 9
To learn how to get connected to the Teradata Database, see Chapter 2: Getting Connected.
Online Help
Using Online Help
Teradata SET online Help answers questions about how to use its features. Help opens in a
browser window. Microsoft Internet Explorer, version 6.0 or later, is the recommended
browser for viewing Help.
To open Help
From the toolbar, click .
Once the Help window is open, you can navigate to or search for other topics.
To get Help within a window or dialog box
From most windows and dialog boxes, press F1 to see context-sensitive Help for the
window or dialog box you are looking at. Occasionally when F1 will not invoke Help, press
Shift + F1.
Cost profiles EXECUTE on the DBC.DeleteCostProfile macro.
Table 4: Undo Import Privileges (continued)
Information That Can Be Cleaned
Up Required Privileges
Chapter 1: Before You Begin
Online Help
10 Teradata System Emulation Tool User Guide
Teradata System Emulation Tool User Guide 11
CHAPTER 2 Getting Connected
To connect to a Teradata Database from Teradata SET, you can use either Windows Call-Level
Interface (WinCLI) or Teradata Open Database Connectivity (ODBC).
The following topics explain how to set up an ODBC or a WinCLI connection:
Setting Up an ODBC Connection
Setting Up a WinCLI Connection
Setting Up an ODBC Connection
Teradata SET can use either WinCLI or ODBC drivers. However, if you use ODBC, you must
first define a data source for each Teradata Database (target system and test system) that you
want to use.
Defining a Data Source
Use the Microsoft ODBC Data Source Administrator to create ODBC data sources and to
configure some features of the drivers installed on your system.
To define a data source
1 Open the Microsoft ODBC Data Source Administrator using one of these options:
From the Teradata SET main window, select Tools > Define Data Source.
From your Windows desktop, select Start > Programs > ODBC > 32-bit ODBC
Administrator.
The ODBC Data Source Administrator dialog box opens.
2 Open the Create New Data Source dialog box using one of these options:
From the System DSN tab, click Add.
From the User DSN tab, click Add.
3 From the Drivers list, select Teradata.
Chapter 2: Getting Connected
Setting Up a WinCLI Connection
12 Teradata System Emulation Tool User Guide
4 Click Finish.
The ODBC Driver Setup for Teradata Database dialog box opens.
5 Fill out the information in this dialog box. Refer to ODBC Driver for Teradata User Guide.
See Additional Information on page vii.
You have successfully created and defined a data source for your Teradata Database. Now you
are ready to verify your connection before you open Teradata SET and connect to a Teradata
Database. To learn how, see Verifying Your Connection on page 14.
Setting Up a WinCLI Connection
To connect to a Teradata Database from Teradata SET, you can use either WinCLI or an ODBC
driver. If you use WinCLI, you do not need to define a data source prior to connecting.
Instead, WinCLI connections are defined from within Teradata SET. For more information
about WinCLI connectivity, see Connecting to a Teradata Database on page 34.
However, WinCLI connectivity requires you to define an IP address and provide the name of
the Teradata Database that you want to use in the system HOSTS file on your workstation.
The following section explains how.
Chapter 2: Getting Connected
Setting Up a WinCLI Connection
Teradata System Emulation Tool User Guide 13
Defining the System Address
To define an IP address and a name for the Teradata Database
1 From your Windows desktop, select Start > Programs > Windows NT Explorer.
2 In the Explorer window, navigate to the HOSTS file.
On systems running Windows NT or Windows 2000, the HOSTS file is located in the
system32\drivers\etc subdirectory of the directory in which Windows is installed.
3 Double-click the HOSTS file.
The Open With dialog box opens.
4 Select NOTEPAD from the list.
5 Click OK.
The HOSTS file opens in a Notepad window.
6 Enter the following to the file:
xxx.xxx.xxx.xxx ssscop1
where xxx.xxx.xxx.xxx is the functional IP address and sss is the Teradata Database
name.
7 Select File > Save.
8 Select File > Exit to close Notepad and return to your Windows desktop.
You have successfully set up a WinCLI connection. Next, verify your connection before you
open Teradata SET and connect to a Teradata Database. To learn how, see Verifying Your
Connection on page 14.
Chapter 2: Getting Connected
Verifying Your Connection
14 Teradata System Emulation Tool User Guide
Verifying Your Connection
Before you open Teradata SET, it is a good idea to test the connection.
To verify that the workstation can communicate with Teradata Database
1 From your Windows desktop, select Start > Run.
The Run dialog box opens.
2 In the Open box, enter the PING command followed by the name of the Teradata
Database and the COP1 suffix.
For example:
PING ssscop1
where sss is the Teradata Database to which you want to connect.
3 The Teradata Database returns the following message:
Reply from xxx.xxx.xx.xx
where xxx.xxx.xx.xx is the IP Address of the Teradata Database.
Note: If the PING command does not receive a response from the Teradata Database, see your
network administrator to determine the cause of the error.
You have successfully verified the connection between your workstation and the Teradata
Database. Now you can open Teradata SET. To learn how, see Opening Teradata SET on
page 14.
Opening Teradata SET
This section explains how to start Teradata SET before connecting to Teradata Database. You
can also start Teradata SET from the command line. For instructions on starting Teradata SET
from the command line, see Appendix A: Command Line Interface.
The following procedure assumes you have installed Teradata SET and configured your
Teradata Database connection.
To start Teradata SET
From your Windows desktop, select Start > Programs > Teradata System Emulation Tool
<release number>.
The Teradata SET main window opens.
Chapter 2: Getting Connected
Opening Teradata SET
Teradata System Emulation Tool User Guide 15
You have successfully opened Teradata SET. To learn about the menus and toolbars in Teradata
SET, refer to Chapter 3: Navigating Teradata SET.
Chapter 2: Getting Connected
Opening Teradata SET
16 Teradata System Emulation Tool User Guide
Teradata System Emulation Tool User Guide 17
CHAPTER 3 Navigating Teradata SET
The following topics provide information about the menus and toolbars in Teradata SET. Use
this information to navigate the Teradata System Emulation Tool main window (hereafter
referred to as the main window) and the Import window:
Overview of Menus and Toolbars
Teradata SET Main Window
Teradata SET Import Window
Overview of Menus and Toolbars
Menu Bar
The menu bar in the main window and the Import window allows you to access all of the
functions and features in Teradata SET. The commands are easy to select using the mouse
button or using the access keys from your keyboard. To learn more about the menus and
commands, see Teradata SET Main Window on page 18 and Teradata SET Import
Window on page 23.
Toolbar
Teradata SET has toolbars that contain buttons for shortcuts to the more commonly used
features. When you first open Teradata SET, notice that not all of the buttons in the toolbar are
available. Unavailable buttons are gray.
Status Bar
A status bar appears across the bottom of Teradata SET windows. The left side of the status bar
displays the condition of the system or an explanation of a command selected from a menu.
The right side displays the status of your last action or the status of the system. For example,
when you first open Teradata SET, the Idle prompt appears on the left side. The message Not
Logged on appears on the right side.
Chapter 3: Navigating Teradata SET
Teradata SET Main Window
18 Teradata System Emulation Tool User Guide
After you connect to a Teradata Database, the status message Logged onto database name as
username appears in the right box of the status bar. The left box displays the status of the
current action. For example, click Tools, then hold the cursor over the Export submenu item.
A description of the Export submenu action displays in the box.
By default, the status bar appears across the bottom of each Teradata SET window.
To view or hide the status bar
1 From the main window, select View > Status Bar to show the status bar.
2 Select View > Status Bar to hide the status bar.
When changing this setting, it will apply to both the main window and the Import window.
Teradata SET Main Window
The main window is your starting point for all activities.
For information about the menus and toolbar in the Import window, see Teradata SET
Import Window on page 23.
Main Window Menus
The main window contains menus that access the primary functions and features of Teradata
SET. This topic describes those menus.
File Menu
The following table lists the actions you can perform from the File menu:
Table 5: File Menu Commands
Command Description
Connect Logs on to a Teradata Database.
Disconnect Logs off a Teradata Database.
Exit Closes Teradata SET and returns to your Windows desktop.
Chapter 3: Navigating Teradata SET
Teradata SET Main Window
Teradata System Emulation Tool User Guide 19
View Menu
The following table lists the actions you can perform from the View menu:
Tools Menu
The following table lists the actions you can perform from the Tools menu:
Table 6: View Menu Commands
Command Description
Log File Opens a log file.
Summary Report Opens a report that summarizes the successes and failures of an import, export,
or undo import (cleanup) operation.
Font Opens the Font dialog box to change the font style, size, or color for text in the
Teradata SET main window. For example, the font used when you view the log
file or summary report.
Toolbar Shows or hides the toolbar in the main window.
Status Bar Shows or hides the status bar in the main window and the Import window.
Chapter 3: Navigating Teradata SET
Teradata SET Main Window
20 Teradata System Emulation Tool User Guide
Table 7: Tools Menu Commands
Command Description
Export Captures emulation information from a target system.
Import Opens the Import window where you can edit exported emulation information
and then import that information to a test system.
Undo Import Opens the Open dialog box, where you can select a single .undo file of imported
information to remove (cleanup) from a test system.
Customize Data Opens the Import window to edit emulation information without being
connected to the Teradata Database. This option is only available when you are
not connected.
Set TLE Opens the Set Target Level Emulation dialog box to enable the emulation of
random AMP samples (RAS), cost parameters, and cost profiles at various levels
on the connected system.
Reset TLE Opens the Reset Target Level Emulation dialog box to reset random AMP
samples, cost parameters, and cost profiles to default values.
Delete Files Opens the Delete dialog box to remove selected Teradata SET files. This action
reads .mcf files and, depending on the export options you chose, removes the
corresponding files (that is, file extensions .ddl, .col, .opt, .qcd, .ras, .dem, .undo,
and .mcf).
Pack Opens the Pack dialog box to combine an .mcf file and its associated files into
one file (.pack).
For more information about file types, see Understanding Teradata SET File
Extensions on page 108.
Unpack Opens the Unpack dialog box to separate a .pack file.
Define Data Source Opens the ODBC Database Administrator dialog box to define or edit ODBC
data sources for a Teradata Database.
Execute SQL Opens a query editor (SQL Assistant or Execute SQL) to execute queries. Your
selection in Tools > Options determines what is opened.
Options Opens the Options dialog box so you can customize Teradata SET features.
To learn how to use the Options dialog box, see Customizing Your Teradata
SET Sessions on page 29.
Chapter 3: Navigating Teradata SET
Teradata SET Main Window
Teradata System Emulation Tool User Guide 21
Help Menu
The following table lists the actions you can perform from the Help menu:
Version and Copyright Information
Open the About Teradata System Emulation Tool dialog box to see the version and copyright
information for the software you are using.
To open the About dialog box
From the Help menu, choose About Teradata System Emulation Tool.
Copyright dates and legal notices are also provided.
Table 8: Help Menu Commands
Command Description
Help Topics Opens the online Help.
About Teradata
System Emulation
Tool
See Version and Copyright Information on page 21.
Table 9: About Dialog Box
Field Description
Version Version number of the software installed.
Date Created Date the installed version of software was created.
System System name of the current connection. The connectivity type is indicated
as a suffix to the system name. For example, -ODBC or -CLI.
This field is blank if you are not connected to a Teradata Database.
Connection If you are connected to a Teradata Database, this field always shows Logged
on.
This field is not shown if you are not connected to a Teradata Database.
User User name that is connected to the Teradata Database.
This field is not shown if you are not connected to a Teradata Database.
Chapter 3: Navigating Teradata SET
Teradata SET Main Window
22 Teradata System Emulation Tool User Guide
Main Window Toolbar
The following table describes the toolbar buttons in the main window:
Table 10: Toolbar Descriptions
Toolbar
Button Description
Connects to a Teradata Database.
Disconnects from a Teradata Database.
Extracts emulation information from a target system.
Opens the Import window to edit exported emulation information and then import
that information to a test system.
Opens an .mcf file and edit information offline without being connected to the
Teradata Database.
Opens the Open dialog box, where you can select a single .undo file of imported
information to remove (cleanup) from a test system.
Opens or closes a log file.
Opens or closes a summary report.
Opens the Set Target Level Emulation dialog box to define random AMP samples
(RAS), cost parameters, and cost profiles at various levels on an active target system.
You can set multiple RAS and cost parameters on the active system so you can then
emulate multiple target environments on a single test system.
Opens the Reset Target Level Emulation dialog box to reset random AMP samples, cost
parameters, and cost profiles to default values.
Opens the Teradata SQL Assistant application or the Execute SQL window to execute
queries.
To set the query tool interface, see Choosing Session Defaults on page 30.
Deletes all files associated with the selected .mcf file.
Selects an export (.mcf) file and combines it with its associated files into one .pack file.
For more information, see Understanding Teradata SET File Extensions on page 108.
Chapter 3: Navigating Teradata SET
Teradata SET Import Window
Teradata System Emulation Tool User Guide 23
Teradata SET Import Window
Import Window Menus
The Teradata SET Import window (hereafter referred to as the Import window) contains
menus that access the import functions of Teradata SET. This section describes those menus.
File Menu
The following table lists the actions you can perform from the File menu:
Ungroups an .mcf file and its associated files from a .pack file.
Selects or clears the audible notification of events, such as when the Export By Query
dialog box opens.
Opens online Help.
Table 10: Toolbar Descriptions (continued)
Toolbar
Button Description
Table 11: File Menu Commands
Command Description
Save As Opens the Save As dialog box to rename an edited file. This option is only
available if the emulation information has been edited or if the selections in the
import tree have been changed.
Import Imports emulation information to a test system.
Exit Closes the Import window and returns to the main window.
Chapter 3: Navigating Teradata SET
Teradata SET Import Window
24 Teradata System Emulation Tool User Guide
Edit Menu
The following table lists the actions you can perform from the Edit menu:
Table 12: Edit Menu Commands
Command Description
Undo Undoes your last edit. This option is only available in edit mode.
Cut Moves selected text to the Clipboard. This option is only available in edit mode.
Copy Copies selected text to the Clipboard. This option is only available in edit mode.
Paste Inserts text from the Clipboard. This option is only available in edit mode.
Find Opens the Find dialog box in order to search for specified text in the left or right
pane. The Find option is only available in edit mode.
The following options are available from the Find dialog box:
Match whole word only: Select to search for whole words.
Match case: Select to distinguish between upppercase and lowercase
characters during the search.
Search in all DDLs: Select if you want the search to be conducted in all object
definitions.
Note: This option is available and included in the Find dialog box only when
searching the Object Definitions Information pane.
Replace Replaces selected text. This option is only available in edit mode.
Select All Selects all of the text in an editable pane.
Chapter 3: Navigating Teradata SET
Teradata SET Import Window
Teradata System Emulation Tool User Guide 25
View Menu
The following table lists the actions you can perform from the View menu:
Allow Edit Enables the edit mode so you can modify object definitions, random AMP
samples, statistics, cost parameters, and cost profiles in the right pane of the
Import window.
Note: The Undo, Cut, Copy, Paste, Find, and Replace commands are only
available for object definitions when you have enabled the edit mode. The Copy
and Find commands are available regardless if you have enabled or disabled the
edit mode.
Apply Changes Applies your edits to the active object definition, random AMP sample, statistic,
cost parameter, or cost profile. This option is only available after you make
changes in edit mode.
Table 13: View Menu Commands
Command Description
Tool Bar Shows or hides the toolbar in the Import window.
Status Bar Shows or hides the status bar in the main window and the Import window.
Font Opens the Font dialog box to change the font style, size, or color for text in the
Object Definitions Information area of the Import window.
Source Machine
Configuration
Opens the Source Machine Configuration dialog box to view the configuration
characteristics of the system from which the emulation information is exported
(the target system).
Estimate Time Opens the Estimated Time dialog box to view the estimated length of time
needed for your import operation.
Note: The Estimate Time function requires certain privileges. For more
information, see Privileges Required for Estimate Time Function on page 8.
Click Refresh to load the most current information.
Table 12: Edit Menu Commands (continued)
Command Description
Chapter 3: Navigating Teradata SET
Teradata SET Import Window
26 Teradata System Emulation Tool User Guide
Options Menu
The following table lists the actions you can perform from the Options menu:
Help Menu
The Help menu in the Import window is the same as the Help menu in the main window. For
more information, see Help Menu on page 21.
Table 14: Options Menu Commands
Command Description
Existing Databases Opens the Existing Databases dialog box to view a list of existing databases. This
option is enabled when your export includes one of the following:
Object definitions
Execution plans
Workloads
QCD data
Import Options Opens the Import Options dialog box to further define the databases and
emulation information for an import operation.
Order Database Enables the drag-and-drop feature enabling you to reorder databases at the
same level in the import tree in the left pane of the Import window.
Set TLE Opens the Set Target Level Emulation dialog box to view a list of the random
AMP samples, cost parameters, and cost profiles that you exported from a target
system. The dialog box allows you to define the emulation information that you
import to a test system.
Change PermSpace Opens the Change PermSpace dialog box to specify different permanent space
(permspace) required for importing objects on a target system than what is
calculated automatically by Teradata SET.
Chapter 3: Navigating Teradata SET
Teradata SET Import Window
Teradata System Emulation Tool User Guide 27
Import Window Toolbar
The Import window contains the buttons listed in Table 15 on page 27.
The Reverse, Delete, Copy, Paste, Search, and Replace buttons are available when you select
object definitions in the import tree.
Figure 2: Example of Object Definitions in the Import Tree
Table 15: Import Window Toolbar Descriptions
Toolbar
Button Description
Saves edited information in a newly named file.
Initiates the import operation.
View the configuration characteristics of the system from which emulation
information is exported (the target system).
View an estimate of the time needed to perform an import operation.
Note: The Estimate Time function requires certain privileges. For more information,
see Privileges Required for Estimate Time Function on page 8.
Undo your last edit. This option is only available in edit mode.
Moves selected text to the Clipboard. This option is only available in edit mode.
Copies selected text to the Clipboard. This option is only available in edit mode.
Inserts text from the Clipboard. This option is only available in edit mode.
Searches for selected text. This option is only available in edit mode.
Replaces selected text with replacement text. This option is only available in edit mode.
Enables the edit mode so you can modify object definitions, statistics, random AMP
samples, cost parameters, DBS Control information, and cost profiles in the right pane
of the Import window.
Chapter 3: Navigating Teradata SET
Teradata SET Import Window
28 Teradata System Emulation Tool User Guide
You are now familiar with the menu and toolbars in the main window and Import window.
You are now ready to prepare for exporting emulation data by setting your session defaults. To
learn how, see Customizing Your Teradata SET Sessions on page 29.
Applies your edits to object definitions, statistics, random AMP samples, cost
parameters, DBS Control information, and cost profiles that are active in the right
pane of the Import window. This option is only available after you make changes in
edit mode.
Opens the Import Options dialog box to further define the databases and emulation
information for an import operation.
Opens the Set Target Level Emulation dialog box to define the random AMP samples,
cost parameters, and cost profiles, which are applied after the import.
Opens the Existing Databases dialog box to view a list of existing users and databases
on the Teradata Database. Databases are highlighted if they exist on the local system.
This option is enabled when your export includes object definitions and QCD data.
Enables the drag-and-drop feature that allows you to reorder databases in the tree
structure in the left pane of the Import window.
Allows you to rename a target database.
Reverses the renaming of a target database.
Opens the Change PermSpace dialog box to view and change the permanent space for
the selected databases.
Opens the online Help.
Closes the Import window and returns to the main window.
Table 15: Import Window Toolbar Descriptions (continued)
Toolbar
Button Description
Teradata System Emulation Tool User Guide 29
CHAPTER 4 Getting Started
The following topics explain how to start using Teradata SET:
Customizing Your Teradata SET Sessions
Connecting to a Teradata Database
Estimating Time
Customizing Your Teradata SET Sessions
After you open Teradata SET and log on, you can customize your Teradata SET sessions using
the Options dialog box. The selections you make remain in effect each time you log on to
Teradata SET until you change them.
Using the Customize tab, you can select various options for your Teradata SET sessions. Using
the Connectivity tab, you can choose the interface to use when connecting to a Teradata
Database. The Directory tab enables you to specify the directory and file location to save
exported emulation information. The Error Handling tab allows you to chose how errors will
be handled. After you have finished customizing your session, you must apply the changes.
Then you will be ready to connect to the database. To learn how, see Connecting to a Teradata
Database on page 34.
Chapter 4: Getting Started
Customizing Your Teradata SET Sessions
30 Teradata System Emulation Tool User Guide
Choosing Session Defaults
To set defaults for your Teradata SET sessions
1 From the main window, select Tools > Options.
The Options dialog box opens and the Customize tab is selected by default.
2 Select any of the options in the Customize tab.
The following table describes the options available in the Customize tab.
Table 16: Options Dialog Box: Customize Tab
Check Box Description
Create log file Select to record all operations performed during an active
Teradata SET session. Log files can help you if you need to
research an operation. For example, if you have an import
operation that is only partially successful, you can use the log file
to research what happened during the import process.
Log SQL statements Select to record in a log file the SQL statements used in the
export, import, and undo import (cleanup) processes.
Display logon dialog at
startup
Select to automatically open the Teradata Database dialog box
when Teradata SET starts. This eliminates having to use the
Connect command or toolbar button.
Provide Audible Notification Select to hear a tone whenever an event initiates. For example,
when a file is exported successfully.
You can also click from the toolbar to toggle the audible
notification feature on or off.
Chapter 4: Getting Started
Customizing Your Teradata SET Sessions
Teradata System Emulation Tool User Guide 31
3 Click Apply to apply the changes.
4 Click OK to return to the main window.
To learn how to choose an interface to connect to a Teradata Database, see Choosing a
Connectivity Type on page 31.
Choosing a Connectivity Type
To set a connectivity type
1 From the main window, select Tools > Options.
The Options dialog box opens. The Customize tab is selected by default.
Use X-views for QCD
Information
Select to enable a restricted view of plans in the QCD
information.
Various tables, views, and macros make up the QCD. The
majority of the views in the QCD have two versions:
non-restricted and restricted. The restricted views on the
database are denoted by an X appended to the regular,
non-restricted view name.
When enabled, this option allows a user to view only those
workloads, plans, and recommendations that are associated with
the user. When disabled, the currently connected user can view all
available plans in the QCD, not just their own.
This option is helpful when the database is heavily populated with
plans from many users.
For example, if Users A, B, and C all capture a plan and store it in
QCD 1, User B can enable the Use X-views for QCD Information
option to view only User Bs plans.
Note: Do not use this option unless you have the appropriate
privileges.
Use Multi-Threading Select to speed up your export and import operations with
multiple connections.
Use SQL Assistant instead of
the Execute SQL window
Select to toggle between the two query interfaces.
Table 16: Options Dialog Box: Customize Tab (continued)
Check Box Description
Chapter 4: Getting Started
Customizing Your Teradata SET Sessions
32 Teradata System Emulation Tool User Guide
2 Select the Connectivity tab.
3 Select ODBC to use ODBC as your interface.
or
Select WinCLI to use WinCLI as your interface.
4 Click Apply to apply the changes.
5 Click OK to return to the main window.
To learn how to set the directory and file location for saving your exported information, see
Choosing a Save Location on page 32.
Choosing a Save Location
To choose a save location
1 From the main window, select Tools > Options.
The Options dialog box opens. The Customize tab is selected by default.
Chapter 4: Getting Started
Customizing Your Teradata SET Sessions
Teradata System Emulation Tool User Guide 33
2 Select the Directory tab.
3 To specify a path for saving exported information, specify a default directory using one of
these options:
Type the directory in the Path box.
Click Browse to open the Browse for Folder dialog box where you can highlight a
destination folder, then click OK to enter the path in the Directory tab.
4 Click Apply to apply the changes.
5 Click OK to return to the main window.
To learn how to set options for handling errors, see Choosing How Errors Are Handled on
page 33.
Choosing How Errors Are Handled
To choose how errors are handled
1 From the main window, select Tools > Options.
The Options dialog box opens. The Customize tab is selected by default.
Chapter 4: Getting Started
Connecting to a Teradata Database
34 Teradata System Emulation Tool User Guide
2 Select the Error Handling tab.
3 Select any of the options in the Error Handling tab.
For more information on these options, see Changing Error Handling Options on
page 104.
4 Click Apply to apply the changes.
5 Click OK to return to the main window.
When you finish customizing your Teradata SET session, you are ready to connect Teradata
SET to a Teradata Database. See Connecting to a Teradata Database on page 34.
Connecting to a Teradata Database
Before you can use Teradata SET to export information, you must connect to a Teradata
Database using ODBC or WinCLI.
Connecting through ODBC
If you have not already done so, you may need to define a data source before connecting
through ODBC. See Defining a Data Source on page 11.
To connect using ODBC
1 From the main window, select File > Connect or click from the toolbar.
The Select a Data Source dialog box opens.
Chapter 4: Getting Started
Connecting to a Teradata Database
Teradata System Emulation Tool User Guide 35
2 Select a data source, and click OK.
You are now logged on to the selected database and ready to begin exporting. See Chapter 5:
Exporting.
Connecting through WinCLI
To connect using WinCLI
1 From the main window, select Tools > Options.
The Options dialog box opens.
2 Select the Connectivity tab.
3 Select WinCLI and click Apply.
4 Select OK to close the Options dialog box.
5 Select File > Connect or click from the toolbar.
The Connect to Teradata Database dialog box opens.
6 Use the following table to fill in the dialog box.
Chapter 4: Getting Started
Estimating Time
36 Teradata System Emulation Tool User Guide
7 Click OK to accept your entries and close the Connect to Teradata Database dialog box.
This action connects Teradata SET to the Teradata Database and returns you to the main
window.
Estimating Time
You have the option to find out how long an export or import operation will take. For more
information, see:
Estimating Export Time on page 49
Estimating Import Time on page 85
Now you are ready to use begin exporting. See Chapter 5: Exporting.
Table 17: Connect to Teradata Database Dialog Box Description
Field Description
Database Name Select the Teradata Database from the drop-down list or type a valid
Teradata Database name. The IP address of the server should be stored in
the hosts file to use a Host name. See Defining the System Address on
page 13.
Authentication
Mechanism
Select from the list of mechanisms that automatically appear in this box.
Each Teradata site implements their own security measures. If a list of
mechanisms does not appear and you cannot log on to the Teradata
Database, consult your DBA or the person responsible for the security of
your Teradata Database.
Authentication
Parameter
Type the parameters required by the selected mechanism. Asterisks
appear as you type to conceal the authentication parameter.
If you do not know what to enter, consult your DBA.
User Name Select the user name from the drop-down list, or type a valid user name.
The user name should already be defined for the server.
If you are using the single-sign-on (SSO) feature, ensure the User Name
and Password boxes are blank.
Password Type the password for the user name defined in the User Name field.
Asterisks appear as you type, to conceal your password.
Session Character Set [Optional] Select a session character set from the list. Choose one of the
following: ASCII, KANJISJIS_0S, UTF16, or UTF8.
Default Database [Optional] Select the default database for the session.
If you do not specify a value, the system uses the default database that is
defined for the user.
Account String [Optional] Select the account string from the drop down list or type any
additional log on parameters that define your user group.
Teradata System Emulation Tool User Guide 37
CHAPTER 5 Exporting
Teradata SET quickly captures (exports) emulation information, allows you to edit that
information, and then imports the information to a test system so you can imitate the target
system. For example, if you capture system information from a target system that currently
has four nodes, you can examine cost parameters and execution plans on the test system as if it
has four nodes. For more information about importing, see Chapter 6: Importing.
The following topics explain how to use Teradata SET to capture information from a target
system:
Selecting an Export Type
Exporting by Query
Exporting by Database
Exporting by Workload
Estimating Export Time
Working with Export Options
Selecting an Export Type
Before you can use Teradata SET to export emulation data, you must be connected to a
Teradata Database. For more information, see Connecting to a Teradata Database on
page 34.
After you log on to the Teradata Database, use the automated Export feature to capture the
information you need to emulate the target environment on your test system.
Decide how you want to export information. Go to Tools > Export and the Export from
Teradata Database dialog box opens where you choose one of the following options:
Query: To identify database objects for export using one or more data manipulation
language (DML) statements.
Database: To select database objects for individual export.
Workload: To identify database objects for export based on an existing workload
definition.
To begin exporting emulation information from a Teradata Database, continue with one of
the following topics:
Exporting by Query on page 38
Exporting by Database on page 43
Exporting by Workload on page 46
Chapter 5: Exporting
Exporting by Query
38 Teradata System Emulation Tool User Guide
Exporting by Query
You can identify database objects for export by selecting queries using one or more data
manipulation language (DML) statements. The export by query operation uses the SHOW
QUALIFIED statement; therefore, only DML statements should be given as input. In other
words, statements should not be DDL statements.
For more information about the SHOW statement and restrictions, refer to SQL Reference:
Data Definition Statements. See Additional Information on page vii. You can also use the
export by database operation and select specific objects for export. For more information, see
Exporting by Database on page 43.
To export by query
1 From the main window, select Tools > Export or from the toolbar, click .
The Export from Teradata Database dialog box opens.
2 Select Query and enter a file name and folder location for your exported emulation
information in the File name and In folder boxes. If desired, click Browse to locate the
destination folder in your Windows Explorer.
Note: By default, the name of the target system that you specified when you connected
appears in the File name box.
3 Click OK.
The Export By Query dialog box opens.
Chapter 5: Exporting
Exporting by Query
Teradata System Emulation Tool User Guide 39
4 To define the default database for running queries, enter the name of the database in the
Default Database box, or click to load a list of available databases, then select the name
of the database from the Default Database list.
Note: If you choose to add a new query and if you fully qualify the database, tables, and
view names in the new query, you do not need to choose a database from the Default
Database box.
5 Select queries using one of the following three options. These options are further
explained below.
OPTION 1: Entering a Query Manually
OPTION 2: Loading an Existing Query from a File
OPTION 3: Loading a Query from a QCD
OPTION 1: Entering a Query Manually
a) In the QCD Name box, select a QCD either by entering the name of the database, or by
clicking to first load a list of available databases, then selecting a database from the list.
b) In the Query pane, type a valid query.
Before performing this step, you can first test your query. To learn how, see Testing a
Query on page 92.
c) Click Add to move the query to the Selected Queries list.
You can use standard Windows Cut, Copy, Paste, and Undo functions in the Query pane.
To enter another new query, click Clear to erase the text in the Query pane and type
another query.
To remove a query, select the query, and click Remove.
d) Define the type of information you want to export by selecting check boxes in the Export
Options area. To learn more about these options, see Working with Export Options on
page 50.
Note: If you select the Execution Plans check box and the Demographics check box when
you enter a query manually, the plan is captured into a QCD database with INSERT
EXPLAIN and deleted after the export operation. Otherwise the plan is captured with
DUMP EXPLAIN. The database listed in the QCD Name box is the database into which
the plan will be inserted once you perform an import operation. For more information,
see SQL Reference: Statement and Transaction Processing. See Additional Information on
page vii.
OPTION 2: Loading an Existing Query from a File
a) In the QCD Name box, select a QCD either by entering the name of the database, or click
to first load a list of available databases, then selecting a database from the list.
Chapter 5: Exporting
Exporting by Query
40 Teradata System Emulation Tool User Guide
b) Click Open Query.
The Open dialog box displays.
c) Select a file, and click Open.
All of the queries in the selected file are added to the Selected Queries list in the Export By
Query dialog box.
To remove a query, click Remove.
d) Define the type of information you want to export by selecting check boxes in the Export
Options area. To learn more about these options, see Working with Export Options on
page 50.
Note: If you select the Execution Plans check box and the Demographics check box when
you load a query from a file, the plan is captured into a QCD database with INSERT
EXPLAIN and deleted after the export operation. Otherwise the plan is captured with
DUMP EXPLAIN. The database listed in the QCD Name box is the database into which
the plan will be inserted once you perform an import operation. For more information,
see SQL Reference: Statement and Transaction Processing. See Additional Information on
page vii.
OPTION 2: Loading an Existing Query from a File (continued)
Chapter 5: Exporting
Exporting by Query
Teradata System Emulation Tool User Guide 41
6 To further define any of the selected export options, click Options to open the Export
Options dialog box, which opens with certain areas available depending on your selections
in the Export Options area. For more information about the Export Options dialog box,
see Working with Export Options on page 50.
OPTION 3: Loading a Query from a QCD
a) In the QCD Name box, select a QCD either by entering the name of the database, or by
clicking to first load a list of available databases, then selecting a database from the list.
b) Click Browse QCD.
The Query Capture Database dialog box opens.
c) Select one or more queries from the Query List, or click Select All to select all of the
queries.
d) Click OK.
All of the queries you selected are now added to the Selected Queries of the Export By
Query dialog box.
e) [Optional] To remove a query, click Remove.
f) Define the type of information you want to export by selecting check boxes in the Export
Options area. For more information about these options, see Working with Export
Options on page 50.
Note: Unlike the manual query option and loading from system file option, when you use
this option to load queries, Teradata SET retrieves query text from the QCD specified in
the QCD Name box. If the Execution Plans check box is selected, the query plan is also
retrieved from the database named in the QCD Name box.
Chapter 5: Exporting
Exporting by Query
42 Teradata System Emulation Tool User Guide
Note: If any problems exist with the selected queries, a Warnings dialog box appears when
you click Options. To resolve the warning, you can change the query or remove it from the
Selected Queries list.
7 [Optional] To customize the Selected Queries pane, right click on the heading row and
select from the shortcut menu.
8 [Optional] Click Estimate Time to view an estimate of the time needed to export each
object. For more information, see Estimating Export Time on page 49.
Note: The Estimate Time function requires certain privileges. For more information, see
Privileges Required for Estimate Time Function on page 8.
9 When you are finished defining the emulation information in the Export By Query dialog
box, click Export to begin the export process.
The export by query operation uses the SHOW QUALIFIED statement; therefore, only
DML statements should be given as input.
Note: If there is an error, a Warnings dialog box appears. Click Proceed if you want to
proceed with the export or click Cancel to cancel the export operation and return to the
Chapter 5: Exporting
Exporting by Database
Teradata System Emulation Tool User Guide 43
Export By Query dialog box. Then, you can alter the statement before restarting the export
operation.
10 While the export process occurs, the main window shows you the status of the process.
When the import process finishes, you see an Export completed message in the main
window.
11 [Optional] After the export process completes, you can view a summary report for the
results of the export operation. See Viewing Summary Reports on page 101.
You have successfully completed an export operation. You are now ready to view and edit the
emulation data that you exported. To learn how, see Chapter 6: Importing.
Exporting by Database
You can select database objects and define the details of the information you want to export.
This section explains how.
To export by database
1 From the main window, select Tools > Export or from the toolbar, click .
The Export from Teradata Database dialog box opens.
2 Select Database and enter a file name and folder location for your exported emulation
information in the File name and In folder boxes. If desired, click Browse to locate the
destination folder in your Windows Explorer.
Note: By default, the name of the target system that you specified when you connected
appears in the File name box.
3 Click OK.
Chapter 5: Exporting
Exporting by Database
44 Teradata System Emulation Tool User Guide
The Export By Database dialog box opens.
4 From the Export By Database dialog box, do one of the following:
To export from an entire database or a user, either enter the name of the database or
user in the Specify Export Database box, or click to load a list of available databases
and users, and then select from the Specify Export Database list.
Note: The Execution Plans check box is disabled by default unless you either mark a
database as a QCD in the import tree, or select a database from the Specify Export
Database list and then select the Query Capture Database check box.
To export from an individual database object, highlight the object in the List of Objects
hierarchy, and click Add to move the object to the Selected List. Repeat as often as
desired.
5 To include demographics in the export operation, do one of the following:
Click located next to Demographics Source to first load a list of available QCD
databases, and then select the database that contains the demographics you want for
the tables being exported.
Select the Demographics check box in the Export Options area.
For information on how to select specific tables and how to select specific demographics
for export, see Working with Export Options on page 50.
6 To remove an object from the Selected List, highlight the object, and click Remove.
Chapter 5: Exporting
Exporting by Database
Teradata System Emulation Tool User Guide 45
7 In the Export Options area, select check boxes to further define the type of information
that is exported. For more information about these export options, see Working with
Export Options on page 50.
8 [Optional] To further define any of the selected export options, click Options to open the
Export Options dialog box. Certain areas of this dialog box are enabled depending on your
selections in the Export Options area. For more information about the Export Options
dialog box, see Working with Export Options on page 50.
9 [Optional] To mark a database as a QCD, right click the database in the List of Objects list
to open a shortcut menu, then select Mark as QCD.
Note: The Execution Plans check box in the Export Options area is active only when the
database is marked as a QCD.
To unmark a database that you have marked as a QCD, right click the database in the List
of Objects list to open a shortcut menu, then select UnMark as QCD.
10 [Optional] Click Estimate Time to view an estimate of the time it will take to process your
export request. For more information, see Estimating Export Time on page 49.
Note: The Estimate Time function requires certain privileges. For more information, see
Privileges Required for Estimate Time Function on page 8.
11 When you are finished defining the emulation information in the Export By Database
dialog box, click Export to begin the export process.
Chapter 5: Exporting
Exporting by Workload
46 Teradata System Emulation Tool User Guide
12 While the export process occurs, the main window shows you the status of the process.
When the import process finishes, you see an Export completed message in the main
window.
13 [Optional] For results of your export operation, you can view a summary report. See
Viewing Summary Reports on page 101.
You have successfully identified the database objects that you want to export and have
completed an export operation. You are now ready to view and edit the emulation
information that you exported. To learn how, see Chapter 6: Importing.
Exporting by Workload
You can choose a QCD database and multiple workloads for export, and to define the details
for the specific emulation information you want to capture.
To export by workload
1 From the main window, select Tools > Export or from the toolbar, click .
The Export from Teradata Database dialog box opens.
2 Select Workload and enter a file name and folder location for your exported emulation
information in the File name and In folder boxes. If desired, click Browse to locate the
destination folder in your Windows Explorer.
Note: By default, the name of the target system that you specified when you connected
appears in the File name box.
3 Click OK.
Chapter 5: Exporting
Exporting by Workload
Teradata System Emulation Tool User Guide 47
The Export By Workload dialog box opens.
4 In the Export By Workload dialog box, select a QCD to be the source of the workload
information by doing one of the following:
Enter the name of the database in the QCD Database box.
Click to load a list of available databases, then select a database from the QCD
Database list.
5 In the Workload box, select a workload from the list, or type the workload name and press
enter, to load index recommendations for the selected workload in the Workload
Information pane.
a To view the statements that make up a workload, highlight the item in the Workload
Information pane, and do one of the following:
Click View Workload.
Right click on your selection, and select View Workload.
The View Workload dialog box opens.
b To move an index recommendation(s) from the Workload Information pane to the
Selected Workload pane, do one of the following:.
Highlight a row(s), and click Add.
Right click on a row, and select Add.
c To move all index recommendations, highlight any row in the Selected Workloads
pane, and do one of the following:
Click Add All.
Right click on the item, and select Add All.
Chapter 5: Exporting
Exporting by Workload
48 Teradata System Emulation Tool User Guide
d To deselect a workload from the export operation, highlight all its index
recommendations in the Selected Workloads pane, and do one of the following:
Click Remove.
Right click on the item, and select Remove or Remove All.
Note: For a workload without any recommendations, the Index tag and Recommendation
Time boxes are empty.
6 [Optional] To customize a heading, right click on the heading row of the Workload
Information pane or the Selected Workload pane.
7 In the Export Options area, select check boxes to further define the type of information
that is exported. For more information about these export options, see Working with
Export Options on page 50.
8 [Optional] To further define any of the selected export options, click Options to open the
Export Options dialog box. Certain areas of this dialog box are enabled depending on your
selections in the Export Options area. For more information about the Export Options
dialog box, see Working with Export Options on page 50.
9 [Optional] Click Estimate Time to view an estimate of the time it will take to perform the
export of each object in your operation. For more information, see Estimating Export
Time on page 49.
Note: The Estimate Time function requires certain privileges. For more information, see
Privileges Required for Estimate Time Function on page 8.
10 When you are finished defining the emulation information in the Export By Workload
dialog box, click Export to begin the export process.
11 While the export process occurs, the main window shows you the status of the process.
When the import process finishes, you see an Export completed message in the main
window.
12 [Optional] For results of your export operation, you can view a summary report. See
Viewing Summary Reports on page 101.
You have successfully identified a QCD database and workloads for an export, and have
completed an export operation. You are now ready to view and edit the emulation
information that you exported. To learn how, see Chapter 6: Importing.
Chapter 5: Exporting
Estimating Export Time
Teradata System Emulation Tool User Guide 49
Estimating Export Time
While you are setting up an export operation, you have the option to find out how long the
process will take.
Note: The following procedure can be performed from any of the following dialog boxes:
Export By Query dialog box, Export By Database dialog box, or Export By Workload dialog
box. You must be connected to a Teradata Database.
The Estimate Time function requires certain privileges. For more information, see Privileges
Required for Estimate Time Function on page 8.
To view the estimated export time
1 Ensure you are in one of the following dialog boxes:
Export By Query dialog box
Export By Database dialog box
Export By Workload dialog box
2 Select the Estimate Time button.
The Estimated Time dialog box opens and shows time estimates for each object you are
exporting and gives you a total estimated time for the export operation.
If you are exporting by query, you can also remove the query or view the estimated time
for a selected query or queries. Right click on the data row in the Export By Query dialog
box and select from the shortcut menu as shown below:
Chapter 5: Exporting
Working with Export Options
50 Teradata System Emulation Tool User Guide
3 Click Refresh to view estimates of the time needed to export each object.
4 Click OK to close the Estimated Time dialog box.
You have successfully viewed the estimated time needed for an export operation.
Working with Export Options
All three export dialog boxes (Export By Query, Export By Database, and Export By
Workload) allow you to select the elements (or types of information) you want to export from
a target system. The following figure shows an example of the export options offered in an
export dialog box. The availability of the check boxes varies slightly depending on the type of
export you select.
Figure 3: Example of Export Options
If the Options button is enabled, click Options to open the Export Options dialog box where
you can modify the default setting for certain elements.
The following section explains the effects of selecting the check boxes in the Export Options
area and how to modify certain elements in the Export Options dialog box.
Table 18: Description of Export Options
Check Box Description
All Use to export all of the options except Demographics with one selection.
This check box can be used to capture the TLE information or black box
test environment of specific problem-causing queries so the production
environment can be simulated on a test system for debugging.
For more information, see All on page 51.
Cost Parameters Use to export system cost parameters (including DBS Control
information).
For more information, see Cost Parameters on page 51.
Chapter 5: Exporting
Working with Export Options
Teradata System Emulation Tool User Guide 51
All
You can select All in the Export Options area to capture all of the elements listed in the dialog
box except Demographics. (Essentially, this creates a black box test environment of a specific
problem-causing query.)
Note: To include Demographics, select the Demographics check box in addition to the All
check box. For more information, see Demographics.
Cost Parameters
Select Cost Parameters in the Export Options area to capture the Optimizer environmental
cost parameters and DBS Control information from a target system. Cost parameters are
captured from the GDO for the system.
Cost Profiles Use to export active or inactive cost profiles. Select the profile type from
the Export Cost Profiles dialog box.
For more information, see Cost Profiles on page 53.
Demographics Use to export the demographic data of the tables.
For more information, see Demographics on page 54.
Execution Plans Use to export the execution plan for databases marked as QCDs.
To capture execution plans, select a database in Specify Export Database
and then select the Query Capture Database check box and then select
the Execution Plans check box in the Export Options area. This check box
is enabled when QCD Data is selected.
For more information, see Execution Plans on page 56.
Object Definitions Use to export data definition language (DDL) statements of the database
objects selected for the export.
For more information, see Object Definitions on page 56.
QCD Data Use to export execution plans, workloads, QCD statistics, and
demographics from a QCD database. This check box is enabled when the
Query Capture Database option is selected.
For more information, see QCD Data on page 57.
Random AMP Samples Use to export random AMP samples for the database objects.
For more information, see Random AMP Samples on page 57.
Statistics Use to export statistics of the database objects selected for the export, if
any were collected.
For more information, see Statistics on page 59.
Workload Use to export specific queries and recommendations for a workload.
For more information, see Workloads on page 59.
Table 18: Description of Export Options (continued)
Check Box Description
Chapter 5: Exporting
Working with Export Options
52 Teradata System Emulation Tool User Guide
To define the cost parameters for your export
1 Click Options.
The Export Options dialog box opens.
2 [Optional] In the Cost tag box, you can change the name.
By default, the Cost tag box displays the file name you entered in the Export from Teradata
Database dialog box.
3 To capture cost data from specific rows, click Select Rows to open the Export Cost
Parameters dialog box.
4 To define the way that cost parameters are exported, do one of the following:
Select Capture from Source to export cost parameters from SystemFE.Opt_Cost_Table
for the selected rows. This option exports cost parameters and related DBS Control
information after capturing the parameters from the target system.
Select Capture Current Costs to export the cost parameters and DBS Control
information from the target system. Using this option inserts a row into
SystemFE.Opt_Cost_Table and SystemFe.Opt_DBSCtl_Table using the cost tag you
specify in the Cost tag box. That row is exported and then deleted from
Chapter 5: Exporting
Working with Export Options
Teradata System Emulation Tool User Guide 53
SystemFE.Opt_Cost_Table and SystemFe.Opt_DBSCtl_Table after the export process is
complete.
Select Set Costs to first set and then export the cost parameters for a given row. You
can use this option only when an entry exists in SystemFE.Opt_Cost_Table. You can set
only one cost parameter for a system.
Using this option 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: The Set Costs option is available only for exporting by query. Before you can set
cost parameters, you must turn on the Target Level Emulation (TLE) tool. Enabling
the TLE may cause system performance degradation. For more information about
TLE, see SQL Reference: Statement and Transaction Processing. See Additional
Information on page vii.
5 When you finish making changes, click OK to close the Export Cost Parameters dialog box
and return to the Export Options dialog box.
6 Click OK to close the Export Options dialog box and return to the Export dialog box.
Cost Profiles
Select Cost Profiles in the Export Options area to capture the Optimizer environmental cost
profiles from a target system.
To define the cost profiles for your export
1 Click Options.
The Export Options dialog box opens.
2 [Optional] In the Profile Name box, you can change the name.
By default, the Profile Name box displays the file name you entered in the Export from
Teradata Database dialog box.
3 To capture specific cost profiles, click Select Rows to open the Export Cost Profiles dialog
box.
Chapter 5: Exporting
Working with Export Options
54 Teradata System Emulation Tool User Guide
4 To define the way that cost profiles are exported, do one of the following:
Select Capture from Source to export cost profiles from DBC.CostProfiles_v. This
option exports cost profiles after capturing the profiles from the target system.
Select Capture Current Cost Profile to export the active cost profile from the target
system.
Select Set Cost Profile to first set and then export the cost profile. Only one cost profile
can be set for a system. Using this option is similar to using a DIAGNOSTIC SET
PROFILE statement.
Note: The Set Cost Profile option is available only for exporting by query. Before you
can set a cost profile, you must turn on the Target Level Emulation (TLE) tool.
Enabling the TLE may cause system performance degradation. For more information
about TLE, see SQL Reference: Statement and Transaction Processing. See Additional
Information on page vii.
5 When you finish making changes, click OK to close the Export Cost Profiles dialog box and
return to the Export Options dialog box.
6 Click OK to close the Export Options dialog box and return to the Export dialog box.
Demographics
Select Demographics in the Export Options area to capture 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 to a user-specified
Chapter 5: Exporting
Working with Export Options
Teradata System Emulation Tool User Guide 55
QCD. To export Demographics information in addition to the information included when All
is selected, select the Demographics check box.
Depending on the type of export operation you perform, 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.
To define the demographics for your export
1 Click Options.
The Export Options dialog box opens. By default, the Demographics Source box displays
the name of the active QCD.
2 Click Select Tables to open the Export Demographics dialog box, which lists all of the
tables selected for export.
3 To define the way that demographics are exported, do one of the following:
Select Capture from QCD database to export demographic rows, if available, from the
active QCD source for the elements (objects) specified in the Demographics Source
box. If rows do not exist for the selected elements, current demographics are collected
into the QCD source, exported, then deleted from the QCD source.
Select Capture Current Demographics to export current demographics into the QCD
source that is specified in Demographics Source box. If demographics already exist for
Chapter 5: Exporting
Working with Export Options
56 Teradata System Emulation Tool User Guide
a table, the row is updated. If demographics do not exist for a table, the demographics
inserted into the QCD are deleted after the row is exported.
To view a graph or chart of the demographics for a selected table, highlight a row in the
Select Table Names area, and click View Demographics.
The Demographics interface opens and allows you to select and view demographic data in
various formats. For more information about the Demographics interface, refer to
Teradata Index Wizard User Guide. See Additional Information on page vii.
4 When you finish making changes, click OK to close the Export Demographics dialog box
and return to the Export Options dialog box.
5 Click OK to close the Export Options dialog box and return to the Export dialog box.
Execution Plans
Select Execution Plan in the Export Options area to capture in relational format the Optimizer
execution plans that are created for queries. A DUMP EXPLAIN script of the queries is also
captured.
Execution plans are captured based on the type of export operation:
Export by Query - In the QCD Name box, select the QCD you want to use, and select the
Execution Plan check box.
Execution plans can only be captured and imported when a QCD is specified during an
export operation and if the Execution Plan and Demographics check boxes are selected. In
this case, captured demographics are collected to a user-specified QCD.
Export by Database - To enable the Execution Plan check box, do the following:
Choose a QCD database from the Specify Export Database list and then select the
Query Capture Database check box and the Execution Plan check box.
Choose a QCD database from the List of Objects list, right click the item to open a
shortcut menu, and then select Mark As QCD. Select the Execution Plan check box.
Export by Workload - In the QCD Database box, select the QCD you want to use, and
select the Execution Plan check box.
Object Definitions
Select Object Definitions in the Export Options area to capture the data model and the DDL
text of selected objects or the objects referenced by a given query. This option lets you capture
the details of the structure and instances of the objects used by a given query.
Captured object definitions are used to create the tables, views, macros, triggers, indexes,
stored procedures, and user-defined types on a test system. This option is available for all three
types of exporting.
UDTs are exported as follows:
Export By Query exports the UDTs returned by the SHOW QUALIFIED statement on the
query.
Chapter 5: Exporting
Working with Export Options
Teradata System Emulation Tool User Guide 57
Export By Database exports the UDTs referenced by objects added for export and the
UDTs added manually for export.
Export By Workload exports the UDTs returned by the SHOW QUALIFIED statement on
the queries.
QCD Data
Select QCD Data in the Export Options area to export all execution plans, workloads, and
demographics from a QCD database. This option applies only to databases specified as
Marked as QCD when you export by database. At least one database must be designated as
Marked as QCD for this option to be enabled.
Note: This option is only applicable to QCD databases with QCF version 03.00.00 or higher.
Random AMP Samples
Select Random AMP Samples in the Export Options area to export the data distribution of a
table on one or more randomly selected AMPs based on the type of export operation.
Export by Database - Export the random AMP samples of the tables selected for export.
Export by Query - Export the random AMP samples for the tables referenced by the
specified queries.
Export by Workload - Export the random AMP samples for the tables referenced by the
workload queries.
Before you can set random AMP samples, you must turn on the Target Level Emulation (TLE)
tool. Enabling the TLE may cause system performance degradation. For more information on
TLE, see SQL Reference: Statement and Transaction Processing. See Additional Information
on page vii.
To define the random AMP samples for your export
1 Click Options.
The Export Options dialog box opens.
2 [Optional] In the RAS tag box, you can change the name.
By default, the box displays the file name you entered in the Export from Teradata
Database dialog box.
Note: You cannot set samples for more than 128 tables in the current session. However,
you can export as many rows as you like from SystemFE.Opt_RAS_Table.
Chapter 5: Exporting
Working with Export Options
58 Teradata System Emulation Tool User Guide
3 Click Select Tables to open the Export Random AMP Samples (RAS) dialog box.
4 In the Select Table Names list, highlight the tables you want to export, or click Select All to
highlight all of the tables.
5 To define the way that random AMP samples are exported, select one of the following:
Select Capture from Source to export random AMP samples from
SystemFE.Opt_RAS_Table. This lets you use random AMP samples already added to
SystemFE.Opt_RAS_Table. These samples can be manually added to
SystemFE.Opt_RAS_Table using another tool, such as using the DIAGNOSTIC DUMP
statement in BTEQ.
Note: If the row exists in SystemFE.Opt_RAS_Table, the samples are collected from it.
Otherwise, the samples are exported from the AMPs.
Select Capture from AMPs to export samples from the target system. Using this option
captures samples for the selected row directly from the AMPs. This option captures
samples to SystemFE.Opt_RAS_Table using the RAS tag you specify in the RAS tag box.
The samples are deleted after the row is exported.
Select Set Samples to first set the random AMP samples for the selected row before
exporting. This ensures that the Optimizer uses this set of samples when generating an
execution plan. You can set only one random AMP sample for each table you select.
Note: This option is available only when you export by query.
6 Click OK to close the Export Random AMP Samples (RAS) dialog box and return to the
Export Options dialog box.
Chapter 5: Exporting
Working with Export Options
Teradata System Emulation Tool User Guide 59
7 Click OK to close the Export Options dialog box and return to the Export dialog box.
Statistics
Select Statistics in the Export Options area to export the statistics based on the type of export
operation:
Export by Database - Export the statistics of the database objects selected for the export, if
any were collected.
Export by Query - Export the statistics that were collected (if any) for the database objects
referenced in the selected list of queries.
Export by Workload - Export the statistics for the database objects referenced by the
workload query.
Workloads
Select Workload in the Export Options area to export information about the specific queries
and recommendations of a workload. This option is enabled when you export by workload.
For information about how to view workload data, see Exporting by Workload on page 46.
Chapter 5: Exporting
Working with Export Options
60 Teradata System Emulation Tool User Guide
Teradata System Emulation Tool User Guide 61
CHAPTER 6 Importing
The following topics explain how to use Teradata SET to import to a test system:
Before You Begin
Importing to a Test System
Changing Import Options
Selecting Objects for Import
Changing RAS Byte Order
Editing Import Information
Other import features and options include:
Changing PermSpace
Customizing Emulation Information Offline
Using the Save As Feature
Displaying Existing Databases
Renaming Databases
Reordering Databases
Viewing Machine Configuration
Estimating Import Time
Before You Begin
The import function allows you to import emulation information to a test system where you
can perform query plan analysis. Before importing to a test system, read the following topics
Before Importing to a Test System
Read the following information before you begin importing:
Before importing, connect to a Teradata Database and perform an export operation.
If you used the Pack feature after exporting, use the Unpack feature before importing. See
Unpacking Files on page 95.
To find out how long the import process will take, see Estimating Import Time on
page 85.
Read this chapter for information on changing permanent space, using the Save As feature,
and estimating import time.
Chapter 6: Importing
Importing to a Test System
62 Teradata System Emulation Tool User Guide
Default Import Locations
Teradata SET creates an .mcf file when you export emulation information from a target
system. This file includes pointers to the raw data files that are also created during the export
process. When you use the import function, the data in these files is applied to the specific
default location.
The following table lists the default import locations and indicates whether you can change a
location:
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.
For more information, see Changing Import Options on page 65.
To change the location or target database where objects are created, use the Rename function
in the Import window. For more information, see Renaming Databases on page 79.
Importing to a Test System
Before you begin, be sure to review Before Importing to a Test System on page 61.
To import emulation information to a test system
1 From the main window, select Tools > Import or from the toolbar, click .
Table 19: Default Import Locations
When you import this item... It is imported to this location
Can you change
the location?
Cost parameters SystemFE.Opt_Cost_Table and Opt_DBSCtl_Table No
Cost profiles Data Dictionary No
Demographics Export Demographics Source Yes
Execution plans Export QCD Yes
Object definitions Export database Yes
Random AMP samples SystemFE.Opt_RAS_Table No
Statistics Data dictionary No
Workload data Export QCD Yes
Chapter 6: Importing
Importing to a Test System
Teradata System Emulation Tool User Guide 63
2 From the Open dialog box, select the .mcf file for which you want to import information.
When you select an .mcf file, the preview pane on the right displays information about the
file such as source system information, the exported options, the export date, and other
information. To disable the preview pane, clear the Show Preview check box.
Note: If any one or more raw data files associated with an .mcf file are missing, a
confirmation message displays the missing file name(s), along with a statement that the
corresponding option(s) cannot be imported. If you choose to continue, the Import
window opens.
3 Click Open.
The Import window opens with the file name in the title bar.
Chapter 6: Importing
Importing to a Test System
64 Teradata System Emulation Tool User Guide
4 In the import tree in the left pane, click to highlight objects such as a table.
The window features a menu and toolbar, different than those in the main window. For
more information about the menu and toolbar of the Import window, see Teradata SET
Import Window on page 23.
5 [Optional] You can perform any of the following actions before you import:
Changing Import Options on page 65
Selecting Objects for Import on page 68
Changing RAS Byte Order on page 70
Editing Import Information on page 71
6 Select File > Import or from the toolbar, click .
The following message asks you to confirm the import process.
7 Click Yes to start the import process.
Note: If a database you are importing does not exist on your system, it is first created.
Then the database objects are imported into the database.
Chapter 6: Importing
Changing Import Options
Teradata System Emulation Tool User Guide 65
While the import process occurs, the main window shows you the status of the process.
When the import process finishes, you see an Import completed message in the main
window.
If you receive errors while importing object definitions, see Retrying Failed Import
Operations on page 106.
You have successfully imported emulation information from a target system to a test system.
Now, you are ready to use it to emulate the production system for query plan analysis.
After the import process completes, you can view a summary report for the results of the
import operation. See Viewing Summary Reports on page 101.
After importing, you can remove emulation information you no longer need, delete files,
e-mail data to another location, or troubleshoot an export or import process. To learn how,
see Chapter 7: Managing Teradata SET.
Changing Import Options
Teradata SET allows you to set the characteristics of your import.
Chapter 6: Importing
Changing Import Options
66 Teradata System Emulation Tool User Guide
To change import options
1 From the Import window, select Options > Import Options or from the toolbar, click .
The Import Options dialog box opens.
2 In the Parent Database box, type or select the owner for any databases or users that are
created during the import operation, or click to load the available databases. Then,
select one from the drop-down list.
This box is enabled only when importing object definitions, demographics, execution
plans, and workloads.
The default value is the database that was established during log on.
3 In the Target QCD box, if available, specify the destination QCD for the import using one
of the following methods:
Type the name of a QCD in the Target QCD box.
Click to load the available QCDs, then select one from the drop-down list.
This box is enabled whenever the Execution Plans, QCD Data, Demographics, or
Workloads import option is selected.
If you do not specify a target QCD, the information is imported into the same QCD that it
was exported from. If the database does not exist, Teradata SET will either prompt you to
Chapter 6: Importing
Changing Import Options
Teradata System Emulation Tool User Guide 67
create the QCD or automatically create the QCD depending on the import error handling
options. For more information, see Changing Error Handling Options on page 104.
4 View the Source Version box that displays the QCF version number of the export system.
5 View the Current Version box that displays the QCF version number of the system you are
connected to.
6 In the Import Options area, clear the check boxes to exclude the item from the import.
Items are selectable only if they were included in the export.
Note: When you select the following options, check boxes appear next to the
corresponding object in the import tree. The check boxes enable you to do a partial import
if desired.
Table 20: Description of Import and Miscellaneous Options
Option Description
Import Options
Object
Definitions
Creates or defines the database objects.
Random AMP
Samples
Imports random AMP samples into the SystemFE.Opt_RAS_Table table.
Execution Plans Imports execution plans into a QCD.
Note: It is possible to import execution plans to a later version Teradata
Database, but to import execution plans to an earlier version requires that a
compatibly versioned QCD exist on the Teradata Database.
QCD Data Imports index recommendations, workload definitions, and execution plans
to the QCD specified in the Target QCD box. This check box is enabled if an
export by database was performed for one or more databases marked as
QCDs and the QCD Data option was selected. To import only execution
plans, clear the QCD Data check box and select Execution Plans.
Note: If the Target QCD box is left blank, the system creates QCDs with the
same names as those used during export. Data is then imported into these
QCDs.
Cost Profiles Imports cost profiles into the Data Dictionary.
Statistics Imports the statistics into the data dictionary.
Demographics Imports table demographics to the QCD specified in the Target QCD box.
Note: If the Target QCD box is left blank, the system creates QCDs with the
same names as those used during export. Data is then imported into these
QCDs.
Chapter 6: Importing
Selecting Objects for Import
68 Teradata System Emulation Tool User Guide
7 Click Error Handling to change how errors are handled during the import operation. For
more information about the Error Handling dialog box, see Changing Error Handling
Options on page 104.
8 Click OK to close the dialog box and return to the Import window.
You have successfully configured the options for an import operation.
To start importing, see Importing to a Test System on page 62.
To save the selections you made to the Import Options dialog box so you can use them again
for a future import operation, see Using the Save As Feature on page 78.
Selecting Objects for Import
You can select particular objects for import. Typically you do this if you want to perform a
partial import.
Refer to the following figure. From the Import window:
The import tree in the left pane of the window features an expandable view of the database
objects, object definitions, statistics, and random AMP samples that you are going to
import.
The view in the right pane provides information about any object that you highlight in the
import tree.
Workload Imports the workload definitions and any index recommendations to the
QCD specified in the Target QCD box. This check box is enabled if the
information was exported by workload.
Note: If the Target QCD box is left blank, the system creates QCDs with the
same names as those used during export. Data is then imported into these
QCDs.
Cost Parameters Imports system cost parameters into the SystemFE.Opt_Cost_Table table and
imports DBS Control information associated with the cost parameters.
Miscellaneous Options
Only synchronize
version of created
tables
During the import operation, the version is synchronized only with the tables
successfully created by TSET. If the box is not selected, the QCD.RELATION
table is synchronized with the version in the DBC.TVM table for all tables
referred to in the execution plan queries.
Note: This feature is enabled only when the Object Definitions and
Execution Plans check boxes are selected.
Table 20: Description of Import and Miscellaneous Options (continued)
Option Description
Chapter 6: Importing
Selecting Objects for Import
Teradata System Emulation Tool User Guide 69
For example, in the figure below, an object definition was chosen in the import tree. The
associated information of the object definition displays in the right pane.
Figure 4: Example of the Import Window with Object Definition Information
To select objects for import
Before you proceed with this procedure, begin an import. For more information, see
Importing to a Test System on page 62.
1 In the import tree, click the plus sign next to each database object to expand the view. A
check box is located next to each database object and allows you to select particular objects
for import.
2 To import all information, leave all check boxes selected. By default, all check boxes are
selected.
If you do not see a check box located next to an object, then the corresponding option is
not enabled for import. To enable it:
a Select Options > Import Options.
b Select the import option you want to enable.
c Click OK.
d Return to the import tree. A check box now appears next to that type of object.
3 Clear the check box next to the database objects you do not want to import.
For example, in the figure below, the check box next to the object definition was cleared so
the object definition will not be imported, assuming the table is already defined.
Chapter 6: Importing
Changing RAS Byte Order
70 Teradata System Emulation Tool User Guide
Clearing a check box at the parent level automatically clears all check boxes at the child
level. However you can select some check boxes and clear others in the same child level.
Figure 5: Example of a Partial Import
You have successfully selected objects for import. To start the import, proceed to the
following step.
4 [Optional] Select File > Import or from the toolbar, click to start the import. A message
asks you to confirm the import process. Click Yes to start the import process.
To save the selections you make to the import tree so you can use them again for a future
import operation, see Using the Save As Feature on page 78.
Changing RAS Byte Order
If you import random AMP samples to a different hardware platform with dissimilar byte
layout, the RAS byte order cannot be determined. Failing to change the byte layout can lead to
incorrect interpretation of the data.
To ensure the NumRows data is correctly interpreted, you can specify the byte order of the
source and target machines before initiating the import operation.
To change random AMP sample byte order
Note: If you are importing random AMP samples to the same hardware platform, do not
proceed. You do not need to change the RAS byte order.
1 In the import tree, click the plus sign next to RAS Tags to expand the view.
Chapter 6: Importing
Editing Import Information
Teradata System Emulation Tool User Guide 71
2 Right click a random AMP samples node and select RAS Byte Order.
The RAS Byte Order dialog box opens.
Note: If you change the byte order for one table, it changes it for all of the tables.
3 In the Source Machine Byte Order box, select Little-Endian or Big-Endian.
4 In the Target Machine Byte Order box, select Little-Endian or Big-Endian.
5 Click OK.
6 Ensure the check box, located next to the tag, is selected so it will be imported.
7 [Optional] Select File > Import or from the toolbar, click to start the import. A message
asks you to confirm the import process. Click Yes to start the import process.
Editing Import Information
Teradata SET provides standard Windows-type editing (find, search and replace, cut, copy,
paste) in the Import window so you can make changes in the editable text panes and tables in
the right side of the Import window.
The following types of information are editable:
Cost parameters, including DBS Control information
Object definitions
Random AMP samples
Statistics
Cost profiles
To edit import information
Before you proceed with this procedure, begin an import. For more information, see
Importing to a Test System on page 62.
1 Select an object to edit in the left pane.
Information is displayed in the right pane.
2 Select Edit > Allow Edit or from the toolbar, click .
3 Make your changes.
To edit statistics, random AMP samples, cost parameters, DBS Control information,
and cost profiles, double-click in the right pane on the data you want to edit.
For object definitions, edit directly.
Chapter 6: Importing
Changing PermSpace
72 Teradata System Emulation Tool User Guide
4 Select Edit > Apply Changes or from the toolbar, click .
Note: After you click Allow Edit, the edit mode is enabled until you click Apply Changes.
After you click Apply Changes, you cannot make further edits in the current window.
Figure 6: Example of Editing Statistics in the Import Window
5 [Optional] To proceed with your import, select File > Import or click from the toolbar
to start the import. A message asks you to confirm the import process. Click Yes to start
the import process.
To save changes to a different file name, see Using the Save As Feature on page 78.
Changing PermSpace
Teradata SET uses a formula to automatically calculate the permanent space (also called
permspace) required for creating a database based on the number of objects you select in the
import tree and the space required for creating child databases. However, the amount of space
calculated may be more than your system can spare or less than what is required. Permanent
space messages guide you through correcting this situation.
Beginning with Teradata SET version 2.2, you can specify the permspace required before
importing objects on a target system. Use the following procedure to avoid permanent space
messages.
Chapter 6: Importing
Changing PermSpace
Teradata System Emulation Tool User Guide 73
To change the permanent space
Before proceeding, connect to a Teradata Database and perform an export operation.
1 From the Import window, select Options > Change PermSpace or click from the
toolbar.
The Change PermSpace dialog box opens.
Note: Existing databases are displayed in blue. You cannot specify space for existing
databases.
The only editable fields in this dialog box are the Scale Factor and the User Specified Space
field. The following table explains the fields and buttons in this dialog box.
Table 21: Change PermSpace Dialog Box
Field or Button Description
Information Displays information to help you use the dialog box.
Warnings For rows shown in bold, displays warnings for database or QCD.
Chapter 6: Importing
Changing PermSpace
74 Teradata System Emulation Tool User Guide
Scale Factor(KB) An integral number Teradata SET uses to automatically calculate
space required to create the objects in a database. Change the Scale
Factor to a number between 1 and 100. The default is 32.
The Scale Factor has an effect on the value displayed in the
Calculated Space column.
Databases button Displays the space requirements for the databases in the import
tree.
Query Capture Databases
button
Displays the space requirements for the QCDs in the import tree.
Database Name or
Query Capture Database*
*The name depends on
which button is chosen.
Name of the database that will be created during the import
operation.
Calculated Space(KB) Displays the space required to create the database based on the
number of objects selected in the import tree. This amount includes
the calculated or user-specified space of any child databases.
The space requirements for each database is made based on the
number of tables and objects selected in the import tree and the
space required for creating child databases.
Displays an approximation of the deficit space by comparing the
Calculated Space and the Available Space.
User Specified Space(KB) Enter the calculated space for the new database. This will override
the Calculated Space value. If a discrepancy is found, a warning is
given when you click Recalculate.
If you are specifying space for a child database, it is considered in
calculating the space required for the parent database.
Minimum value is 0 KB. Maximum value is 2097151KB.
Note: You cannot specify space for an existing database.
Right click in this field for more options. See step 2 and step 3,
below.
Available Space (Existing
Databases) MaxPerm-
CurrentPerm(KB)
Displays the available permanent space for the database if it already
exists on the system. Existing databases are displayed in blue.
Parent Database Displays the immediate parent database of the database that will be
created.
Available or Required
Parent Database Space(KB)
If the parent database doesnt exist, displays the space projected to
create the child databases and any objects within the parent
database.
If the parent database exists, displays the available space (MaxPerm
CurrentPerm) for the parent database.
Table 21: Change PermSpace Dialog Box (continued)
Field or Button Description
Chapter 6: Importing
Changing PermSpace
Teradata System Emulation Tool User Guide 75
Note: Selecting stored procedures in the import tree does not affect the permanent space
calculation.
2 [Optional] If you chose the Databases button, right click in the User Specified Space(KB)
field and choose one or more of the following options:
3 [Optional] If you chose the Query Capture Databases button, right click in the User
Specified Space(KB) field and choose any of the following options:
Import Parent
Database(KB)
Displays the owner for the databases created during the import
operation. This is specified in the Parent Database box of the
Import Options dialog box.
Space Available(KB) Displays the available space (MaxPerm - CurrentPerm) for the
import parent database.
Space Required(KB) If you chose the Databases button, displays the space required to
create the databases.
If you chose the Query Capture Databases button, displays the
space required to create the QCDs.
Option Description
Check user specified space
against child database(s)
space
Checks if the child databases can be accommodated in the space
specified by the user. Teradata SET displays a warning if space
cannot be accommodated.
Check and update parent
database(s) space
Checks if the user specified space for a database can be
accommodated by the parent database(s). If the calculated space
for the parent database cannot accommodate the space specified,
Teradata SET attempts to update the parent database space.
A message displays if either the existing parent or user-specified
database space is insufficient.
Clear user specified space Clears the user specified space for a database.
Option Description
Check total QCD space
against available Parent
space
Checks if there is enough available space in the parent database to
accommodate the creation of the QCDs.
Check user specified space
against calculated space
for QCD
Checks the user specified space against the calculated space for a
QCD.
Clear user specified space
for QCD
Clears the user specified space for a QCD.
Table 21: Change PermSpace Dialog Box (continued)
Field or Button Description
Chapter 6: Importing
Customizing Emulation Information Offline
76 Teradata System Emulation Tool User Guide
4 Click Recalculate to recalculate the space for the parent database(s). The recalculation is
based on the amount entered in the User Specified Space, the Calculated Space of the child
databases, and the current scale factor.
5 Click Cancel to ignore changes and close the dialog box.
6 Click OK to accept the changes and close the dialog box.
You have successfully changed the permanent space.
To start importing, see Importing to a Test System on page 62.
SQL Statement Failed Dialog Box
When importing object definitions, certain errors such as insufficient access rights or
permanent space may occur. The SQL Statement Failed dialog box allows you to retry the
failed statement.
This dialog box displays if the Display Failed SQL statement dialog error handling option is
selected, regardless of the state of the Ignore database errors check box.
If an error occurs
1 When the SQL Statement Failed dialog box displays, do one of the following:
Click Abort to automatically abort the import operation.
Enter another SQL statement to grant the necessary privileges or increase the
permanent space, and 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.
2 Click Hide Failed SQL to hide the Failed Statement pane.
Customizing Emulation Information Offline
Teradata SET allows you to open and edit the emulation information without being connected
to a Teradata Database.
When you are offline, you can change import options, select objects for import, or edit import
information; however, you cannot import.
Note: If any one or more raw data files associated with an .mcf file are missing, a confirmation
message displays the missing file name(s), along with a statement that the corresponding
option(s) cannot be imported. If you choose to continue, the Import window opens.
Modifying Information Offline
To create different versions of the emulation files to test multiple scenarios from one exported
file, use the following procedure.
Chapter 6: Importing
Customizing Emulation Information Offline
Teradata System Emulation Tool User Guide 77
To modify information offline
1 From the main window, select Tools > Customize Data.
The Open dialog box displays a list of available .mcf files.
When you select an .mcf file, the preview pane on the right displays information about the
file such as source system information, the exported options, the export date, and other
information. To disable the preview pane, clear Show Preview.
2 In the Open dialog box, highlight an .mcf file to be the source of emulation information.
3 Click Open.
The Import window opens with the file name in the title bar. The Import window also
features an expandable import tree in the left pane that represents available information
associated with the selected .mcf file.
4 [Optional] You can do any of the following actions or continue with step 5.
Changing Import Options on page 65
Selecting Objects for Import on page 68
Editing Import Information on page 71
5 In this offline mode, all functions are available except the database interactive settings,
such as:
The ability to display existing databases
The ability to browse on Parent Database box in the Import Options dialog box
The ability to browse on the Target QCD box in the Import Options dialog box
6 When you finish making changes, you can save a new version of the file. To do this, see
Using the Save As Feature on page 78.
Chapter 6: Importing
Using the Save As Feature
78 Teradata System Emulation Tool User Guide
You have successfully created a new version of an original .mcf file. You are now ready to
connect to a Teradata Database and import the new version to a test system. To learn how, see
Importing to a Test System on page 62.
Using the Save As Feature
You can save changes you make to the import tree and the Import Options dialog box so you
can use them again for future import operations. The Save As feature also saves any database
name changes and any modifications you make to object definitions, statistics, random AMP
samples, cost parameters, DBS Control information, or cost profiles.
To save changes
1 After making changes, select File > Save As or from the toolbar, click .
The Save As dialog box opens.
2 In the File name box, type a name.
The file name must be different than the one that is currently opened. That is, you cannot
save the changes to the same file.
3 Click Save.
This creates a new .mcf file and the corresponding data files. When you reopen this .mcf
file the changes you made are retained.
Displaying Existing Databases
Teradata SET gives you the option to display existing databases. Typically, you may want to do
this to identify possible candidates when you rename a target database.
To display existing databases
1 From the Import window, select Options > Existing Databases or from the toolbar,
click .
Chapter 6: Importing
Renaming Databases
Teradata System Emulation Tool User Guide 79
The Existing Databases dialog box opens. Editing information in this dialog box is not
permitted.
2 The following table describes the columns in the dialog box.
3 Click OK to close the Existing Databases dialog box.
You have successfully displayed information about existing databases. Continue making
changes in the Import window or rename databases. To learn how, see Renaming Databases
on page 79.
Renaming Databases
After performing an export operation, Teradata SET gives you the option to rename a target
database. Renaming a target database is typically done if the database already exists on the test
system and you do not want to overwrite the database that is already there.
Caution: If the target database name is changed, you must also change the database name for all object
definitions. This can be done manually or automatically using the Replace dialog box which
displays after you rename a database.
Column Name Description
Database Name The name of the database.
Owner Name The name of the person who created the database.
Chapter 6: Importing
Renaming Databases
80 Teradata System Emulation Tool User Guide
Renaming a Target Database
After a target database has been renamed, the name change affects statistics, random AMP
samples, DDLs of the objects in the database, and DDLs of the objects that have dependencies
on the renamed object. The Replace dialog box enables you to change the database name for
all object definitions.
The following procedure can be performed regardless of whether you are connected to a
Teradata Database.
To rename a target database
1 From the Import window in the import tree, highlight the target database you want
renamed.
2 From the toolbar, click .
or
From the import tree, right click the database and select Rename.
3 Change the name of the database, and press Enter.
The following message appears.
4 If you do not want the message to appear in the future, select the Dont ask this question
again check box.
5 To change the database name in the object definitions, click Yes. The Replace dialog box
opens. Proceed to the next step.
or
To not change the database name in the object definitions, click No. The status bar displays
the following: Target database has been changed from old name to new
name.... You have successfully renamed the database and the object definitions have
not been renamed. Skip the remaining steps in this procedure.
Chapter 6: Importing
Renaming Databases
Teradata System Emulation Tool User Guide 81
6 Complete the information in the Replace dialog box. See the following table.
If Replace is chosen, the import tree expands and the corresponding DDL in the tree is
highlighted.
If Replace All is chosen, the total number of replacements displays at the bottom of the
Replace dialog box.
If Replace in all DDLs is chosen, the total number of replacements displays at the bottom of
the Replace dialog box.
Table 22: Replace Dialog Box Description
Text Box/Button/Check Box Description
Find what Displays the previous database name.
Replace with Displays the new database name.
Match whole word only Select to search for whole words.
By default, this check box is selected.
Match case Select to distinguish between uppercase and lowercase characters
during the search.
Search in all DDLs Select if you want the search to be conducted in all object
definitions.
By default, this check box is selected.
Find Next Select to find the next instance of the text in the object definition.
Replace Select to replace one instance of the text at a time in a single object
definition.
Replace All Select to replace all instances of the text at once in a single object
definition.
Replace in all DDLs Select to replace all instances of the text at once in all object
definitions.
Cancel Select to cancel the Replace operation and no changes are made
to the database name in the object definitions.
Chapter 6: Importing
Renaming Databases
82 Teradata System Emulation Tool User Guide
Note: From the Edit menu, the Allow Edit command is enabled the first time the Replace
button is selected to give you the option of modifying object definitions, random AMP
samples, statistics, cost parameters, DBS Control information, and cost profiles in the
right pane of the Import window.
7 Click Cancel to close the Replace dialog box.
Changes made to the object definitions, statistics, random AMP samples, cost parameters,
DBS Control information, and cost profiles must be committed and applied before
conducting the import operation.
8 To commit the name change, select Edit > Apply Changes or from the toolbar, click .
The status bar displays the following: Changes applied.
These changes are applicable only to the current import operation. To save these changes
for future import operations, see Using the Save As Feature on page 78.
You have successfully changed the name of a database and changed the database name for the
statistics and random AMP samples. Continue making changes in the Import window or
import the changed emulation information to a test system. To learn how to import, see
Importing to a Test System on page 62.
Undoing the Renaming of a Database
Typically you would undo the renaming of a database simply because you changed your mind.
The following procedure can be performed regardless of whether you are connected to a
Teradata Database.
To reverse the name change of a database
1 From the toolbar, click
or
From the import tree, right click on the database and select Undo Rename.
A message indicates you have undone the change made to the target database name and
noting you must also undo any changes made to the object definitions.
2 To reverse the name change in the object definitions, click Yes. The Replace dialog box
opens enabling you to change the name in the object definitions. For more information
about this dialog box, see Table 22 on page 81. Proceed to the next step.
or
To keep the database name in the object definitions, click No. The status bar displays the
following: You have undone the change made to the target database
name. You must also undo any change(s) made to the Object
Definitions.... You have successfully reversed the name of the database. However, the
object definitions have not been renamed. Skip the remaining steps in this procedure.
Chapter 6: Importing
Reordering Databases
Teradata System Emulation Tool User Guide 83
3 If Replace in all DDLs is chosen, a message indicates the application has searched and
replaced occurrences up to the end of the DDLs in the import tree and asks if you want to
continue the operation from the beginning of the tree.
Click Yes to continue the operation from the beginning of the tree.
or
Click No to stop the find and replace operation.
4 If you chose Yes, the number of replacements display in a message box.
5 Changes made to the object definitions, statistics, random AMP samples, and cost
parameters must be committed and applied before conducting the import operation. To
commit the name change, select Edit > Apply Changes or from the toolbar, click .
The status bar displays the following: Changes applied.
You have successfully reversed the name of a database and changed the database name for the
statistics and random AMP samples. Continue making changes in the Import window or
import the changed emulation information to a test system. To learn how to import, see
Importing to a Test System on page 62.
Reordering Databases
After you perform an export operation, you have the option to reorder the databases in
emulation information so you can resolve referential integrity dependencies during import.
Note: The following procedure is performed in the Import window and can be performed
regardless of whether you are connected to a Teradata Database.
To reorder databases
1 From the Import window, select Options > Order Databases or from the toolbar, click .
2 In the import tree in the left pane of the Import window, drag and drop database icons as
desired to change their order.
Only database icons can be reordered; database icons can only be reordered at the same
level.
You have successfully reordered databases in an .mcf file. Continue making changes in the
Import window or import the changed emulation information to a test system. To learn how,
see Importing to a Test System on page 62.
Viewing Machine Configuration
After performing an export operation using a WinCLI connection, Teradata SET gives you the
option to view the configuration of a source machine and to estimate the time needed for an
import. This section describes how to use these features.
Chapter 6: Importing
Viewing Machine Configuration
84 Teradata System Emulation Tool User Guide
Note: Machine configuration information is exported automatically when using a WinCLI
connection. However, this information is not exported when using an ODBC connection.
While you prepare emulation information for import, you might need to refer to the
configuration of the target system.
Note: The following procedure is performed in the Import window and can be performed
regardless of whether you are connected to a Teradata Database.
To view configuration information of the target system
From the Import window, select View > Source Machine Configuration or from the toolbar,
click .
The Source Machine Configuration dialog box opens and displays details about the
machine from which the system information was exported.
The Source Machine Configuration dialog box shows you the following facts about the
target system from which you exported system information:
Table 23: Source Machine Configuration Dialog Box
Row Name Description
Exported Option Type of export used (by database, by query, or by workload).
Version Teradata software version used.
Release Teradata software release used.
Date Date the system information was exported.
Time Time the system information was exported.
CharSet Character set used with the exported system information.
Chapter 6: Importing
Estimating Import Time
Teradata System Emulation Tool User Guide 85
Note: The physical configuration boxes (Number of AMPs, Number of PEs, Number of
Nodes, and Model number) are only available if the export operation was performed using
WinCLI connectivity and the user has MONRESOURCE privileges on the target system.
You have successfully viewed the configuration of a target system. Continue making changes
in the Import window, or import emulation information to a test system. To learn how to
import, see Importing to a Test System on page 62.
Estimating Import Time
Before you begin an import operation, you have the option to find out how long the process
will take.
Note: The following procedure is performed in the Import window. You must be connected
to a Teradata Database.
The Estimate Time function requires certain privileges. For more information, see Privileges
Required for Estimate Time Function on page 8.
To view the estimated import time
1 Select Tools > Import.
The Open dialog box displays.
2 Select the .mcf file for which you want to import information, and click Open.
3 Select View > Estimate Time or from the toolbar, click .
The Estimated Time dialog box opens.
Machine Name Name of the machine from which the system information was exported.
For a WinCLI connection, this is the system name you enter in the
HOSTS file. For an ODBC connection, this is the name you enter in the
Teradata Server Info area of the ODBC Driver Setup for Teradata
RDBMS dialog box.
Number of AMPs Number of AMPs configured on the machine.
Number of PEs Number of parsing engines (PEs) present on the machine.
Number of Nodes Number of nodes connected to the system. A node is a hardware
assembly that contains several tightly coupled central processing units
(CPUs).
Model Model number of the machine.
Table 23: Source Machine Configuration Dialog Box (continued)
Row Name Description
Chapter 6: Importing
Estimating Import Time
86 Teradata System Emulation Tool User Guide
The Estimated Time dialog box shows time estimates for each element you are importing
and gives you a total estimated time for the import operation.
4 Click Refresh to recalculate estimates for your current import.
5 Click OK to close the Estimated Time dialog box.
You have successfully viewed the estimated time needed for an import operation. Continue
making changes in the Import window or import emulation information to a test system. To
learn how to import, see Importing to a Test System on page 62.
Teradata System Emulation Tool User Guide 87
CHAPTER 7 Managing Teradata SET
The following topics will familiarize you with using the administrative features in Teradata
SET:
Target Level Emulation (TLE)
Testing a Query
Packing Files
Undoing Imported Files
Deleting Export Files
Viewing Log Files and Summary Reports
Error Handling
Disconnecting and Closing Teradata SET
Understanding Teradata SET File Extensions
Target Level Emulation (TLE)
Teradata SET allows to you apply Target Level Emulation (TLE) parameters using the Set
Target Level Emulation feature. Specifying random AMP samples (RAS), cost parameters, and
cost profiles at various levels for your connected test system allows you to create multiple
emulation scenarios for a wide range of testing possibilities on a single test system. Then,
when you are finished with your analysis, you can return a test system to its defaults using the
Reset Target Level Emulation dialog box. This section explains how to set and reset TLE.
Note: Before you can use Teradata SET to control emulation, the TLE feature must also be
turned on for the test system. You can do this through the DBS Control utility by setting the
general field 22 (Target Level Emulation) to TRUE. For a description of the DBS Control
utility, refer to Utilities. See Additional Information on page vii.
Setting Target Level Emulation
You can enable TLE and define RAS, cost parameters, and cost profiles using the Set Target
Level Emulation dialog box, which can be opened from either the main window or from the
Import window.
Note: The process of setting IFP and System levels for cost parameter emulation or cost
profile emulation that is explained in this procedure can only be set by a DBC or SystemFE
user. This limitation does not apply to setting random AMP sample emulation. For more
information, refer to SQL Reference: Statement and Transaction Processing. See Additional
Information on page vii.
Chapter 7: Managing Teradata SET
Target Level Emulation (TLE)
88 Teradata System Emulation Tool User Guide
The TLE function can be enabled at any time during your export and import operations, but
the following scenario is typical.
1 Export emulation information from a target system to a client machine using Teradata
SET.
2 Import that emulation information to a test system using Teradata SET.
3 Apply TLE using the Set Target Level Emulation feature in Teradata SET.
4 Capture query plans using the Teradata Visual Explain tool.
5 Analyze the query plan.
6 Reset RAS, cost parameters, and cost profiles on the test system using the Reset feature in
Teradata SET.
To set TLE
1 Open the Set Target Level Emulation dialog box by doing one of the following:
From the Teradata SET main window, select Tools > Set TLE or from the toolbar, click
. The dialog box displays the available emulation information on the current
system.
In the Import window, select Options > Set TLE or from the toolbar, click . The
dialog box displays the available emulation information from the export operation.
2 In the Set RAS tab, do one of the following:
Select the desired individual RAS tags.
Click Select All to apply all of the listed RAS tags.
3 In the Set RAS tab, define the level of the RAS emulation by selecting Session or System.
Chapter 7: Managing Teradata SET
Target Level Emulation (TLE)
Teradata System Emulation Tool User Guide 89
4 In the Set Costs tab, highlight individual cost tags. Only one cost tag can be set for each
level.
5 In the Set Cost Profiles tab, highlight an individual cost profile. Only one cost tag can be
set for each level. Define the level of the cost emulation by selecting Session, IFP, or
System.
6 Define the level of the cost emulation by selecting Session, IFP, or System.
7 When you finish making changes, click OK.
8 If you set the TLE from the main window, Teradata SET performs the emulation request
immediately and displays the results in the main window.
If you set the TLE from the Import window, Teradata SET performs the emulation request
at the end of the import operation. You can view the results in the summary report. For
more information, see Viewing Summary Reports on page 101.
You have successfully enabled the TLE function and set the RAS and cost parameters. You are
now ready to analyze query plans that are emulated on the test system. When you finish, you
can reset the original RAS and cost defaults on a test system. See Resetting Target Level
Emulation on page 89.
Resetting Target Level Emulation
After importing random AMP samples, cost parameters, and cost profiles, you can reset the
Target Level Emulation of the test system back to the system default values.
Note: Before resetting the test system default values, turn on the TLE feature for the test
system. You can do this through the DBS Control utility by setting the general field 22 (Target
Level Emulation) to TRUE. For a description of the DBS Control utility, see the following
publication: Utilities. See Additional Information on page vii.
To reset TLE
1 From the Teradata SET main window, select Tools > Reset TLE, or from toolbar, click .
Chapter 7: Managing Teradata SET
Target Level Emulation (TLE)
90 Teradata System Emulation Tool User Guide
The Reset Target Level Emulation dialog box opens.
2 Select the Reset RAS tab. Emulation is on for the tables shown. Do one of the following:
Select the individual RAS tags you wish to reset (turn emulation off).
To select more than one level, hold Shift as you click with the left mouse button. You
can also click and drag the mouse.
Click Select All to reset all of the listed RAS tags.
You can reset a sample at both session and system levels. The Level column displays the
reset level of the samples.
3 To reset the cost parameters, continue to step 4; otherwise, skip to step 6.
Chapter 7: Managing Teradata SET
Target Level Emulation (TLE)
Teradata System Emulation Tool User Guide 91
4 Select the Reset Costs tab. The cost parameters shown are currently in effect on your
system at the Session, IFP, and System levels. The Request level is shown if it was set.
5 Select the individual cost tags you wish to reset. To select more than one cost tag, hold Shift
as you click with the left mouse button.
6 To reset cost profiles, continue to step 7; otherwise, skip to step 9.
7 Select the Reset Cost Profile tab. The cost profiles shown are currently in effect on your
system at the Session, IFP, and System levels.
Chapter 7: Managing Teradata SET
Testing a Query
92 Teradata System Emulation Tool User Guide
8 Select the individual cost profiles to be reset. To select more than one cost profile, hold
Shift as you click with the left mouse button.
9 After you have made your selection, click OK.
10 View if the reset was successful from the Teradata SET main window. If the reset was
unsuccessful, helpful diagnostic information displays.
You have successfully returned the default RAS, cost parameters, and cost profiles on a test
system.
For information about setting cost and RAS parameters on a test system, see Setting Target
Level Emulation on page 87.
Testing a Query
Before exporting by query, you might find it useful to test certain queries. Teradata SET allows
you to execute SQL statements using either Teradata SQL Assistant or the Execute SQL
window so you can test the queries before using them.
To set the query tool interface
1 Select Tools > Options > Customize.
The Options dialog box opens.
2 Select or clear the check box labeled Use SQL Assistant rather than the Execute SQL
window before executing a query.
To execute a query
1 From the Teradata SET main window, select Tools > Execute SQL.
Depending on how you set the query tool interface, either the Teradata SQL Assistant
application or the Execute SQL window opens.
If you are using Teradata SQL Assistant, refer to Teradata SQL Assistant for Microsoft
Windows User Guide. See Additional Information on page vii.
Chapter 7: Managing Teradata SET
Packing Files
Teradata System Emulation Tool User Guide 93
2 If you are using the Execute SQL window, use the following procedures to execute a query:
You have successfully tested a query.
Packing Files
Occasionally, you might need to send exported files to another location via e-mail or ftp. You
can use the Pack feature to simplify file transfer by combining all of the files associated with an
export into a single file. Use the Unpack feature to separate the files after they have been
packed. This section explains how to create packed files and how to separate them.
Note: Because .pack files contain non-ASCII characters, binary mode should be used when
transferring them via ftp.
To test Do the following
a new query Initially an Untitled window appears. After you begin using this window,
it becomes the Query window.
1 Type the query you want to test in the Untitled window.
or
If queries exist in the History window, click the cell under the Query
column. The query appears in the Query window.
2 Select File > Execute Query or click .
The results appear in the Result Set window.
an existing query 1 Select File > Open Query.
2 From the Open dialog box, locate the query you want, and click Open.
3 The query appears in the Query window.
4 Remove heading information so just the query text exists.
5 Select File > Execute Query or click .
The results appear in the Result Set window.
Chapter 7: Managing Teradata SET
Packing Files
94 Teradata System Emulation Tool User Guide
Creating a Packed File
To create a packed file
1 From the Teradata SET main window, select Tools > Pack or from the toolbar, click .
The Pack dialog box opens.
2 Select the .mcf file that you want to pack.
When you select a .mcf file, the preview pane on the right displays information about the
file such as source system information, the exported options, the export date, and other
information. To disable the preview pane, clear Show Preview.
The Undo Files box displays any .undo files associated with your selection.
3 [Optional] To include an .undo file, highlight the file before clicking Pack.
4 [Optional] If cleanup files are available for packing, they appear in the Undo Files list.
Select the cleanup files you want to include before clicking Pack.
5 Click Pack.
The files associated with the .mcf file you selected are combined into one file with a .pack
extension.
You have successfully combined (packed) export files. Before importing, you can quickly
separate the file with the Unpack feature. For more information, see Unpacking Files on
page 95.
Chapter 7: Managing Teradata SET
Undoing Imported Files
Teradata System Emulation Tool User Guide 95
Unpacking Files
Emulation information can be transferred as a packed file that contains all the files associated
with an export operation. The Unpack feature allows you to separate the files.
To unpack files
1 From the Teradata SET main window, select Tools > Unpack or from the toolbar, click .
The Unpack dialog box opens and displays all available .pack files.
2 Select the .pack file you want to separate.
When you select a .pack file, the preview pane on the right displays information about the
file such as source system information, the exported options, the export date, and other
information. To disable the preview pane, clear Show Preview.
3 Click Unpack.
In the Teradata SET main window, the following message appears: Unpacking of
files successful.
You have successfully unpacked a .pack file.
Undoing Imported Files
When you finish with your query plan analysis, you can use Teradata SET features to reverse
the imported information that you no longer need.
Chapter 7: Managing Teradata SET
Undoing Imported Files
96 Teradata System Emulation Tool User Guide
Every import operation creates a corresponding .undo file. The Teradata SET Undo Import
feature allows you to reverse (undo, cleanup) the imported information to keep your test
system uncluttered. You can select multiple types of information to remove from a single
.undo file, but Teradata SET performs one undo import operation at a time.
Note: If objects are cleaned up once using the associated .undo file, they cannot be cleaned up
again using the same .undo file. Also, if objects are recreated using another Teradata SET
import operation, use the corresponding .undo file for clean up.
To undo an import
1 From the main window, select Tools > Undo Import or from the toolbar, click .
The Open dialog box opens and displays the available .mcf files.
2 Highlight an .mcf file that has an associated .undo file.
The Undo Files list displays any .undo files associated with your selection. When .undo files
are available, the Open button is enabled.
When you select an .mcf file, the preview pane on the right displays information about the
file such as source system information, the imported machine name, and the options
available for undo import (cleanup) operations. To disable the preview pane, clear Show
Preview.
3 Select an .undo file, and click Open.
Chapter 7: Managing Teradata SET
Undoing Imported Files
Teradata System Emulation Tool User Guide 97
The Undo Import File dialog box opens.
The name of the .undo file displays in the title bar. The .undo file is created during the
import process in the following format: <file name>.<current time
stamp>.undo.
Note: The undo import (cleanup) process is successful only when you are connected to
the same system that imported data to the .undo file that you are trying to remove.
4 In the Undo Import Options area, select the information you want to remove (clean up) in
the database.
5 Click Error Handling to change how errors are handled during the undo import (cleanup)
operation. For more information about the Error Handling dialog box, see Changing
Error Handling Options on page 104.
6 Click Undo Import to remove the selected .undo file, and close the Undo Import file dialog
box.
Note: An error messages lets you know when the undo import (cleanup) operation is only
partially successful. If this occurs, open the log file for the operation to diagnose the
problem. See Viewing Log Files on page 100.
In the main window, the following message appears: Undo Import completed.
After the undo import (cleanup) process completes, you can view a summary report for the
results. See Viewing Summary Reports on page 101.
Chapter 7: Managing Teradata SET
Deleting Export Files
98 Teradata System Emulation Tool User Guide
You have successfully removed (cleaned up) import information on a test system.
Deleting Export Files
When you finish a query plan analysis, you can use the Delete Files feature to delete individual
export files that you no longer need.
Depending on the export options you chose, a number of files are created when you export
emulation information from a target system to a test system. The Delete Files feature reads the
.mcf file, and depending on the export options you chose, removes the corresponding files
with extension like .ddl, .col, .dem, .opt, .qcd, .ras, .undo, and .mcf.
To delete files
1 From the main window, select Tools > Delete Files or from the toolbar, click .
The Delete Files dialog box opens with the available .mcf files.
2 Select the .mcf file you want to delete.
When you select an .mcf file, the preview pane on the right displays information about the
file such as source system information, the exported options, the export date, and other
information. To disable the preview pane, clear Show Preview.
Only .mcf files appear in the list. However, when you delete the .mcf file, all associated files
are also deleted, with the exception of the .pack file.
3 [Optional] To remove the .pack file with the delete operation, select the Delete Pack File
check box.
Chapter 7: Managing Teradata SET
Viewing Log Files and Summary Reports
Teradata System Emulation Tool User Guide 99
4 Click Delete.
A message asks you to confirm the deletion.
5 Click Yes to remove the files.
When the process is complete, you will see a message in the main window: Deleting of
files successful.
You have successfully removed an .mcf file and all its associated files.
If you need to, you can restore the deleted files from the Recycle Bin. If you do, they are
automatically restored to the appropriate directory. Then you can re-use the files.
Viewing Log Files and Summary Reports
Occasionally you may need to troubleshoot an export process, an import process, or an undo
import (cleanup) process. You can use the log file to view the events in the current Teradata
SET session and find the information you need. The summary report contains a summary of
the failed and successful operations.
Chapter 7: Managing Teradata SET
Viewing Log Files and Summary Reports
100 Teradata System Emulation Tool User Guide
Viewing Log Files
To view the log file for your current Teradata SET session
1 From the main window, select View > Log File or from the toolbar, click .
The Open dialog box displays the log files that are available. By default, the name of the log
file most recently used appears in the File name box.
2 Highlight a log file.
3 Click Open.
Chapter 7: Managing Teradata SET
Viewing Log Files and Summary Reports
Teradata System Emulation Tool User Guide 101
The log appears in the main window.
4 To close the log file, click the button again, or deselect Log File from the menu.
5 To close the log file, select View > Log File again to uncheck it in the menu bar or from the
toolbar, click .
You have successfully viewed a log file.
Viewing Summary Reports
For the results of an import, export, or undo import (cleanup) operation, view the summary
report. The summary report contains a summary of the failed and successful operations.
Reports are stored in the text file format with the extension .rpt.
Chapter 7: Managing Teradata SET
Viewing Log Files and Summary Reports
102 Teradata System Emulation Tool User Guide
To view a summary report
1 After you perform an import, export, or undo import (cleanup) operation, select
View > Summary Report or, from the toolbar, click .
The Open dialog box displays.
2 Choose the .rpt file corresponding to the operation you performed, and click Open.
Chapter 7: Managing Teradata SET
Error Handling
Teradata System Emulation Tool User Guide 103
A report opens of the most recent operation that summarizes only the failures that
occurred during the import.
3 To close the report, select View > Summary Report again to uncheck it or, from the toolbar,
click .
To control the contents of the summary report to only log failed operations, you can change
the error handling options. See Changing Error Handling Options on page 104. In the Error
Handling tab, select Log only failures in Summary Report.
For detailed information about the operation, consult the log file. See Viewing Log Files on
page 100.
Error Handling
You can change how errors are handled during export, import, or undo import (cleanup)
operations. For more information, see Changing Error Handling Options on page 104.
When importing object definitions, certain errors such as insufficient access rights or
permanent space may occur. For more information, see Retrying Failed Import Operations
on page 106. If permanent space errors occur, see Changing PermSpace on page 72.
Chapter 7: Managing Teradata SET
Error Handling
104 Teradata System Emulation Tool User Guide
Changing Error Handling Options
You can change how errors are handled during export, import, or undo import (cleanup)
operations.
To change error handling options
1 Select Tools > Options from the menu bar.
The Options dialog box opens.
2 Select the Error Handling tab.
3 Refer to the following table and select the check boxes to change how errors will be
handled.
4 After changing your selection, click Apply, then click OK.
Table 24: Options Dialog Box: Error Handling Tab
Check Box Description
General: Applies to export, import, or undo import (cleanup) operations.
Log only failures in Summary
Report
Select this check box to log the operations that failed into the
summary report. Consult the log file to determine the cause
of any failures.
Ignore database errors Select this check box to prevent Teradata Database error
messages from being displayed while performing export,
import, or undo import (cleanup) operations. You can
review the log file for information about the errors.
Chapter 7: Managing Teradata SET
Error Handling
Teradata System Emulation Tool User Guide 105
Import: Applies only to import operations.
Note: Depending on other settings you select in the Import section, some errors may display. For
example, if you select the Display Object exists check box, an error may display if a table that is
being imported already exists on the system. If you clear this check box, all Teradata Database
error messages are displayed.
Display Failed SQL statement
dialog
Select this check box to display the SQL Statement Failed
dialog box. This dialog box allows you to abort the import,
ignore the error and continue importing, or enter SQL to
correct insufficient access rights or permanent space errors
and then retry the failed statement. Database errors than can
be retried include: 2644, 2843, 3250, 3523, or 3524.
If you clear this check box, the SQL Statement Failed dialog
box does not display and these errors are automatically
ignored during future import operations.
For more information about the SQL Statement Failed
dialog box, see Retrying Failed Import Operations on
page 106.
Display Object exists dialog Select this check box to display a message that the importing
object already exists on the machine during import of object
definitions and asking if you wish to overwrite it. The
message box gives you the following choices: Yes, Yes To All,
No, No To All, and Cancel.
If you clear this check box, the Display Object Exists dialog
box does not display and the Option drop-down box
becomes enabled. When you select the following options,
messages are automatically answered without Teradata SET
prompting you:
Yes To All to drop all existing objects and recreate all
exported objects.
No To All to not drop existing objects and continue with
the import operation.
Cancel to automatically abort the import operation if any
objects already exist.
Prompt to create non-existing
QCDs
Select this check box to have a message prompt you to create
a QCD if the target QCD does not exist during importing of
QCD-related information.
If you clear this check box, a target QCD is created
automatically without Teradata SET prompting you.
Table 24: Options Dialog Box: Error Handling Tab (continued)
Check Box Description
Chapter 7: Managing Teradata SET
Error Handling
106 Teradata System Emulation Tool User Guide
Retrying Failed Import Operations
When importing object definitions, certain errors such as insufficient access rights or
permanent space may occur. The SQL Statement Failed dialog box allows you to retry the
failed statement.
This dialog box displays if the Display SQL Statement Failed dialog check box is selected,
regardless of the state of the Ignore database errors check box. For information on these check
boxes, see Table 24 on page 104.
If an error occurs
1 When the SQL Statement Failed dialog box displays, do one of the following:
Click Abort to automatically abort the import operation.
Enter another SQL statement to grant the necessary privileges or increase the
permanent space, and click Retry.
Display duplicate primary key error: Applies only during import of random AMP samples;
workloads; or cost parameters, DBS Control information, and cost profiles.
Random AMP Samples Select this check box to be prompted with a dialog box to
enter a new system name/RAS tag if a duplicate prime key
error occurs while importing Random AMP Samples.
If you clear the Random AMP Samples check box and if the
rows already exist on the import system, the import
operation will fail with duplicate prime key errors.
Select Use the new tag for the rest of the RAS import if you
want the new RAS tag used if duplicate primary key errors
occur in the rest of the import of the RAS rows. If you clear
this check box, the same dialog box displays for all RAS tags
when the duplicate primary key error occurs.
Workloads Select this check box to be prompted with a dialog box to
enter a new workload name if a duplicate prime key error
occurs while importing workloads.
If you clear the Workloads check box and a workload already
exists in the target QCD, the import operation will fail with
duplicate prime key errors.
Cost Parameters, DBS Control,
and Cost Profile records
Select this check box to be prompted with a dialog box to
enter a new cost tag if a duplicate prime key error occurs
while importing cost parameters, DBS Control information,
and cost profiles.
If you clear this check box and rows already exist on the
import system, the import operation will fail due to any
duplicate prime key errors.
Table 24: Options Dialog Box: Error Handling Tab (continued)
Check Box Description
Chapter 7: Managing Teradata SET
Disconnecting and Closing Teradata SET
Teradata System Emulation Tool User Guide 107
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.
2 Click Hide Failed SQL to hide the Failed Statement pane.
To change how errors are handled during export, import, or undo import (cleanup)
operations, see Changing Error Handling Options on page 104.
Disconnecting and Closing Teradata SET
When you are finished exporting and importing emulation information, you can disconnect
from the Teradata Database using the Disconnect feature. Closing Teradata SET also
disconnects your session from a Teradata Database.
Disconnecting from a Teradata Database
To disconnect from a Teradata Database
1 From the main window, select File > Disconnect or from the toolbar, click .
A message asks you to confirm that you want to log off from the Teradata Database.
2 Click Yes to close the message and return to the main window.
You have successfully disconnected from a Teradata Database. Now, you can connect to
another database or close Teradata SET. To learn how to close Teradata SET, see Closing
Teradata SET on page 107.
Closing Teradata SET
After you complete operations using Teradata SET, you need to close the application and
return to your Windows desktop.
Chapter 7: Managing Teradata SET
Understanding Teradata SET File Extensions
108 Teradata System Emulation Tool User Guide
To close Teradata SET
1 From the main window, select File > Exit.
If you are connected to a database or if the Import window is open, a message asks you to
confirm that you want to close the application.
2 Click Yes to close the dialog box, close Teradata SET, and return to your Windows desktop.
You have successfully closed Teradata SET.
Understanding Teradata SET File Extensions
Teradata SET captures emulation information in a variety of file types. All of the files created
during export, import, and pack operations are saved in the file and directory you specify in
the Export to area of the Export from Teradata Database dialog box.
All exported parameters are stored in a control (.mcf) file. For more information about this
type of file, see Control Files on page 109.
Emulation information is saved with the following file extensions:
Table 25: Teradata SET File Extensions
File Type File Extension Saved During
Cleanup files .undo Import
Control information .mcf Export
Cost parameters, DBS control
parameters, and cost profiles
.opt Export
Demographics .dem Export
Execution plans and workloads .qcd Export
Log files .log Export
Import
Undo (Cleanup)
Object Definitions .ddl Export
Packed files .pack Pack
Chapter 7: Managing Teradata SET
Understanding Teradata SET File Extensions
Teradata System Emulation Tool User Guide 109
Control Files
All exported parameters are stored in a control (.mcf) file that has the following
characteristics:
The file tracks elements (such as the object definition, statistics, cost parameters, cost
profiles, execution plans, and random AMP samples) that are selected and exported.
The file contains pointers to the raw data files that are created during the export process.
The file contains a version number, release number, and the date and time the system
information was exported from the target data source.
Random AMP samples .ras Export
SQL statements .sql Export
Statistics .col Export
Summary reports .rpt Export
Import
Undo (Cleanup)
Table 25: Teradata SET File Extensions (continued)
File Type File Extension Saved During
Chapter 7: Managing Teradata SET
Understanding Teradata SET File Extensions
110 Teradata System Emulation Tool User Guide
Teradata System Emulation Tool User Guide 111
APPENDIX A Command Line Interface
The following topics will familiarize you with the command line interface:
Command Line Switches
Using the Command Line
Export, import and undo (cleanup) operations can be performed for object definitions,
statistics, random AMP samples, execution plans, Optimizer cost parameters, cost profiles,
DBS Control information, demographics, and workload information.
Command Line Switches
The following tables describe the command line switches for Teradata SET. The command line
switches are not case-sensitive.
Table 26: Command Line Switches
Switch Task
am Set authentication mechanism and parameter for connecting to a database.
c Connect using ODBC.
ed Export by database for the specified database name.
eqf Export by query for the queries contained in the specified file.
eqt Export by query for the query specified on the command line.
ewl Export by workload for the specified workload name.
ewr Export specific recommendation tags during an export by workload.
f Save the exported information to the specified file.
i Import information from the specified file.
icf Read the command switches from the specified file instead of the command line.
l Connect using WinCLI.
qcd Export and import QCD-related information.
scs Specify session character set.
u Clean up information using the specified file.
unx Retrieve data from the QCD using non-X Views.
Appendix A: Command Line Interface
Using the Command Line
112 Teradata System Emulation Tool User Guide
The following table describes the command line switches for export options and import
options. If you do not specify an option, all options are considered. You can specify these
options in any combination and in any order, for example, -drs or -d -s -r.
Using the Command Line
The following topics will assist you in using the command line:
Logging on Using the Command Line
Exporting Using the Command Line
Importing Using the Command Line
Cleaning Up Imported Information Using the Command Line
Using the Input Command File Switch
Logging on Using the Command Line
Use the command line interface of Teradata SET to log on to the Teradata Database using
either ODBC or WinCLI connectivity. When only the log on switch is specified in the
ux Retrieve data from the QCD using X Views.
xapp Keep the application open and connected following an export, import, or undo
(clean up) operation. By default, the application automatically disconnects and
closes after the operation completes or an unsuccessful log on occurs.
Table 27: Command Line Switches for Export Options and Import Options
Switch Task
d Export/import/cleanup for object definitions.
e Export/import/cleanup for cost profiles
g Export/import/cleanup for demographics.
o Export/import/cleanup for Optimizer cost parameters and DBS Control
information.
p Export/import/cleanup for execution plans.
r Export/import/cleanup for random AMP samples.
s Export/import/cleanup for statistics.
w Export/import/cleanup for workload information including workload definitions
and index recommendations.
Table 26: Command Line Switches (continued)
Switch Task
Appendix A: Command Line Interface
Using the Command Line
Teradata System Emulation Tool User Guide 113
command, the application remains open after a connection is established regardless of the
xapp switch.
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>]
Exporting Using the Command Line
Use the command line interface to export information for a specified database. To export
demographics, an existing QCD database must be specified with the qcd switch.
Exporting 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]]
Table 28: Logging on to the Teradata Database: Syntax Examples
Syntax Example Description
tset -c mydsn Logs on using ODBC to the data source named
mydsn. If the complete log on information is not
available in the DSN, the Teradata Database dialog
box displays.
tset -c mydsn\jeff\padres Logs on using ODBC to the data source named
mydsn with the username jeff and password padres.
tset -c mydsn\padres Logs on using ODBC to the data source named
mydsn with the password padres. If the username is
not available in the DSN, the Teradata Database
dialog box displays.
tset -l mytdpid\jeff Displays the Connect to Teradata Database dialog box
and waits for the input of a password. Then connects
to the Teradata Database named mytdpid with the
username jeff using WinCLI.
tset -l mytdpid\jeff\padres Logs on using WinCLI to the Teradata Database
named mytdpid with the username jeff and password
padres.
Appendix A: Command Line Interface
Using the Command Line
114 Teradata System Emulation Tool User Guide
Exporting by Query
Use the command line interface to export information for a specified query. You can either
enter the query on the command line or specify a file name containing one or more queries.
To export demographics, an existing QCD database must be specified with the qcd switch. 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>]
[-qcd <qcdname>]
[-f <exportfile>]
[-d -s -r -p -o -g -w -e]
[-ux|-unx]
[-xapp]]
Table 29: Exporting by Database: Syntax Examples
Syntax Example Description
tset -l prod\dbc\dbc -ed db1 -dsro Exports object definitions, statistics and random
AMP samples for the database db1 from the system
prod. Cost parameters are also exported from the
system. The exported data is saved to file using the
name prod.
tset -l test\jeff -ed qcd -p -ux Exports execution plans from the QCD database
named qcd from the system test. Only plans captured
by the user jeff are exported. The exported data is
saved to file using the name test.
tset -c prod -ed dbc -o -f cost Exports only cost parameters from the system prod.
The exported data is saved to file using the name cost.
Table 30: Exporting by Query: Syntax Examples
Syntax Example Description
tset -l prod\dbc\dbc -qcd myqcd
-dsro -eqt "select * from orders"
-f query1
Exports object definitions, statistics and random
AMP samples for the objects referenced by the
specified query from the system prod. Cost
parameters are also exported from the system. The
execution plan for the query is exported using the
QCD database named myqcd. The exported data is
saved to file using the name query1.
tset -c prod -p -eqf query.txt
-f queryplans
Exports the execution plans for all of the queries in
the file query.txt from the system prod. The QCD
database name qcd is used by default. The exported
data is saved to file with the name queryplans.
Appendix A: Command Line Interface
Using the Command Line
Teradata System Emulation Tool User Guide 115
Exporting 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> ]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
-qcd <qcdname> -ewl <workloadname>
[-ewr <recommendationtag1> [-ewr <recommendationtag2> ... ]]
[-f <exportfile>]
[-d -s -r -p -o -g -w -e]
[-xapp]]
Importing Using the Command Line
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>
[-d -s -r -p -o -g -w -e]
[-xapp]]
Table 31: Exporting by Workload: Syntax Examples
Syntax Example Description
tset -l prod\dbc\dbc -qcd qcd
-ewl wl1 -dsrpow -f workload1
Exports object definitions, statistics and random
AMP samples for the objects referenced by the
queries of workload wl1 in the QCD named qcd from
the system prod. 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 file using
the name workload1.
Table 32: Importing: Syntax Examples
Syntax Example Description
tset -l test\dbc\dbc -i prod.mcf Imports all the information available in the file
prod.mcf onto the Teradata Database named test.
Appendix A: Command Line Interface
Using the Command Line
116 Teradata System Emulation Tool User Guide
Cleaning Up Imported Information Using the Command Line
Use the command line interface to clean up or remove information previously imported onto
a Teradata Database. If the requested information is not available to be cleaned up, then the
switch is ignored.
Use the following command syntax to clean up imported information:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
-u <undofile>
[-d -s -r -p -o -g -w -e]
[-xapp]]
Using the Input Command File Switch
Use the input command file switch to read command options from a file. No other switch is
allowed on the command line when the icf switch is specified.
Use the following command syntax to specify an input command file:
tset [-icf <commandfile>]
tset -c test -i cost.mcf -o -xapp Imports cost parameters from the file cost.mcf onto
the Teradata Database named test. The application
remains open after the import is completed.
Table 32: Importing: Syntax Examples (continued)
Syntax Example Description
Table 33: Cleaning Up Imported Information: Syntax Examples
Syntax Example Description
tset -c test
-u prod.31-Jul-04.22.33.12.undo
Cleans up the information that was imported onto
the Teradata Database named test as logged in the
specified .undo file.
Table 34: Input Command File Switch: Syntax Example
Syntax Example Description
tset -icf command.txt
where the file command.txt contains the
following text.
-c mydsn -ed db1 -dsro
Reads command options from the file named
command.txt and executes the command.
Teradata System Emulation Tool User Guide 117
Glossary
A
administrator A special user responsible for allocating resources to a community of users.
Access Module Processor (AMP) A virtual processor that receives steps from a parsing
engine (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.
access rights See privilege.
AMP See Access Module Processor (AMP).
C
Call-Level Interface (CLI) A programming interface designed to support SQL access to
databases from shrink-wrapped application programs. SQL/CLI provides and international
standard implementation-independent CLI to access SQL databases. Client-server tools can
easily access database through dynamic link libraries. It supports and encourages a rich set of
client-server tools.
column In the relational model of Teradata SQL, databases consist of one or more tables. In
turn, each table consists of fields, organized into one or more columns by zero or more rows.
All of the fields of a given column share the same attributes.
cost This is the outlay of database resources used by a given query.
D
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 (DDL) 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, pre-
relational data management system, data definition and data manipulation facilities are
separated, and the data definition facilities are less flexible and more difficult to use than in a
relational system.
Data Dictionary In the Teradata Database, the information automatically maintained about
all tables, views, macros, databases, and users known to the Teradata Database system. It
includes information about ownership, space allocation, accounting, and access right
relationships between those objects. Data Dictionary information is updated automatically
Glossary
118 Teradata System Emulation Tool User Guide
during the processing of Teradata SQL data definition statements. It is used by the parser to
obtain information needed to process all Teradata SQL statements.
Data Manipulation Language (DML) In Teradata SQL, the statements and facilities that
manipulate or change the information content of the database. These statements include
INSERT, UPDATE, and DELETE.
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.
DBA Acronym for Database Administrator.
DBS Acronym for Database System or Database Software.
DBS Control information DBS Control information is a group of fields used by Teradata
Database for debugging and diagnostic purposes, establishing known global system values,
and conducting performance tuning.
DBW Acronym for Database Windows.
domain name A group of computers whose hostnames (the unique name by which a
computer is known on a network) share a common suffix, that is the domain name.
E
export This refers to extracting or transferring system information from the tables and
views of a given Teradata Database and saving it so it can be manipulated or pulled into
another system.
F
field The basic unit of information stored in the Teradata Database. A field is either null, or
has a single numeric or string value. Also see column, database, row, and table.
G
Globally Distributed Objects (GDO) 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.
J
join A select operation that combines information from two or more tables to produce a
result.
Glossary
Teradata System Emulation Tool User Guide 119
L
log A record of events. A file that records events. Many programs produce log files. Often
you will look at a log file to determine what is happening when problems occur. Log files have
the extension .log.
M
macro A set of Teradata SQL statements stored by the 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 that enables you to speed up your export and
import operations with multiple connections.
N
name A word supplied by the user that refers to an object, such as a column, database,
macro, table, user, or view.
null The absence of a value for a field.
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, and macros, triggers, join
indexes, and stored procedures in a database.
Open Database Connectivity (ODBC) Under ODBC, drivers are used to connect
applications with databases. The ODBC driver processes ODBC calls from an application, but
passes SQL requests to the Teradata Database for processing.
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 that are created during an import operation. The owning database or user is where the
permanent storage space will be taken for the new database or user that is created. The Parent
Database box corresponds to the 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 parsing engine that translates Teradata SQL statements
entered by a user into the steps that accomplish the users intensions.
Glossary
120 Teradata System Emulation Tool User Guide
Parsing Engine (PE) An instance (virtual processor) of the database management session
control, parsing, and dispatching processes and their data context (caches).
privilege In Teradata SQL, a users right to perform the Teradata SQL statements granted to
him against a table, database, user, macro, or view. Also known as access right.
production system A Teradata Database used in a live environment. A system that is actively
used for day to day business operations. This differs from a test or development system that is
used to create new queries or test new features before using them on the production system.
Q
query A Teradata SQL statement, such as a SELECT statement.
Query Capture Database (QCD) A database of relational tables that store the steps of any
query plan captured by the Query Capture Facility (QCF).
Query Capture Facility (QCF) Provides a method to capture and store the steps from any
query plan in a set of predefined relational tables called the Query Capture Database (QCD).
R
random AMP sample (RAS) An arbitrary sample from an Access Module Processor (AMP).
These are samples of the tables in a query or all of the tables in a given database. Also known as
RAS.
Relational Database Management System (RDBMS) A database management system in
which complex data structures are represented as simple two-dimensional tables consisting of
columns and rows. For Teradata SET, RDBMS is referred to as Teradata Database.
request In host software, a message sent from an application program to the Teradata
Database.
result The information returned to the user to satisfy a request made of the Teradata
Database.
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.
S
session In client software, a logical connection between an application program on a host
and the Teradata Database. It permits the application program to send one request to and
receive one response from the Teradata Database at a time.
single sign-on (SSO) Allows users of the Teradata Database on Windows 2000 systems to
access the Teradata Database based on their authorized network usernames and passwords.
This feature simplifies the procedure requiring users to enter an additional username and
password when logging on to Teradata Database via client applications.
SQL See Structured Query Language (SQL).
Glossary
Teradata System Emulation Tool User Guide 121
statement A request for processing by the Teradata Database that consists of a keyword verb,
optional phrases, and operands. It is processed as a single entity.
statistics These are 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 non-procedural statements run using a
single call statement.
Structured Query Language (SQL) The initials, SQL, are pronounced either see-kwell or as
separate letters. 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.
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 database.
target system A Teradata Database from which you export Optimizer-specific information
for modeling on a second, test system. Also known as a production system.
Target Level Emulation (TLE) Permits you to emulate a target environment (target system)
by capturing system-level information from that environment. The captured information is
stored in the relational tables SystemFE.Opt_Cost_Table and SystemFE.Opt_RAS_Table. The
information in these tables can be used on a test system with the appropriate column and
indexes to make the Optimizer generate query plans as if it were operating in the target system
rather than the test system.
Teradata SET Acronym for Teradata System Emulation Tool.
test system A Teradata Database where you want to import Optimizer-specific information
to emulate a target system and create new queries or test new features.
trigger One or more Teradata SQL statements associated with a table and executed when
specified conditions are met.
U
user A database associated with a person who uses the Teradata Database. The database
stores the persons private information and accesses other Teradata Databases.
User Defined Type (UDT) A data type defined by someone other than Teradata. UDTs
come in two variations: Distinct and Structured.
V
view An alternate way of organizing and presenting information in the Teradata Database. A
view, like a table, has rows and columns. However, the rows and columns of a view are not
directly stored by the Teradata Database. They are derived from the rows and columns of
tables (or other views) whenever the view is referenced.
Glossary
122 Teradata System Emulation Tool User Guide
W
Windows Call-Level Interface (WinCLI) A Call-Level Interface designed for a Windows
platform. See Call-Level Interface (CLI) for more information.
X
X views An option in Teradata SET that enables you to set a restricted view of plans in the
QCD information. For more information, see Table 16 on page 30.
Teradata System Emulation Tool User Guide 123
Index
Symbols
.col file
deleting 20, 98
saving 109
.ddl file
deleting 20, 98
saving 108
.dem file
deleting 20, 98
saving 108
.log file
saving 108
.mcf file
deleting 20, 98
imported files, undoing 96
multiple files, creating 76
packing 93
saving 108
unpacking 95
.opt file
deleting 20, 98
saving 108
.pack file
creating 93
deleting with .mcf file 98
saving 108
unpacking 95
.qcd file
deleting 20, 98
saving 108
.ras file
deleting 20, 98
saving 109
.rpt file
saving 109
.sql file
saving 109
.undo file
creating 95
deleting 20, 98
saving 108
A
About Teradata System Emulation Tool dialog box 21
access rights
Estimate Time command 8
export 6
import 7
undo import or cleanup 8
Account String box 36
acronyms 117
administrative features, Teradata SET 87
All check box 50
Allow Edit
import information, editing 71
menu command 25
AMPs, viewing number of 85
Apply Changes
import information, editing 72
menu command 25
apply edits
Import window toolbar button 28
architecture, Teradata SET 3
audible notification
default setting, changing 30
toolbar button 23
B
Browse for Folder dialog box 33
C
Capture Current Cost Profile option 54
Capture Current Costs option 52
Capture Current Demographics option 55
Capture from AMPs option 58
Capture from QCD Database option 55
Capture from Source option 54
cost parameters 52
random AMP samples 58
Change PermSpace
Import window toolbar button 28
menu command 26
changing
error handling options 33
font color 19, 25
font size 19, 25
font style 19, 25
RAS byte order 70
X views default setting 31
cleanup
file extensions 108
imported files, undoing 95
Index
124 Teradata System Emulation Tool User Guide
using the command line 116
CLIv2
connectivity 5
closing
Import window toolbar button 28
Teradata SET 107
command line
cleaning up (undoing) 116
exporting by database 113
exporting by query 114
exporting by workload 115
importing 115
logging on 112
switches 111
syntax examples 112
compatibility
ODBC driver 5
WinCLI 5
configuration
source machine, viewing 83
connect
CLIv2 5
connectivity type, choosing 32
menu command 18
ODBC driver 5, 11, 34
opening Teradata SET when unconnected 77
toolbar button 22
WinCLI 12, 35
Connect to Teradata Database dialog box 35
control files 109
control information, file extensions 108
Copy
menu command 24
copy
Import window toolbar button 27
copyright information 21
cost parameters
defining for export 51
export option 50, 51
file extension 108
import option 68
importing 62
privileges for exporting 6
privileges for importing 7
privileges for undoing an import 8
resetting for TLE 89
saving modifications 78
setting TLE 87
Cost Parameters check box 50, 51
Cost Parameters, DBS Control, and Cost Profile records
check box 106
cost profiles
active 51
export option 53
import option 67
importing 62
inactive 51
modifications, saving 78
privileges
exporting 7
importing 8
undoing an import 9
setting TLE 87
Cost Profiles check box 53
cost tags, setting for TLE 89
creating
packed files 93
Current Version box 67
customize
menu command 20
Teradata sessions 29
Customize tab 30
Cut
menu command 24
D
data demographics See demographics
data dictionary
import location, default 62
data source
creating 11
defining 11
selecting 34
Database Name box 36
databases
existing, displaying 78
name changes, saving 78
renaming 79
renaming, reversing the 82
reordering 83
DBS Control information
saving modifications 78
DBS Control, enabling TLE 87
DDL definitions, exporting 51
default
directory 32
import locations 62
settings, changing 29
X views, changing setting 31
Default Database box 39
define data source
menu command 20
delete
.pack file with .mcf file 98
export files 98
file recovery 99
query 43
Index
Teradata System Emulation Tool User Guide 125
toolbar button 22
Delete dialog box 20
delete edit
Import window toolbar button 27
delete files
menu command 20
Delete Files dialog box 98
Delete Pack File check box 98
demographics
export option 51, 54
exporting 44
file extensions 108
import option 67
importing 62
privileges for exporting 6
privileges for importing 7
privileges for undoing an import 8
Demographics check box 39, 40, 44, 51, 54
DIAGNOSTIC SET COST statement
cost parameters 53
cost profiles 54
disconnect
from a Teradata Database 107
from Teradata SET 107
menu command 18
toolbar button 22
toolbar icon 22
Display Failed SQL statement dialog check box 105
Display Object exists dialog check box 105
drivers, ODBC
connectivity 5
setting up 11
DUMP EXPLAIN 39
E
edit
Import window toolbar button 27
rename databases 79
reorder databases 83
edit information offline
toolbar button 22
Edit menu
Import window 24
edit mode
Edit menu commands 24
enabling 25
Import window toolbar options 27
emulation information, definition 1
error handling
default options, choosing 33
error handling options, changing 104
failed import operations, retrying 76, 106
Error Handling button 97
Error Handling tab 34, 104
Estimate Time
export 42, 45, 48
import 85
Import window toolbar button 27
menu command 25
required privileges 8
Estimated Time dialog box 25, 49, 85
execute query 92
Execute SQL
menu command 20
testing queries 92
Execute SQL dialog box 22
Execute SQL window
default setting, changing 31
setting to use 31
toolbar button 22
Execution Plan check box 51, 56
execution plans
during export by query 41
export option 67
export options 51, 56
file extension 108
importing 62
option during export by query 39, 40
privileges for exporting 6
privileges for importing 7
privileges for undoing an import 8
Execution Plans check box 39, 40, 41
Existing Databases
Import window toolbar button 28
menu command 26
Existing Databases dialog box 26, 28
Exit
menu command 18, 23
export
access rights 6
cost parameters, defining 51
DDL definitions 51
demographics 44, 54
estimating time 49
execution plans 51, 56
menu command 20
multiple file versions, creating 76
object definitions 56
options, choosing 50
privileges 6
QCD data 57
random AMP samples 57
selecting type of 37
statistics 59
summary report, viewing 101
time, estimating 49
toolbar button 22
Index
126 Teradata System Emulation Tool User Guide
using the command line 113
workloads 59
export by database
estimating time 45
export options 45
how to 43
using the command line 113
Export By Database dialog box 44
export by query
estimating time 42
how to 38
load existing query 39
load from QCD 41
manually entering 39
using the command line 114
Export By Query dialog box 23, 38
export by workload
estimating time 48
how to 46
using command line 115
Export By Workload dialog box 47
Export Cost Parameters dialog box 52
Export Cost Profiles dialog box 53
Export from Teradata Database dialog box 37, 38, 43, 46
export options 50
demographics 54
during export by query 39, 40, 41
exporting by database 45
exporting by workload 48
Export Options dialog box 41, 50
Export Random AMP Samples (RAS) dialog box 58
F
failed import operations, retrying 76, 106
features 4
file extensions 108
file management
export files, deleting 98
file extensions 108
imported files, undoing 95
overview 87
packing files 93
File menu
Import window 23
main window 18
file types 108
Find dialog box 24
Find menu command 24
Font
menu command 19
font color, changing 19, 25
Font dialog box 19, 25
Font menu command 19, 25
font size, changing 19, 25
font style, changing 19, 25
H
Help menu 21, 26
Help Topics
menu command 21
Help, online 9
hosts file, editing 13
I
IFP level 87
Ignore database errors check box 76, 104, 106
import 61
access rights, defined 7
cost parameters 62
cost profiles 62
demographics 62
estimating time 85
execution plans 62
failed import operations, retrying 76, 106
failure report, viewing 101
files, cleaning up 95
full import 62
how to 62
import locations, default 62
import options 66
Import window toolbar button 27
menu command 20, 23
object definitions 62
overview 61
partial import
example 70
performing 68
privileges, defined 7
QCD data, privileges 8
random AMP samples 62
reorder databases 83
statistics 62
summary report, viewing 101
time, estimating 85
toolbar button 22
using the command line 115
import options 67
Import window toolbar button 28
menu command 26
savings changes to 78
Import Options dialog box 26, 28, 66
import tree
reordering databases 26
saving changes to 23, 78
Import window
menus 23
Index
Teradata System Emulation Tool User Guide 127
toolbar 27
input command file
using the command line 116
installation 5
interfaces
ODBC connectivity 5
WinCLI connectivity 5
WinCLI, setting up 12
IP address
WinCLI, defining for 13
K
key features 4
L
loading
queries, existing 39
log file
default setting, changing 30
file extension 108
menu command 19
toolbar button 22
viewing 99
Log only failures in Summary Report check box 104
logon
default setting, changing 30
using the command line 112
M
machine configuration
privileges for exporting 6
viewing 83
macros
exported files, deleting 98
required privileges 6
main window See Teradata SET main window
mark as QCD 45
menu bars, overview 17
menus
Import window 23
Teradata SET main window 18
multi-threading
default setting, changing 31
N
navigation, overview 17
nodes, viewing number of 85
number of, viewing
AMPs 85
nodes 85
PEs 85
O
object definitions
database name, finding and replacing 80
export option 51, 56
file extension 108
import option 67
importing 62
modifications, saving 78
privileges for exporting 6
privileges for importing 7
privileges for undoing an import 8
renaming, reversing the 82
text, finding and replacing 80
Object Definitions check box 51, 56
ODBC 11
connecting 34
connectivity, setting 32
data source, selecting a 34
driver connectivity 5
drivers, setting up 11
required version 5
using Data Source Administrator 11
ODBC Data Source Administrator dialog box 11
ODBC Database Administrator dialog box 20
ODBC Driver Setup for Teradata RDBMS dialog box 12
online Help
Import window toolbar button 28
toolbar button 23
using 9
Only synchronize version of created tables
miscellaneous option 68
Open dialog box 40, 63, 96, 100
opening, Teradata SET main window 14
Optimizer 2
options
import options, changing 66
Options dialog box 20, 30, 35, 92
Options dialog box, opening 20
Options menu 26
Order Database
menu command 26
overview, Teradata SET 3
P
pack
toolbar button 22
Pack dialog box 20, 94
packing files 93
file extension 108
menu command 20
Parent Database box 66
defined 119
using 66
Index
128 Teradata System Emulation Tool User Guide
parsing engines, viewing number of 85
partial import
example 70
performing 68
Paste
Import window toolbar button 27
menu command 24
Path box 33
permanent space See permspace
permissions See access rights
permspace
changing 72
menu command 26
stored procedures 75
toolbar button 28
physical configuration 83
preview pane
deleting export files 98
importing 63, 77
packing export files 94
undoing imported files 96
unpacking export files 95
privileges See access rights
product version numbers iii, 5
Prompt to create non-existing QCDs check box 105
purpose of Teradata SET 2
Q
QCD data
export option 51, 57
import option 67
import privileges 8
privileges for exporting 7
privileges for undoing an import 8
QCD Data check box 51, 57
QCD Database box 47
QCD Name box 39, 41
query
default setting, changing 31
executing 92
exporting 38
load from QCD 41
manually entering 39
removing 43
query capture database (QCD)
definition 1
Query Capture Database dialog box 41
Query pane 39
query, testing a 92
R
random AMP samples
defaults for TLE, resetting 89
export option 51, 57
file extension 109
import option 67
importing 62
modifications, saving 78
privileges for exporting 6
privileges for importing 7
privileges for undoing an import 8
RAS byte order, changing 70
RAS tags for TLE, setting 88
setting TLE 87
SystemFE.Opt_RAS_Table 62
Random AMP Samples check box 51, 57, 106
RAS See random AMP samples
RAS tag box 57
RAS tags, setting for TLE 88
recording SQL statements 30
recovering deleted files 99
Refresh button
Estimated Time dialog box 25, 50, 86
Remove button 40, 41
remove query 43
renaming databases 79
Import window toolbar button 28
reordering databases
how to 83
Import window toolbar button 28
Replace
Import window toolbar button 27
menu command 24
Replace dialog box 80
required permissions See access rights
Reset Cost Profiles tab 91
Reset Costs tab 91
Reset RAS tab 90
Reset Target Level Emulation dialog box 22, 90
reset TLE
how to 89
menu command 20
toolbar button 22
Retry button 76, 106
retrying failed imports 76, 106
reverse renaming databases
Import window toolbar button 28
S
Save As dialog box 23
Save As feature
Import Options dialog box 78
import tree, saving changes to 78
Import window toolbar button 27
menu command 23
saving
Index
Teradata System Emulation Tool User Guide 129
.col file 109
.ddl file 108
.dem file 108
.log file 108
.mcf file 108
.opt file 108
.pack file 108
.qcd file 108
.ras file 109
.rpt file 109
.sql file 109
.undo file 108
cost parameter modifications 78
cost profile modifications 78
DBS Control information modifications 78
default directory, choosing 32
exported information, default directory for 33
file extensions for Teradata SET 108
import tree changes 23, 78
object definition modifications 78
random AMP sample modifications 78
statistics modifications 78
search
Import window toolbar button 27
Select a Data Source dialog box 34
Select All
menu command 24
Select Rows button
cost parameters 52
cost profiles 53
Select Tables button 55
Selected Queries list 39, 40
sessions
changing default settings 29
Set Cost Profile option 54
Set Cost Profiles tab 89
Set Costs option 53
Set Costs tab 89
Set RAS tab 88
Set Samples option 58
Set Target Level Emulation dialog box 22, 26, 28, 88
set TLE
how to 88
Import window toolbar button 28
menu command 20, 26
toolbar button 22
single sign-on (SSO) 36
Source Machine Configuration
menu command 25
Source Machine Configuration dialog box 25
Source Version box 67
Specify Export Database box 44
SQL Assistant See Teradata SQL Assistant
SQL Statement Failed dialog box 76, 106
SQL statements
file extension 109
recording 30
startup
default setting, changing 30
statistics
deleting exported files 98
export option 51, 59
file extension 109
import location 62
import option 67
importing 62
privileges for exporting 6
privileges for importing 7
privileges for undoing an import 8
saving modifications 78
Statistics check box 51, 59
status bar
hiding 18
menu command 19, 25
overview 17
showing 18
stored procedure
permspace 75
summary report
file extensions 109
menu command 19
toolbar button 22
viewing 101
supporting tools
defined 4
system address See IP address
system information See emulation information
SystemFE.Opt_Cost_Table 3
cost parameters 62
privileges for exporting 6
privileges for importing 7
SystemFE.Opt_DBSCtl_Table
privileges for exporting 6
privileges for importing 7
SystemFE.Opt_RAS_Table 3, 62
privileges for exporting 6
privileges for importing 7
RAS byte order, changing 70
T
tables
deleting exported files 98
target database, renaming 79
Target Level Emulation See TLE
Target QCD box 66
target system
definition 1
Index
130 Teradata System Emulation Tool User Guide
view configuration of 83
Teradata SET main window
font, changing 19
menus 18
opening 14
Teradata SQL Assistant
default setting, changing 31
setting to use 31
testing queries 92
toolbar button 22
Teradata Visual Explain
capturing query plans 88
test system, definition 1
testing a query 92
TLE
resetting 89
setting 87
typical scenario 88
toolbar
Import window 27
main window 22
menu command 19, 25
overview 17
tools
supporting 4
Tools menu
main window 19
transfer
packing files 93
unpacking files 95
troubleshooting
viewing log files 99
U
unconnected mode 77
Undo
menu command 24
undo edit
Import window toolbar button 27
Undo Files box 94
undo import
imported files, reversing 95
menu command 20
summary report, viewing 101
toolbar button 22
using the command line 116
Undo Import button 97
Undo Import File dialog box 97
unpack
file management 95
menu command 20
toolbar button 23
Unpack dialog box 20, 95
Use SQL Assistant rather than the Execute SQL window check
box 92
User Defined Types
required privileges 6
User Name box 36
user name, entering 36
user rights See access rights
V
version information 21
version numbers iii, 5
View menu
Import window 25
main window 19
Status Bar command 19, 25
view source configuration
Import window toolbar button 27
View Workload dialog box 47
viewing
log files 99
source machine configuration 83
summary reports 101
views
deleting exported files 98
Visual Explain See Teradata Visual Explain
W
Warnings dialog box 42
WinCLI
connection, setting up 12
connectivity type, choosing 32
hosts file, editing 13
required version 5
Teradata Database, connecting to 35
Workload box 47
Workload check box 51, 59
workloads
command line interface, using 115
export option 48, 51, 59
exporting 46
file extension 108
import option 68
privileges
exporting 7
importing 8
undoing an import 8
workload data, importing 62
Workloads check box 106
X
X views
default setting, changing 31

Potrebbero piacerti anche