Anda di halaman 1dari 150

Teradata System Emulation Tool

User Guide

Release 14.00
B035-2492-071A
November 2011

The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Active Enterprise Intelligence, Applications Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast,
Gridscale, Managing the Business of Marketing, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision
Experts, Teradata Labs Logo, Teradata Raising Intelligence Logo, Teradata Source Experts, WebAnalyst, and Xkoto are trademarks or registered
trademarks of Teradata Corporation or its affiliates in the United States and other countries.
Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.
AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.
EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.
GoldenGate is a trademark of Oracle.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.
Intel, Pentium, and XEON are registered trademarks of Intel Corporation.
IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.
Linux is a registered trademark of Linus Torvalds.
LSI is a registered trademark of LSI Corporation.
Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United
States and other countries.
NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries.
Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.
Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.
QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.
SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.
SPARC is a registered trademark of SPARC International, Inc.
Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States
and other countries.
Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.

THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN AS-IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION
MAY NOT APPLY TO YOU. IN NO EVENT WILL TERADATA CORPORATION BE LIABLE FOR ANY INDIRECT, DIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS OR LOST SAVINGS, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
The information contained in this document may contain references or cross-references to features, functions, products, or services that are
not announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features,
functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions,
products, or services available in your country.
Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated
without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any
time without notice.
To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this
document. Please email: teradata-books@lists.teradata.com.
Any comments or materials (collectively referred to as Feedback) sent to Teradata Corporation will be deemed non-confidential. Teradata
Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform,
create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata
Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including
developing, manufacturing, or marketing products or services incorporating Feedback.
Copyright 2002-2011 by Teradata Corporation. All Rights Reserved.

Preface
Purpose
This book provides information about Teradata System Emulation Tool (SET), which is a
Teradata Tools and Utilities product. Teradata Tools and Utilities is a group of products
designed to work with Teradata Database.
Teradata SET imitates (emulates) the Optimizer-generated data from a target system,
generates query plans, and then imports that information to a test system where queries can
be run without impacting the production system.

Audience
This book is intended for use by:

Database Administrators and relational database developers

Field engineers

Test engineers

Supported Releases
This book supports the following releases:

Teradata Database 14.0

Teradata Tools and Utilities 14.00

Teradata SET 14.00


Note: See page 35 to verify the Teradata SET version number.

To locate detailed supported-release information:


1

Go to http://www.info.teradata.com/.

Under Online Publications, click General Search.

Type 3119 in the Publication Product ID box.

Under Sort By, select Date.

Click Search.

Open the version of the Teradata Tools and Utilities ##.##.## Supported Platforms and
Product Versions spreadsheet associated with this release.

Teradata System Emulation Tool User Guide

Preface
Prerequisites

The spreadsheet includes supported Teradata Database versions, platforms, and product
release numbers.

Prerequisites
The following prerequisite knowledge is required for this product:

Computer technology and terminology

Teradata SQL

Teradata Database

Relational Database Management Systems (RDBMSs)

Connectivity software, such as Open Database Connectivity (ODBC) or Call-Level


Interface, Version 2 (CLIv2)

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 in support of the current release. Changes are
marked with change bars. For a complete list of changes to the product, see the Release
Definition associated with this release.

Date and Release

Description

August 2011, 14.00

Export/Import UDFs across systems.


Support for Parameterized Request Caching feature.
Enable TSET to handle export if row already exists in systemfe.opt_ras_
table.
Allow adding a set of Databases in Export by Database GUI through
Specify Export Database control.
Usability issue - New menu item to export QCD plans (only QCD
database listed).
Look at PDE version to differentiate statistics version which is correct
Changed all occurrences of 14.00.01 to 14.00, updated Support Release
information.

November 2011,
14.00

Instances of UTF8 and UTF16 missing the hyphen (UTF-8 and UTF16).
Removed footnote for Teradata Database 14.0.

Teradata System Emulation Tool User Guide

Preface
Additional Information

Additional Information
Additional information that supports this product and Teradata Tools and Utilities is available
at the web sites listed in the table that follows. In the table, mmyx represents the publication
date of a manual, where mm is the month, y is the last digit of the year, and x is an internal
publication code. Match the mmy of a related publication to the date on the cover of this book.
This ensures that the publication selected supports the same release.
Type of Information

Description

Access to Information

Release overview

Use the Release Definition for the following


information:

1 Go to http://www.info.teradata.com/.

Overview of all of 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 the support center

3 Type 2029 in the Publication Product ID box.

Use the Teradata Information Products web


site to view or download specific manuals
that supply related or additional
information to this manual.

1 Go to http://www.info.teradata.com/.

Late information

Additional product
information

2 Under Online Publications, click General Search


4 Click Search.
5 Select the appropriate Release Definition from

the search results.

2 Under the Online Publications subcategory,

Browse by Category, click Data Warehousing.


3 Do one of the following:

For a list of Teradata Tools and Utilities


documents, click Teradata Tools and Utilities,
and then select an item under Releases or
Products.
Select a link to any of the data warehousing
publications categories listed.
Specific books related to Teradata SET are as
follows:
Database Administration
B035-1093-mmyx
Data Dictionary
B035-1092-mmyx
ODBC Driver for Teradata User Guide
B035-2509-mmyx
SQL Data Definition Language
B035-1144-mmyx
SQL Request and Transaction Processing
B035-1142-mmyx
Teradata Index Wizard User Guide
B035-2506-mmyx

Teradata System Emulation Tool User Guide

Preface
Additional Information

Type of Information

Description

Additional product
information
(continued)

CD-ROM images

Access to Information
Teradata Manager Installation Guide
B035-2402-mmyx
Teradata SQL Assistant for Microsoft Windows
User Guide
B035-2430-mmyx
Teradata Statistics Wizard User Guide
B035-2504-mmyx
Teradata Tools and Utilities Installation Guide for
Microsoft Windows
B035-2407-mmyx
Teradata Visual Explain User Guide
B035-2504-mmyx
Utilities
B035-1102-mmyx
SQL Data Definition LanguageB035-1184-mmyx
Teradata System Emulation Tool User Guide
B035-2492-mmyx

Access 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.

1 Go to http://www.info.teradata.com/.
2 Under the Online Publications subcategory,

Browse by Category, click Data Warehousing.


3 Click CD-ROM Images.
4 Follow the ordering instructions.

Ordering
information for
manuals

Use the Teradata Information Products web


site to order printed versions of manuals.

1 Go to http://www.info.teradata.com/.
2 Under Print & CD Publications, click How to

Order.
3 Follow the ordering instructions.

General information
about Teradata

The Teradata home page provides links to


numerous sources of information about
Teradata. Links include:

1 Go to Teradata.com.
2 Select a link.

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 System Emulation Tool User Guide

Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Supported Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Changes to This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

Chapter 1:
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Key Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Uses Imported Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simplifies Data Capture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ensures Data Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15
16
16
16

Emulation-Process Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Support Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18
19
19
19
19

Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Export Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Import Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimate-Time Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Undo-Import Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19
19
21
22
22

Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Teradata System Emulation Tool User Guide

Table of Contents

Chapter 2:
Connection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
ODBC Driver Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
CLIv2 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Connection Verification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Start Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Connect to a Teradata Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Connect Using ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Connect Using CLIv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29

Chapter 3:
Menus and Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Import Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36

Chapter 4:
Command-Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Command-Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Command-Line Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Log on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Undo Imported Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
Use the Input Command File Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47

Chapter 5:
Session Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Customization Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Creating Restricted Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Connectivity Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Directory Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Error-Handling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54

Teradata System Emulation Tool User Guide

Table of Contents

Chapter 6:
Export Methods and Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Export by Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Type a query manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load a query from a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load a query from a QCD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load a query from DBQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59
62
62
63
64

Export by Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Export by Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Export Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cost Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cost Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Demographics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Execution Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Object Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
QCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Random AMP Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Workloads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

73
74
74
76
78
80
81
81
82
85
85

Estimate Export Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Chapter 7:
Import Methods and Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Import to a Test System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Change Import Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Specify Objects for Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Change RAS Byte Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Edit Import Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Change Permanent Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Retry a Failed SQL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Edit Information Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Save Changed Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Display Existing Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Rename a Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Undo Target Database Renaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Reorder Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Teradata System Emulation Tool User Guide

Table of Contents

View Machine Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109


Estimate Import Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111

Chapter 8:
Administrative Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Set TLE Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Set TLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Reset TLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Perform Query Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
Perform a File Transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
Undo Imported Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Delete Exported Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
View Log Files and Summary Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
View a Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
View a Summary Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Retry Failed Import Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
Manage Missing Access Privilege Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
Disconnect and Close Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Disconnect from a Teradata Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Close Teradata SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Perform File Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
View Low Level Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141

10

Teradata System Emulation Tool User Guide

List of Figures

Figure 1: Teradata SET Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18


Figure 2: Teradata SET Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 3: Teradata SET Import Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 4: Export by Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 5: Selected Queries for Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Figure 6: USING Values to Capture Specific Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 7: Export Random AMP Samples (RAS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Figure 8: Duplicate Random AMP Sample. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Figure 9: Importing Selected Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Figure 10: Source Machine Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Figure 11: Input USING Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

Teradata System Emulation Tool User Guide

11

List of Figures

12

Teradata System Emulation Tool User Guide

List of Tables

Table 1: Export Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20


Table 2: Import Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 3: Undo-Import Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 4: Main Window Menus, Commands, and Toolbar Buttons. . . . . . . . . . . . . . . . . . . . . 33
Table 5: Version and Copyright Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 6: Import Window Menus, Commands, and Toolbar Buttons . . . . . . . . . . . . . . . . . . . 36
Table 7: Command-Line Switches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 8: Command-Line Switches for Export and Import Options. . . . . . . . . . . . . . . . . . . . . 42
Table 9: Default Import Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Table 10: Source Machine Configuration Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Table 11: Teradata SET File Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Teradata System Emulation Tool User Guide

13

List of Tables

14

Teradata System Emulation Tool User Guide

CHAPTER 1

Features

This chapter provides an introduction to Teradata System Emulation Tool (SET) features.
Included is information about system requirements, privileges, and online help.
To learn more about Teradata SET features, see:

Key Benefits

Emulation-Process Overview

Support Tools

System Requirements

Privileges

Key Benefits
Teradata SET imitates a target (production) system on a test system. System-level
environmental data is captured from the target system, then stored in relational tables. The
Teradata Query Optimizer (Optimizer) processes information from these tables, together with
appropriate column and index statistics, to generate query plans on the test system as though
the operation occurred in the production environment.
Use Teradata SET to:

Imitate the impact of environmental changes on Structured Query Language (SQL)


statement performance.

Determine the source of Optimizer-based query issues using imported environmental cost
data and random AMP sample (RAS)-based statistical data.

The key features of Teradata SET are:

Works as a standalone application.

Interfaces with a Teradata Database using CLIv2 or ODBC.

Exports system information from a target system to a specified file on a workstation.

Imports system information from the workstation to a test system.

Displays the Query, Explain Text, Step Report, and Summary Information for queries in the
Import window.

Allows editing of object definitions, statistics, RAS, cost parameters, and cost profiles
before import to a test system.

Exports and imports data demographics of tables from one Query Capture Database
(QCD) to another.

Teradata System Emulation Tool User Guide

15

Chapter 1: Features
Key Benefits

Provides a summary report of the failures and successes of an import, export, or undo
(cleanup) operation.

Allows visual reordering of databases.

Exports and imports workload recommendations.

Allows other client applications to use Teradata SET functions.

Uses Imported Data


Capturing data from a target (production) system and applying it to a test system is a
two-phase process:
1

Relevant data on the target system is read and then written to a staging area.

The staged data is imported to the test system and applied to the appropriate data tables.

Imported data is used to:

Recreate the Optimizer performance characteristics of the target system.


Note: The 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.

Generate query plans that emulate those created on the target system under a given set of
conditions.
Note: A small test system can be used to generate query plans that emulate a much larger
target system.

Perform what-if modeling.

Test, diagnose, and solve Optimizer-related performance questions that might occur in the
target system.

Teradata SET also works with Teradata Visual Explain to emulate how a target system
performs under specific conditions and workloads.

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. Use Teradata SET to automate the
process of exporting and importing system information for query-plan generation.
The alternative is to use SQL statements which, unlike Teradata SET, requires knowledge of
exactly what information to capture and which SQL statements to use. Using SQL statements
is time-consuming and prone to user-introduced errors.

Ensures Data Integrity


Teradata SET saves essential system information in specific file types based on the export
options chosen. When system information is imported to the test system, it is automatically
loaded in the correct format.

16

Teradata System Emulation Tool User Guide

Chapter 1: Features
Emulation-Process Overview

Teradata SET also synchronizes all of the elements of a target environment. For example, all
the configuration settings, databases, data models, and data dependencies maintain the
correct relationships when exported and imported.
In addition, database objects are duplicated on the test system. Tables, views, macros, triggers,
join indexes, and stored procedures function just like they do on the target system. Use
Teradata SET to thoroughly debug and optimize queries in a safe, but equivalent, emulated
environment prior to introducing them into the production system.

Emulation-Process Overview
This section provides an overview of the typical Teradata SET emulation process. It is assumed
that SystemFE.Opt_Cost_Table and SystemFE.Opt_RAS_Table exist on the target system.
The process is as follows:
1

Connect to a Teradata Database using a Teradata Open Database Connectivity (ODBC)


driver or Teradata Call-Level Interface, Version 2 (CLIv2).

Create a target system profile that defines the databases, tables, views, macros, and related
environmental parameters or RAS to be captured and loaded onto the test system.

Perform an export operation from the target system to collect Optimizer cost parameters;
RAS; and any necessary object definitions, statistics, and test queries from the target
system. Then, place this emulation information on the system disk as data files that the test
system can import.

If the target and test systems are not connected to the same network, perform a pack
operation to combine all the data files into one file. (Pack files also can be compressed
using any standard compression method.) Transfer the files to the test system.

Perform an import operation to create the objects, emulate the statistics, and import the
data into SystemFE.Opt_Cost_Table and SystemFE.Opt_RAS_Table on the test system.

Set emulation on the test system, and use the data to test and resolve any problems or
discrepancies.

Teradata System Emulation Tool User Guide

17

Chapter 1: Features
Support Tools

Figure 1 shows the relationship between Teradata SET, the ODBC and CLIv2 interfaces, target
systems, and test systems.
Figure 1: Teradata SET Architecture
Target System
Teradata Database
AMP Samples

Schema/DDL

Workstation
EXPORT
SYSTEM
INFORMATION

Teradata SET Client Tool


CLIv2
Data
Files

Teradata SET
QCD

GDO

Statistics

ODBC

IMPORT SYSTEM
INFORMATION

Cost Parameters

Test System
Teradata Database
QCD
Statistics
GDO

Tables

AMP Samples

Cost Parameters
2492D001

Support Tools
Teradata SET uses the following tools to emulate a target system on a test system:

Query Capture Facility (QCF)

SQL SHOW statement

Target Level Emulation (TLE)

System Requirements
The following topics describe the system requirements:

18

Operating System

Connectivity

Compatibility

Installation

Teradata System Emulation Tool User Guide

Chapter 1: Features
Privileges

Operating System
To determine on which platforms Teradata SET is available and identify the compatible
Teradata Database versions, refer to Teradata Tools and Utilities Supported Platforms and
Product Versions B035-3119-mmyx. This spreadsheet shows version numbers and platform
information for all Teradata Tools and Utilities products in a release and is available at
www.info.teradata.com.

Connectivity
Connecting Teradata SET to a Teradata Database requires one of the following:

ODBC Driver for Teradata Database 14.0

Teradata CLIv2 for Network-Attached System 14.00.00.00

Note: Before retrieving system information from a target system, an ODBC driver or CLIv2
must be installed on the workstation. If an ODBC driver and CLIv2 are installed on the same
system, the user-configured ODBC driver is used to connect to Teradata Database after the
initial setup.

Compatibility
Teradata SET is certified to run with any Level-2-compliant, 32-bit ODBC driver. Teradata
SET is also certified to run with CLIv2. For details on the compatible versions, refer to
Teradata Tools and Utilities Installation Guide for Microsoft Windows B035-2407-mmyx.

Installation
Install Teradata SET as a standalone application using the standard Microsoft Windows
software installation instructions. For more information, refer to Teradata Tools and Utilities
Installation Guide for Microsoft Windows B035-2407-mmyx.

Privileges
To perform export, import, or undo import (cleanup) operations, establish:

Privileges to all database objects to be exported or imported

A valid Teradata Database user ID

A valid password for the user ID

Note: To learn more about privileges, refer to SQL Data Definition Language B035-1184mmyx.

Export Rights
Set privileges prior to performing export operations. When exporting by query, the right to
execute the SHOW QUALIFIED SQL statement and configuration data (RAS, statistics, object
definitions) is required if only those objects returned from this statement can be exported.
Table 1 lists the privileges required to export each type of information.

Teradata System Emulation Tool User Guide

19

Chapter 1: Features
Privileges

Table 1: Export Rights

Exported Information

Required Rights

Cost parameters

INSERT, SELECT, and DELETE on SystemFE.Opt_Cost_Table and


SystemFE.Opt_DBSCtl_Table.

Execution plans

For an existing plan:


SELECT on the QCD tables or on the QCD
EXECUTE on QCD macros
For a new plan, sufficient rights to execute the DUMP EXPLAIN
statement for the given query.
For a new plan with demographics:
Sufficient rights to execute the INSERT EXPLAIN statement for
the given query
EXECUTE on the QCD macros
Note: New plans can be generated only from the Export By Query
dialog box. See Export by Query on page 59.

Object definitions

For join indexes, macros, tables, triggers, stored procedures, User


Defined Functions (UDFs), and User-Defined Types (UDTs),
sufficient rights to execute the corresponding SHOW statement for
the database objects.
To export object definitions for view, SELECT on the view in order
to perform the SHOW QUALIFIED statement.
To export by database, SELECT on DBC.Columns and DBC.Tables
to export referenced UDTs.

Machine configuration

MONRESOURCE privilege on V2R6.2 database.


EXECUTE FUNCTION access to SYSLIB.MonitorVirtualConfig
and EXECUTE FUNCTION access to
SYSLIB.MonitorPhysicalConfig on TD 12.0 and later database
versions.
Note: On a V2R6.2 database, this information is exported only
when a CLIv2 connection is used. See View Machine
Configuration on page 109.

RAS

SELECT on the tables selected for export.


INSERT, SELECT, and DELETE on SystemFE.Opt_RAS_Table.

Statistics

All rights required to execute the HELP STATISTICS statement on


the table or join index referenced.
SELECT on the DBC.IndexStats, DBC.ColumnStats, and
DBC.MultiColumnStats views.

20

Teradata System Emulation Tool User Guide

Chapter 1: Features
Privileges
Table 1: Export Rights (continued)

Exported Information

Required Rights

Demographics

SELECT on the data demographics table and corresponding views


of the table, and sufficient rights to execute the COLLECT
DEMOGRAPHICS statement.
SELECT on QCD views.
EXECUTE on QCD macros.
Note: This option is only available in export-by-database and
export-by-query operations.

QCD data

SELECT on QCD tables and views.


EXECUTE on QCD macros.
Note: This option is only available in export-by-database
operations.

Workloads

SELECT on QCD tables and views.


EXECUTE 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.

Import Rights
Set privileges prior to performing import operations. Table 2 lists the privileges required to
import each type of information.
Table 2: Import Rights

Imported Information

Required Rights

Cost parameters

INSERT on SystemFE.Opt_Cost_Table and


SystemFE.Opt_DBSCtl_Table.

Execution plans

INSERT, SELECT, and UPDATE on QCD tables and views.

Object definitions

CREATE on the user or database into which the information is


imported. (Use to create database objects such as join indexes and
stored procedures.)
CREATE PROCEDURE WITH GRANT OPTION for the database in
which stored procedures are created.
CREATE FUNCTION WITH GRANT OPTION for the database in
which User Defined Functions are to be created.
UDTTYPE on the SYSUDTLIB database, to create a UDT.
UDTUSAGE, to include a UDT with a CREATE TABLE statement.

RAS

Teradata System Emulation Tool User Guide

INSERT on SystemFE.Opt_RAS_Table.

21

Chapter 1: Features
Privileges
Table 2: Import Rights (continued)

Imported Information

Required Rights

Statistics

All rights required to execute the COLLECT STATISTICS statement


for the table or join index referenced.

Demographics

INSERT, SELECT, and UPDATE on the data demographics table and


corresponding table views.
EXECUTE for demographics macros.

QCD data

INSERT, SELECT, and UPDATE on QCD tables.


SELECT on QCD views.

Workloads

INSERT, SELECT, and UPDATE on QCD tables.


SELECT on QCD views.

Cost profiles

EXECUTE on the DBC.CreateNewCostProfile and


DBC.InsertConstantValue macros.

Estimate-Time Rights
The following privileges are required to use the Estimate Time function when performing
export and import operations:

The corresponding rights listed in Table 1 on page 20 and Table 2 on page 21.

CREATE DATABASE on the default database.

Undo-Import Rights
Table 3 lists the privileges required in order to restore the default test system environment
(also known as undo-import or cleanup operations).
Table 3: Undo-Import Rights

Undo-Import Information

Required Rights

Cost parameters

DELETE on SystemFE.Opt_Cost_Table and


SystemFE.Opt_DBSCtl_Table or on SystemFE.

Execution plans

DELETE on the QCD tables or on the QCD.


EXECUTE on QCD macros.

22

Object definitions

Sufficient DROP rights on the parent database or DELETE on the


database object.

RAS

DELETE on SystemFE.Opt_RAS_Table or on the SystemFE


database.

Statistics

All rights required to execute the DROP STATISTICS statement


for the table or join index referenced.

Teradata System Emulation Tool User Guide

Chapter 1: Features
Online Help
Table 3: Undo-Import Rights (continued)

Undo-Import Information

Required Rights

Demographics

DELETE on the data demographics table and corresponding


views of the table.
EXECUTE on demographics macros and QCD macros.

QCD data

DELETE on QCD tables and views.


EXECUTE on QCD macros.

Workloads

DELETE on QCD tables and views.


EXECUTE on QCD macros.

Cost profiles

EXECUTE on the DBC.DeleteCostProfile macro.

Online Help
Teradata SET online help answers questions about how to use Teradata SET features. Online
help (including context-sensitive help) opens in a browser window. Microsoft Internet
Explorer, version 6.0 or later, is the recommended browser for viewing online help and
context-sensitive help. A browser other than the recommended browser might result in
incorrectly displayed help.

To open online help


From the toolbar, click

The Help window opens. Use the tools available from the Help window to navigate to other
topics.

To open context-sensitive help


From most windows and dialog boxes, press F1 to see context-sensitive help for the active
window or dialog box. If F1 does not invoke context-sensitive help, press Shift+F1.

Teradata System Emulation Tool User Guide

23

Chapter 1: Features
Online Help

24

Teradata System Emulation Tool User Guide

CHAPTER 2

Connection Methods

This chapter contains procedures for establishing a connection to a Teradata Database using
either ODBC or CLIv2. Verify the connection before opening Teradata SET.

ODBC Driver Setup


Define a data source for each Teradata Database (target system and test system) prior to
connecting with ODBC. Use the Microsoft ODBC Data Source Administrator to create ODBC
data sources and to configure the drivers.

To define a data source


1

Open Microsoft ODBC Data Source Administrator by doing one of the following:

From the Teradata System Emulation Tool window (main window), click Tools>Define
Data Source.

From the Windows desktop, click Start>All Programs>ODBC>


32-bit ODBC Administrator.

The ODBC Data Source Administrator dialog box appears and displays the User DSN tab by
default.
2

Click Add.

Under the Name column, select Teradata.

Teradata System Emulation Tool User Guide

25

Chapter 2: Connection Methods


ODBC Driver Setup
4

Click Finish.
The ODBC Driver Setup for Teradata Database dialog box appears.

Enter information in the boxes.


Refer to ODBC Driver for Teradata User Guide B035-2509-mmyx for assistance.

Verify the connection before opening Teradata SET and connecting to a Teradata
Database.
See Connection Verification on page 28.

26

Teradata System Emulation Tool User Guide

Chapter 2: Connection Methods


CLIv2 Setup

CLIv2 Setup
When using CLIv2, define an IP address and provide the name of the Teradata Database to use
in the hosts file on the workstation.
Unlike the ODBC connection, no data source must be defined prior to connecting to a
Teradata Database. CLIv2 connections are defined from within Teradata SET. See Connect to
a Teradata Database on page 29.

To define an IP address and a name for a Teradata Database


1

Use Windows Explorer to 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.

Double-click the hosts file.


The Open With dialog box appears.

Click NOTEPAD.

Click OK.
The hosts file opens in a Notepad window.

At the bottom of the file, type:


xxx.xxx.xxx.xxx ssscop1
where xxx.xxx.xxx.xxx is the functional IP address and sss is the Teradata Database name.

Click File>Save.

Click File>Exit to close Notepad and return to the Windows desktop.

Verify the connection before opening Teradata SET and connecting to a Teradata
Database.

Teradata System Emulation Tool User Guide

27

Chapter 2: Connection Methods


Connection Verification

See Connection Verification on page 28.

Connection Verification
Test the connection between the workstation and Teradata Database before starting
Teradata SET.

To verify the connection


1

From the Windows desktop, click Start>Run.

In the Open box, type PING followed by the name of the Teradata Database and the cop1
suffix:
PING ssscop1

where sss is the Teradata Database name.


3

Teradata Database returns the following message:


Reply from xxx.xxx.xx.xx

where xxx.xxx.xx.xx is the Teradata Database IP Address.


Note: If Teradata Database does not respond to the PING command, contact the network
administrator to determine the cause of the error.
4

Start Teradata SET.


See Start Teradata SET on page 28.

Start Teradata SET


This section explains how to start Teradata SET using Windows. The tool also can be started
from the command line. See Appendix 4: Command-Line Interface.
Note: Teradata SET must be installed and configured before connecting to a Teradata
Database.
To learn how to navigate Teradata SET, see Chapter 3: Menus and Toolbars.

To start Teradata SET


From the Windows desktop, click Start>All Programs>Teradata System Emulation Tool

number, where number is the version number.

28

Teradata System Emulation Tool User Guide

Chapter 2: Connection Methods


Connect to a Teradata Database

The main window opens. See Main Window on page 33 for information on locating the
Teradata SET version number.

To learn how to connect to a Teradata Database, see Connect to a Teradata Database on


page 29.

Connect to a Teradata Database


Before using Teradata SET to export information, connect to a Teradata Database using
ODBC or CLIv2.

Connect Using ODBC


Before connecting through ODBC, define a data source. See ODBC Driver Setup on
page 25.
For information on starting Teradata SET, see Start Teradata SET on page 28.

To connect using ODBC


1

From the Teradata SET main window, click

The Select a Data Source dialog box appears.


2

Select a data source.


Refer to ODBC Driver for Teradata User Guide B035-2509-mmyx for assistance.

Click OK.

Connect Using CLIv2


An IP address and modifications to the hosts file are required prior to connecting with CLIv2.
See CLIv2 Setup on page 27.
For information on starting Teradata SET, see Start Teradata SET on page 28.

Teradata System Emulation Tool User Guide

29

Chapter 2: Connection Methods


Connect to a Teradata Database

To connect using CLIv2


1

From the main window, click Tools>Options.


The Options dialog box appears.

Click the Connectivity tab.

Click CLIv2.

Click Apply.

Click OK.

Click

The Connect to Teradata Database dialog box appears.

Enter the logon information in the dialog box.


Logon Information

Description

Teradata Database Name

Select a Teradata Database from the 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 the procedure To define an
IP address and a name for a Teradata Database on page 27.

User Name

Select a user name from the list, or type a valid user name. The
user name must be defined for the server.
When using Single Sign On, ensure that the User Name and
Password boxes are blank.

Password

Type the password for the user name in the User Name box. The
password is concealed with asterisks in place of the characters as
they are typed.

Session Character Set

[Optional] Select a session character set:

More

30

ASCII
KANJISJIS_0S
UTF-16
UTF-8

Click to view Advanced Options.

Teradata System Emulation Tool User Guide

Chapter 2: Connection Methods


Connect to a Teradata Database

Logon Information

Description

Authentication Mechanism

Select a mechanism from the list.


Security measures are specific to each Teradata site. Contact the
Database Administrator or the security manager if no
mechanisms are listed.

Authentication Parameter

Type the parameters required by the selected mechanism. The


authentication parameter is concealed with asterisks in place of
the characters as they are typed.
Consult the Database Administrator for current authentication
parameters.

Default Database

[Optional] Select the default database for the session.


If no database is specified, the default database defined for the
user is used.

Account String

[Optional] Select the account string from the list or type the logon
parameters that define the user group.

Less

Click to hide Advanced Options.

Click OK.

Teradata System Emulation Tool User Guide

31

Chapter 2: Connection Methods


Connect to a Teradata Database

32

Teradata System Emulation Tool User Guide

CHAPTER 3

Menus and Toolbars

This chapter provides information about the Teradata SET menus and toolbars. Use this
information to navigate the main window (Teradata System Emulation Tool window) and the
Import window.

Main Window
The main window (Figure 2) contains menus, commands, and a toolbar that access Teradata
SET primary functions and features. Use the options available in the main window to navigate
the Teradata SET application.
Figure 2: Teradata SET Main Window

Table 4 describes the main window options. Table 5 explains the information available in the
About Teradata System Emulation Tool dialog box, which is accessed from the Help menu.
Table 4: Main Window Menus, Commands, and Toolbar Buttons

Menu

Command

Button Description

File
Connect

Log on to a Teradata Database.

Disconnect

Log off from a Teradata Database.

Exit

Teradata System Emulation Tool User Guide

None

Close Teradata SET and return to the Windows desktop.

33

Chapter 3: Menus and Toolbars


Main Window
Table 4: Main Window Menus, Commands, and Toolbar Buttons (continued)

Menu

Command

Button Description

View
Log File

Open or close a log file.

Summary Report

Open or close a report that summarizes the successes and


failures of an import, export, or undo import (cleanup)
operation.

Font

None

Display the Font dialog box to change the font style, size, or
color for text displayed in the main window. For example,
change the font used when displaying the log file or
summary report.

Toolbar

None

Show or hide the main window toolbar.

Status Bar

None

Show or hide the status bar in the main and Import


windows.

Tools
Export

Capture emulation information from a target system.

Import

Open the Import window, edit exported emulation


information, and then import that information to a test
system.

Undo Import

Display the Open dialog box and select a single .undo file of
imported information to remove it from a test system.

Customize Data

Open the Import window, select an .mcf file, then edit


emulation information without being connected to
Teradata Database.
Note: This option is only available when not connected.

34

Set TLE

Display the Set Target Level Emulation dialog box to define


how RAS, cost parameters, and cost profiles are emulated
on the connected system.

Reset TLE

Display the Reset Target Level Emulation dialog box to reset


RAS, cost parameters, and cost profiles to default values.

Delete Files

Display the Delete dialog box to remove selected Teradata


SET files. The .mcf files are read and, depending on the
export options chosen, the corresponding file types (such as
.ddl and .opt) are removed. See Perform File Management
on page 133.

Pack

Display the Pack dialog box to combine an .mcf file and its
associated files into one file (.pack). The UDF code files
specified (if any) in response to the Browse for UDF File
Open Dialog during export are also packed in the same file.
See Perform File Management on page 133.

Unpack

Display the Unpack dialog box to separate the files in a .pack


file. See Perform File Management on page 133.

Teradata System Emulation Tool User Guide

Chapter 3: Menus and Toolbars


Main Window
Table 4: Main Window Menus, Commands, and Toolbar Buttons (continued)

Menu

Command

Button Description

Define Data Source None

Display the ODBC Database Administrator dialog box to


define or edit ODBC data sources for a Teradata Database.

Execute SQL/SQL
Assistant

Open a query editor (SQL Assistant or Execute SQL) to


execute queries. Click Tools>Options to select an editor.

Options

None

Display the Options dialog box to customize Teradata SET


features. See Customization Options on page 49.

Help
Help Topics
About Teradata
System Emulation
Tool

Open online help.


None

Display version and copyright information.


Note: From the main window, click Help>About Teradata
System Emulation Tool. The About Teradata System
Emulation Tool dialog box appears. See Table 5.

Toolbar button
None

None

Toggle audible notification feature on or off.


Note: Control of this feature is also accessible from
Tools>Options. Select the Customize tab.

Table 5: Version and Copyright Information

Information

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.


Note: This information appears only when connected to a Teradata Database.

Connection Type

The connectivity type is indicated as the following types:


Connected-ODBC - connected to Teradata Database with ODBC connectivity
Connected-CLI - connected to Teradata Database with CLI connectivity
Not Connected - not connected to Teradata Database

Character Set

Displays the session character set used to connect to Teradata Database.


Note: This information appears only when connected to a Teradata Database.

User

Name of the currently connected user.


Note: This information appears only when connected to a Teradata Database.

Database Version Version number of the connected Teradata Database.


Note: This information appears only when connected to a Teradata Database.

Teradata System Emulation Tool User Guide

35

Chapter 3: Menus and Toolbars


Import Window
Table 5: Version and Copyright Information (continued)

Information

Description

Database Release Release number of the connected Teradata Database.


Note: This information appears only when connected to a Teradata Database.
Copyright

Current copyright statement.

Import Window
The Teradata System Emulation Tool - Import window (Figure 3, hereafter referred to as the
Import window) contains menus, commands, and a toolbar that access Teradata SET Import
functions. To open the Import window, click
in the main window. Use the options
available in the Import window to navigate the Import feature.
Figure 3: Teradata SET Import Window

Note: The information that appears in the right pane of the Import window depends on what
was imported.
Table 6 describes the Teradata SET Import window options.
Table 6: Import Window Menus, Commands, and Toolbar Buttons

Menu

Command

Button Description

File
Save As

Display 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 left pane (import
tree) have changed.

Import

36

Import emulation information to a test system.

Teradata System Emulation Tool User Guide

Chapter 3: Menus and Toolbars


Import Window
Table 6: Import Window Menus, Commands, and Toolbar Buttons (continued)

Menu

Command

Button Description

Exit

Close the Import window and return to the main window.

Undo

Undo the last edit.

Edit

Note: This option is only available in edit mode and only


if the emulation information has been edited.
Cut

Move selected text to the Clipboard.


Note: This option is only available in edit mode and only
when text is selected.

Copy

Copy selected text to the Clipboard.


Note: This option is only available in edit mode and only
when text is selected.

Paste

Insert text from the Clipboard.


Note: This option is only available in edit mode.

Find

Display the Find dialog box to search for specified text in


the left or right pane.

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 uppercase
and lowercase characters during the search.
Search in all DDLs. Select to search all object
definitions.
Note: This option is available and included in the Find
dialog box only when searching the Object Definitions
Information pane.
Replace
Select All
Allow Edit

Teradata System Emulation Tool User Guide

Replace selected text.


None

Select all of the text in an editable pane.


Turn on the edit mode to modify object definitions, RAS,
statistics, cost parameters, and cost profiles in the right
pane of the Import window.

37

Chapter 3: Menus and Toolbars


Import Window
Table 6: Import Window Menus, Commands, and Toolbar Buttons (continued)

Menu

Command

Button Description

Apply Changes

Apply edits to the active object definition, RAS, statistic,


cost parameter, or cost profile.
Note: This option is only available after making changes in
edit mode.

View
Tool Bar

None

Show or hide the Import window toolbar.

Status Bar

None

Show or hide the status bar in the main and Import


windows.

Font

None

Display the Font dialog box to change the font style, size,
or color for text displayed under Object Definitions
Information and Explain Text Information in the Import
window.

Source Machine
Configuration

Display 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

Display the Estimated Time dialog box to view the


estimated length of time needed for the import operation.
Click Refresh to load the most current information.
Note: The Estimate Time function requires privileges. See
Estimate-Time Rights on page 22.

Options
Existing Databases

Display the Existing Databases dialog box to view a list of


existing databases.
Note: This option is available when the export includes
one of the following:

38

Object definitions
Execution plans
Workloads
QCD data

Import Options

Display the Import Options dialog box to further define the


databases and emulation information for an import
operation.

Order Database

Allow the reordering of databases at the same level in the


left pane (import tree) of the Import window.

Set TLE

Display the Set Target Level Emulation dialog box to view a


list of the RAS, cost parameters, and cost profiles exported
from a target system. Use the dialog box to define the
emulation information imported to a test system.

Teradata System Emulation Tool User Guide

Chapter 3: Menus and Toolbars


Import Window
Table 6: Import Window Menus, Commands, and Toolbar Buttons (continued)

Menu

Command
Change PermSpace

Button Description
Display the Change PermSpace dialog box to specify
different permanent space (permspace) than that
calculated automatically by Teradata SET. Permanent
space is required for importing objects on a target system.

Help
Note: Help in the Import window is the same as Help in the main window. See Table 4 on page 33.
Toolbar buttons (no corresponding menu or commands)
None

None

Rename the target database.

None

None

Undo the renaming of a target database.

Teradata System Emulation Tool User Guide

39

Chapter 3: Menus and Toolbars


Import Window

40

Teradata System Emulation Tool User Guide

CHAPTER 4

Command-Line Interface

This chapter explains command-line switches and how to perform tasks from the
command line.
Export, import, and undo-import (cleanup) operations can be performed for:

Object definitions

Statistics

RAS

Execution plans

Optimizer cost parameters

Cost profiles

DBS Control information

Demographics

Workload information

Command-Line Switches
Table 7 describes the command-line switches for Teradata SET. Command-line switches are
not case-sensitive.
Table 7: Command-Line Switches

Switch

Task

am

Set authentication mechanism and parameter for connecting to a database.

Connect using ODBC.

dsp

Capture execution plan information for a specific date when queries are added for
export using the function CURRENT_DATE. The date must be specified with this
switch in mm-dd-yyyy format. For example, -dsp 02-12-2008.

ed

Export by database for the specified database name.

esr

Export table data used by query optimization.


Note: This function is available only when command-line switch p (execution
plans) is specified in the export options.

eqf

Teradata System Emulation Tool User Guide

Export by query for the queries contained in the specified file.

41

Chapter 4: Command-Line Interface


Command-Line Switches
Table 7: Command-Line Switches (continued)

Switch

Task

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.

Save the exported information to the specified file.

Import information from the specified file.

icf

Read the command switches from the specified file instead of the command line.

Connect using CLIv2.

lsr

Insert table data used by query optimization to tables on the test system.

qcd

Export and import QCD-related information.

scs

Specify session character set.

Clean up information using the specified file.

unx

Retrieve Data Dictionary information and QCD data using non-X views.

ux

Retrieve Data Dictionary information and QCD data using X views.

uxq

Retrieve data from the QCD using X views.

xapp

Keep the application open and connected following an export, import, or


undo-import (cleanup) operation. By default, the application automatically
disconnects and closes after the operation completes or an unsuccessful log on
occurs.

dbql

Export DBQL query specified on the command line using the parameters DBQL
Database name and DBQL Query ID

tardbql

Import DBQL XML Plans into the specified Target DBQL Database. The target
DBQL Database name should be provided followed by the switch.

Export execution plans in XML form for queries either entered manually (specified
on the command line using switch eqt) or selected from file.

Table 8 describes the command-line switches specifically for export and import options.
Options can be specified in any combination and in any order. For example, typing -drs or
-d -s -r achieves the same result. If no option is specified, all options are considered.
Table 8: Command-Line Switches for Export and Import Options

42

Switch

Task

Export, import, and undo object definitions.

Export, import, and undo cost profiles

Export, import, and undo demographics.

Teradata System Emulation Tool User Guide

Chapter 4: Command-Line Interface


Command-Line Tasks
Table 8: Command-Line Switches for Export and Import Options (continued)

Switch

Task

Export, import, and undo Optimizer cost parameters and DBS Control information.

Export, import, and undo execution plans.

Import and undo import the DBQL XML Plans.

Export, import, and undo RAS.

Export, import, and undo statistics.

Export, import, and undo workload information, including workload definitions and
index recommendations.

Command-Line Tasks
Review the following topics before using the command line:

Log on

Export

Import

Undo Imported Information

Use the Input Command File Switch

Log on
Use the Teradata SET command-line interface to log on to a Teradata Database using either
ODBC or CLIv2 connectivity.
Use the following command syntax to log on to a Teradata Database:
tset [-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]

Note: When only the log-on switch is specified in the command, the application remains
open after a connection is established regardless of the xapp switch.
The following examples demonstrate ways to log on from the command line.
Syntax Example

Description

tset -c mydsn

Use ODBC to log on to the data source named mydsn.


If the complete log-on information is not available in
the DSN, the Teradata Database dialog box appears.

tset -c mydsn\jeff\padres

Use ODBC to log on to the data source named mydsn


with the user name jeff and password padres.

Teradata System Emulation Tool User Guide

43

Chapter 4: Command-Line Interface


Command-Line Tasks

Syntax Example

Description

tset -c mydsn\padres

Use ODBC to log on to the data source named mydsn


with the password padres. If the user name is not
available in the DSN, the Teradata Database dialog box
appears.

tset -l mytdpid\jeff

Display the Connect to Teradata Database dialog box


and wait for a password. Then, use CLIv2 to connect to
a Teradata Database named mytdpid with the user
name jeff.

tset -l mytdpid\jeff\padres

Use CLIv2 to log on to a Teradata Database named


mytdpid with the user name jeff and password padres.

Export
Use the command line interface to export information for a specified database. To export
demographics, use the qcd switch to specify an existing QCD database.
Export by Database
Use the following command syntax to export by database:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
-ed <databasename>
[-qcd <qcdname>]
[-f <exportfile>]
[-d -s -r -p -o -g -w -e]
[-ux|-unx]
[-xapp]]

The following examples demonstrate ways to export by database from the command line.

44

Syntax Example

Description

tset -l prod\dbc\dbc -ed db1


-dsro

Export object definitions, statistics and RAS for


the database dbl from the system prod. Cost
parameters are also exported from the system. The
exported data is saved to a file using the name
prod.

tset -l test\jeff -ed qcd -p


-ux

Export 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 a file named test.

tset -c prod -ed dbc -o -f cost

Export only cost parameters from the system prod.


The exported data is saved to a file named cost.

Teradata System Emulation Tool User Guide

Chapter 4: Command-Line Interface


Command-Line Tasks

Export by Query
Use the command line interface to export information for a specified query. Enter the query
on the command line or specify a file name containing one or more queries. To export
demographics, use the switch to specify an existing QCD database. If the qcd switch is not
specified when exporting execution plans, then the name qcd is used by default.
Use the following command syntax to export data by query:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
[-eqt <querytext>|-eqf <queryfile>]
[-dbql <DBQL DB Name DBQL Query ID>]
[-qcd <qcdname>]
[-f <exportfile>]
[-d -s -r -p -o -g -w -e]
[-ux|-unx]
[-esr]
[-x]
[-xapp]]

The following examples demonstrate ways to export by query from the command line.
Syntax Example

Description

tset -l prod\dbc\dbc -qcd myqcd


-dsro -eqt "select *
from orders" -f query1

Export object definitions, statistics and RAS for


the objects referenced by the specified query from
the system prod. Cost parameters are also
exported. The execution plan for the query is
exported using the QCD database named myqcd.
The exported data is saved to a file named query1.

tset -c prod -p -eqf query.txt


-f queryplans

Export 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 a file named queryplans.

tset -c prod\dbc -eqt "sel *


from dbc.dbcinfo;" -qcd
"testqcd" -p -x

Export the execution plan for the specified query


by capturing the plan in XML form using INSERT
EXPLAIN INTO testqcd IN XML query.

tset -c prod\dbc -dbql


"DBQATXML 163822366665168764" p

Export the execution plan from DBQL Database


DBQATXML with the specified Query ID.

Export by Workload
Use the command line interface to export information for a specified workload. This is useful
for extracting the information required to perform an index analysis on a test system using
Teradata Index Wizard. You must specify the workload name and the name of the QCD that
contains the workload.
Use the following command syntax to export by workload:
tset [-icf <commandfile> ]|

Teradata System Emulation Tool User Guide

45

Chapter 4: Command-Line Interface


Command-Line Tasks
[[-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]]

The following example demonstrates how to export by workload from the command line.
Type:
tset -l prod\dbc\dbc -qcd qcd -ewl wl1 -dsrpow -f workload1

Object definitions, statistics, and RAS for the objects referenced by the queries of workload
wl1 in the QCD named qcd from the system prod are exported. The execution plans for the
queries, the workload definition, plus any index recommendations and cost parameters are
also exported. This is all of the information needed to do an index analysis on a test system
using Teradata Index Wizard. The exported data is saved to a file named workload1.

Import
Use the command line interface to import information associated with a specified .mcf file
onto a Teradata Database. If the requested information is not available in the file, then the
switch is ignored.
Use the following command syntax to perform an import:
tset [-icf <commandfile>]|
[[-c|-l] <DSN_or_tdpid>\<username>\<password>
[-am <Authentication Mechanism>\<Authentication Parameter>]
[-scs <Session characterset>]
[-i <importfile>
[-tardbql <targetDBQLName>]
[-d -s -r -p -o -g -w -e -q]
[lsr]
[-xapp]]

The following examples demonstrate ways to import from the command line.

46

Syntax Example

Description

tset -l test\dbc\dbc -i
prod.mcf

Import all of the information available in the


prod.mcf file onto a Teradata Database named test.

tset -c test -i cost.mcf -o


-xapp

Import cost parameters from the cost.mcf file into a


Teradata Database named test. The application
remains open after the import is completed.

tset -c prod\dbc -i
<importfile> -tardbql dbqatxml
-q

Import DBQL XML plans available in the import


file to the specified target DBQL database
DBQATXML

Teradata System Emulation Tool User Guide

Chapter 4: Command-Line Interface


Command-Line Tasks

Undo Imported Information


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 -q]
[-xapp]]

The following are examples of how to clean up imported information from the command line.
Type:
tset -c test -u prod.31-Jul-04.22.33.12.undo

The information that was imported into a Teradata Database named test, as logged in the
specific .undo file, is cleaned up.
Type:
tset -c

test\dbc -u prod.31-Jul-04.22.33.12.undo -q

The DBQL XML Plans that were imported into a Teradata Database named test, as logged in
the specified .undo file, are cleaned up.

Use 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>]

The following is an example of how to specify an input command file from the command line.
Type:
tset -icf command.txt

where the file command.txt contains the following text:


-c mydsn -ed db1 -dsro

Command options are read from command.txt, and the command is executed.

Teradata System Emulation Tool User Guide

47

Chapter 4: Command-Line Interface


Command-Line Tasks

48

Teradata System Emulation Tool User Guide

CHAPTER 5

Session Options

Teradata SET sessions can be customized using the Options dialog box, which consists of the
following tabs:

Customize

Connectivity

Directory

Error Handling

Use the Customize tab to select options such as whether to create a log file. Use the
Connectivity tab to choose the interface to use when connecting to a Teradata Database. From
the Directory tab, specify the directory in which exported emulation information is saved. Use
the Error Handling tab to chose how errors are handled.
Selections take effect immediately and remain in effect until they are changed.

Customization Options
Use the Customize tab to set options such as whether to create a log file.
Note: It is not necessary to connect to Teradata Database for this procedure.

To set session defaults


1

From the main window, select Tools>Options.

Teradata System Emulation Tool User Guide

49

Chapter 5: Session Options


Customization Options

The Options dialog box appears with the Customize tab selected by default.

Select one or more of the check boxes under Options.


Option

Description

Create log file

Record all operations performed during an active Teradata SET


session. Use the log file to research an operation. For example,
research what occurred during an import operation when the
import is partially successful.

Log SQL statements

Create a log file of the SQL statements used in the export,


import, and undo import (cleanup) processes.

Display logon dialog at startup

Connect automatically to the selected Teradata Database. The


Teradata Database Connect dialog box appears.

Provide Audible Notification

Emit a tone when an event is initiated; for example, when a file


is exported.
Note: Click
on or off.

Use X views (QCD only)

on the toolbar to toggle the audible notification

Retrieve data from the QCD using X views.


See Creating Restricted Views on page 51 for information on
restricted views.

50

Teradata System Emulation Tool User Guide

Chapter 5: Session Options


Customization Options

Option

Description

Use X views (DBC and QCD)

Retrieve Data Dictionary information and QCD data using


X views.
See Creating Restricted Views on page 51 for information on
restricted views.

Use Multi-Threading

Speed up export and import operations with multiple


connections.

Use SQL Assistant instead of


the Execute SQL window with
ODBC connectivity

Use SQL Assistant instead of Execute SQL as the query editor


when connected to the Teradata Database with ODBC
connectivity.
Note: When using a CLIv2 connection, Execute SQL is used
regardless of how this option is set.

Export table data used by


query optimization

Export table data used by query optimization along with the


execution plan.
Note: When this option is selected, table data used by query
optimization is retrieved and stored in Teradata SET export
files. Table data might be needed to accurately emulate a query
plan if the source table of a join has a single-row access using a
unique index because the Optimizer retrieves this row and uses
the column values for cardinality estimations. Execution plans
must be exported in order to use this function. See Export
Options on page 73 for more information on exporting
execution plans.

Import table data used by


query optimization

Insert table data used by query optimization to tables on the


test system.

Export Plans in XML

For queries entered by user, export execution plans in XML


format by submitting INSERT EXPLAIN in XML.

Capture date specific


execution plan information

Execution plan information is captured for a specific date when


queries using the function CURRENT_DATE are added for
export. The Date drop-down list is active when this option is
selected.
This option works when DUMP EXPLAIN or INSERT
EXPLAIN SQL statements are used to capture the execution
plan information.

Click Apply.

[Optional] To continue customizing a session, select another tab in the Options dialog box.

To return to the main window, click OK.

Creating Restricted Views


Restricted DBC database views can be created to limit access to information. Restricted DBC
views are identified by the suffix X and called X views.

Teradata System Emulation Tool User Guide

51

Chapter 5: Session Options


Connectivity Options

Teradata SET uses restricted views to restrict access to data dictionary information and QCD
data the logged in user owns or has access to.
Beginning with Teradata Database 12.00.00, each system view in the DBC database includes a
view that supports Unicode. All Unicode system views are identified by a suffix, V or VX,
when a restricted Unicode view is used.
Note: To learn more about X views, V views, and VX views, see Data Dictionary B035-1092mmyx and Database Administration B035-1093-mmyx.
Additional restricted views required by Teradata SET must be created in Teradata Database.
Teradata SET creates restricted views from a script file. There are three versions of the script
file:

DBCXViews62.bteq; used on Teradata Database V2R6.2, V2R6.1, or V2R6.0

DBCVXViews120.bteq; used on Teradata Database 12.00.00

DBCVXViews130.bteq: used on Teradata Database 13.00.00 and Teradata Database


13.10.00

DBCVXViews140.bteq: used on Teradata Database 14.0

The script files are located in the Teradata installation folder. For example:
C:\Program Files\Teradata\Teradata System Emulation Tool 14.00\DBCXViews62.bteq

To create restricted views


1

Start Teradata SET 14.00.

Select Tools->Options from the menu.


The Options dialog box appears.

Select the Customize tab.

Select Use X views (DBC and QCD).

Connect to the database.


A confirmation message appears.

Click Yes to create the restricted views.

Connectivity Options
Use the Connectivity tab to choose the interface used to connect to a Teradata Database.
Note: It is not necessary to connect to Teradata Database for this procedure.

To select a connectivity type


1

From the main window, click Tools>Options.


The Options dialog box appears with the Customize tab selected by default.

52

Teradata System Emulation Tool User Guide

Chapter 5: Session Options


Directory Options
2

Click the Connectivity tab.

Select a connection type: ODBC or CLIv2.

Click Apply.

[Optional] To continue customizing a session, select another tab in the Options dialog box.

To return to the main window, click OK.

Directory Options
Use the Directory tab to specify the directory and file in which exported emulation
information is saved.
Note: It is not necessary to connect to Teradata Database for this procedure.

To select a path for saved information


1

From the main window, click Tools>Options.


The Options dialog box appears with the Customize tab selected by default.

Teradata System Emulation Tool User Guide

53

Chapter 5: Session Options


Error-Handling Options
2

Click the Directory tab.

To specify a folder in which to save exported information, do one of the following:

Type a complete path name in the Path box.

Select a folder from the Browse for Folder dialog box:


i

Click Browse.

ii

Select a folder under Choose Folder.

iii Click OK.


4

Click Apply.

[Optional] To continue customizing a session, select another tab in the Options dialog box.

To return to the main window, click OK.

Error-Handling Options
Use the Error Handling tab to specify how errors are handled.
Note: It is not necessary to connect to Teradata Database for this procedure.

To set error-handling options


1

From the main window, click Tools>Options.


The Options dialog box opens with the Customize tab selected by default.

54

Teradata System Emulation Tool User Guide

Chapter 5: Session Options


Error-Handling Options
2

Click the Error Handling tab.

Select one or more of the check boxes in the Error Handling tab.
Option

Description

General
Note: Applies to export, import, or undo import (cleanup) operations.
Log only failures in
Summary Report

Log the failed operations into the summary report.

Ignore Teradata Database


errors

Prevent Teradata Database error messages from being displayed


while performing export, import, or undo import (cleanup)
operations.

View the log file to determine the cause of any failures.

Review the log file for information about the errors.


Automatically grant missing
access privileges

Automatically generate the SQL statement to grant the necessary


privileges.
If selected, the Grant access privilege dialog box is not displayed.
Instead, the SQL statement required to grant the necessary
privileges is automatically generated and submitted.

Revoke access privileges

Teradata System Emulation Tool User Guide

To revoke the access privileges granted from TSET.

55

Chapter 5: Session Options


Error-Handling Options

Option

Description

Grant access privileges on


database

TSET generates SQL statement to grant the necessary privileges


on the required database instead of on a particular object
reported on missing access privilege error message.

Import
Note: Applies only to import operations. Depending on other settings selected under Import,
some errors might display. For example, if the Display Object exists dialog check box is selected,
an error appears if a table that is being imported already exists on the system. If this check box is
not selected, all Teradata Database error messages appear.
Display Failed SQL
statement dialog

Display the SQL Statement Failed dialog box. Use this dialog box
to do one of the following:
Abort the import.
Ignore the error and continue importing.
Enter SQL to correct insufficient privileges or permanent
space errors and then retry the failed statement.
Teradata Database errors that can be retried include:
2644
2843
3250
3523
3524
Clear the check box to prevent the SQL Statement Failed dialog
box from appearing. These errors are automatically ignored
during future import operations. See Retry Failed Import
Operations on page 130.

Display Object exists dialog

Display a message that the importing object already exists on the


machine during import of object definitions and ask if the object
should be overwritten using one of the following:
Yes
Yes To All
No
No To All
Cancel
Clear the check box to prevent the Display Object Exists dialog
box from appearing and to make the Option box available.
Automatic message responses are sent based on the option
selection in the Option box.

56

Teradata System Emulation Tool User Guide

Chapter 5: Session Options


Error-Handling Options

Option

Description

Option

Set automatic message response.


Automatic message responses are sent based on the option
selected:
Yes To All. Drop all existing objects, and recreate all exported
objects.
No To All. Do not drop existing objects, and continue with the
import operation.
Cancel. Automatically abort the import operation if any
objects already exist.
Clear the Display Object exists dialog check box to prevent the
Display Object Exists dialog box from appearing and to make the
Option box available.

Prompt to create nonexisting QCDs/DBQLs

Receive a message prompt to create a QCD/DBQL database if the


target QCD/DBQL database does not exist during import of
QCD/DBQL database related information.
Clear this check box to automatically create a target QCD/DBQL
database without being prompted.

Display duplicate primary key error


Note: Applies only during import of RAS; workloads; or cost parameters, Database System
(DBS) Control information, and cost profiles.
Random AMP Samples

Prompt with a dialog box that requests a new system name or


RAS tag if a duplicate prime key error occurs while importing
RAS.
Clear this check box to cause the import operation to fail due to
duplicate prime key errors if the rows already exist on the import
system.
Select the Use the new tag for the rest of the RAS import check box
to use the new RAS tag if duplicate primary key errors occur in
the rest of the import of the RAS rows. Clear the check box to
display the same dialog box for all RAS tags when the duplicate
primary key error occurs.

Workloads

Prompt with a dialog box that requests a new workload name if a


duplicate prime key error occurs while importing workloads.
Clear this check box to cause the import operation to fail due to
duplicate prime key errors if a workload already exists in the
target QCD.

Cost Parameters, DBS


Control and Cost Profile
records

Prompt with a dialog box that requests a new cost tag if a


duplicate prime key error occurs while importing cost
parameters, DBS Control information, and cost profiles.
Clear this check box to cause the import operation to fail due to
any duplicate prime key errors if rows already exist on the import
system.

Teradata System Emulation Tool User Guide

57

Chapter 5: Session Options


Error-Handling Options

58

Click Apply.

[Optional] To continue customizing a session, select another tab in the Options dialog box.

To return to the main window, click OK.

Teradata System Emulation Tool User Guide

CHAPTER 6

Export Methods and Options

Teradata SET is used to quickly capture (export) emulation information, which can be edited,
and then import the information to a test system in order to imitate the target system. For
example, using system information exported from a target system with four nodes, cost
parameters and execution plans can be analyzed on the test system as if it also has four nodes.
See Chapter 7: Import Methods and Options.
The Export feature can be customized to ensure that the test system imitates the features of the
target system being analyzed (see Export Options on page 73). An overview of the process
follows:
1

Before exporting emulation data, connect to a Teradata Database. See Connect to a


Teradata Database on page 29.

Select an export method:

Query: To identify database objects for export using one or more data manipulation
language (DML) statements. See Export by Query on page 59.

Database: To select database objects for individual export. Export by Database on


page 68.

Workload: To identify database objects for export based on an existing workload


definition. See Export by Workload on page 71.

Customize the export operation. See Export Options on page 73.

Export the information needed to emulate the target environment on the test system.

The following topics explain how to use Teradata SET to capture information from a target
system:

Export by Query

Export by Database

Export by Workload

Export Options

Estimate Export Time

Export by Query
This export method uses DML statements to identify database objects to export. The
export-by-query operation uses the SHOW QUALIFIED statement; therefore, use only DML
statements as input. In other words, do not use Data Definition Language (DDL) statements.

Teradata System Emulation Tool User Guide

59

Chapter 6: Export Methods and Options


Export by Query

For more information about the SHOW statement and restrictions, refer to SQL Data
Definition Language B035-1184-mmyx.

To export by query
1

From the main window, click

The Export from Teradata Database dialog box appears.


2

Click Query.

In the File name box, type a file name for the exported emulation information.
Note: By default, the File Name box displays the name of the target system specified when
connecting. See Connect to a Teradata Database on page 29.

Specify a path to the folder in which to save the file named in step 3 by doing one of the
following:

In the In folder box, type a path.

Click Browse to locate a destination folder using Windows Explorer.

By default, the In Folder box displays the path specified in the Options dialog box. See
Directory Options on page 53.
5

Click OK.
The Export By Query dialog box appears.
Figure 4: Export by Query

60

Define the default database for running queries by doing one of the following:

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export by Query

Type the name of the database in the Default Database box.

Click

to select a database from the Default Database list.

Note: If adding a query and the database, tables, and view names in the new query are
fully qualified, it is not necessary to select a database.
7

In the QCD Name box, do one of the following:

Type the database name.

Click

to select a database from the list.

Select queries using any of the following options:

Type a query manually. See Type a query manually on page 62.

Load a query from a file. See Load a query from a file on page 62.

Load a query from a QCD. See Load a query from a QCD on page 63.

Load a query from DBQL. See Load a query from DBQL on page 64.

In Export Options, select the appropriate check boxes to define the exported information.
See Export Options on page 73.

10 [Optional] To further define the selected export options for the query, click Options.

The Export Options dialog box appears. The options available in this dialog box depend on
the selections made under Export Options on the Export By Query dialog box. See Export
Options on page 73.
Note: If a selected query contains a problem, clicking Options displays a Warnings dialog
box. To resolve the warning, change the query or remove it from Selected Queries.
11 [Optional] To customize the headings under Selected Queries:
a

Right-click on the heading row.

Select a command from the shortcut menu.

Figure 5: Selected Queries for Export

12 [Optional] Click Estimate Time to view an estimate of the time needed to export each

object.
See Estimate-Time Rights on page 22 and Estimate Export Time on page 85.
13 Click Export to begin the export process.

Teradata System Emulation Tool User Guide

61

Chapter 6: Export Methods and Options


Export by Query

Note: The export-by-query operation uses the SHOW QUALIFIED statement. To avoid
errors, only input DML statements, not DDL statements. If there is an error, a Warnings
dialog box appears. Modify the statement before restarting the export operation. After the
export operation completes, a summary report of the export operation results appears. See
View a Summary Report on page 129.

Type a query manually


1

In the Query box, type a valid query.


See Perform Query Testing on page 118.

Click Add to move the query to Selected Queries.


Note: To remove a query, select the query and click Remove.

[Optional] To enter another query:


a

Click Clear to erase the text in the Query box.

Type another query.

Click Add.

Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.

Load a query from a file


1

Click Open Query.


The Open dialog box appears.

62

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export by Query
2

Select a file.

Click Open.
All of the queries in the selected file are added under Selected Queries in the Export By
Query dialog box.

Note: To remove a query, select the query and click Remove.


4

Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.

Load a query from a QCD


1

Click Browse QCD.


The Query Capture Database dialog box appears.

Select one or more queries by doing one of the following:

Select one query.

Teradata System Emulation Tool User Guide

63

Chapter 6: Export Methods and Options


Export by Query

Hold Shift or Ctrl while selecting multiple queries.

Click Select All to select all of the queries.

Click OK.
All of the selected queries are added under Selected Queries in the Export By Query dialog
box.
Note: To remove a query, select the query and click Remove.

Under Export Options, select check boxes to define the exported information.
Query text is retrieved from the QCD specified in the QCD Name box. If the Execution
Plans check box is selected, the query plan also is retrieved from the database named in the
QCD Name box. See Export Options on page 73.

Load a query from DBQL


1

Click DBQL Plans.


The DBQL Plans dialog box appears.

64

In the Selection box, do one of the following.

Select DBQL (default) to browse XML queries from the DBQL.

Select External Database to browse XML queries from an external database.

[Optional] Click DBQL Filter Options.

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export by Query

The Select Criteria dialog box appears.

Enter data in the Select Criteria dialog box.


Option

Description

Step Count

The minimum number of steps for the queries received from


the DBQL.

Result Rows

The minimum number of rows returned for the queries


retrieved from the DBQL.

Select Users and Accounts

Click to open the Select Users and Accounts dialog box and
browse queries submitted by a set of users or accounts.
To select a user, enter the user name in the Select User box and
then click Add. You can also click List Users to list all users in
the Select User list box. Select a name and then click Add.
To select an account, enter an account in the Select Account
box and then click Add. You can also click List Accounts to list
all the accounts. Select an account and click Add.
To remove users or account names from the lists, select the user
or account name in the list, and then click Remove.

Select Criteria
Start Date

Teradata System Emulation Tool User Guide

Enter the date in the MM/DD/YYYY format to search for


queries started on or after the specified date. If no start date is
specified, all statements from the DBQL are loaded.

65

Chapter 6: Export Methods and Options


Export by Query

Option

Description

End Date

Enter the date in the MM/DD/YYYY format to search for


queries ending on or before the specified date. If a start date is
specified but no end date is specified, all statements from the
DBQL beginning on the start date and ending on the current
date are loaded.

Start Time

Enter the time in the HH:MM:SS format to search for queries


on or after the specified start time. If no start time is specified,
the default start time of 00:00:00 is used.

End Time

Enter the time in the HH:MM:SS format to search for queries


on or before the specified end time. If no end time is specified,
the default end time of 13:59:59 is used.

Select QueryBand
Name

The name of a Query Band Name-Value pair.


For more information about SET QUERY_BAND, refer to SQL
Data Definition Language B035-1184-mmyx.

Value

The value of a Query Band Name-Value pair.

List Names

Click to list all the Query Band Names in the Name-Value list.

Add

Click to add the selected Query Band Name-Value pair to the


Name-Value list.

Rem

Click to remove the selected Query Band Name-Value pair


from the Name-Value list.

Name-Value

The combination of the Name and Value entries (Name-Value


pair).

Filter

Click to filter out some of the Query Band Name-Value pairs.

Click OK to close the Select Criteria dialog box and return to the DBQL Plans dialog box.

Click Browse DBQL to load the XML queries from DBQL to add to the Query List.

Select one or more queries by doing one of the following:

Select one query.

Hold Shift or Ctrl while selecting multiple queries.

Click Select All to select all of the queries.

Click OK to add the XML queries to the Select Queries list in the Export by Query dialog.

Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.

Specifying USING Clause Values


For queries that the user inputs manually or selects from a file, TSET submits a DUMP
EXPLAIN or INSERT EXPLAIN query to export execution plan information. If the query
66

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export by Query

includes the USING clause, TSET displays the Input USING Values to capture specific plans
screen.
Figure 6: USING Values to Capture Specific Plans

Use this screen to specify values for the USING clause shown for each selected query.
The Using Variables fields display data in the Name field and Datatype field. Enter data values
in the Value column for each query listed in the Using Query edit box.
Click OK to export specific execution plans that contain values for the USING clause.
Click Ignore to capture generic execution plans.
Click Ignore All to capture generic plans for all other export queries containing the USING
clause.

Teradata System Emulation Tool User Guide

67

Chapter 6: Export Methods and Options


Export by Database

Export by Database
Use the export-by-database method to select database objects for individual export and to
define the information to export.

To export by database
1

From the main window, click

The Export from Teradata Database dialog box appears.


2

Click Database.

In the File name box, type a file name for the exported emulation information.
By default, the File name box displays the name of the target system specified when
connecting. See Connect to a Teradata Database on page 29.

Specify a path to the folder in which to save the file named in step 3 by doing one of the
following:

In the In folder box, type a path.

Click Browse to locate a destination folder using Windows Explorer.

By default, the In Folder box displays the path specified in the Options dialog box. See
Directory Options on page 53.
5

Click OK.
The Export By Database dialog box appears.

68

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export by Database

Define the export source by doing one of the following:

To export from an entire database or from a user, either:

Enter the name of the database or user in the Specify Export Database box.

Click

to select a database or user from the Specify Export Database list.

Note: The Execution Plans check box is unavailable, by default, unless a database in
List of Objects pane is marked as a QCD, or a database is selected from the Specify
Export Database list and the Query Capture Database check box is selected.

To export from an individual database object:


i

In the List of Objects pane, select the object.

ii

Click Add to move the object to the Selected List pane.

iii Repeat step i and step ii until all of the required objects are in the Selected List

pane.

To find a database object:


i

Click on an object in the List of Objects pane.


To search in the selected list of objects, click on an object in the Selected Lists pane.

ii

Click Find Object. The Find dialog box appears.

iii Enter an object name in the Find what field.


iv Select any other find options on the dialog box, and then click Find Object.

Teradata System Emulation Tool User Guide

69

Chapter 6: Export Methods and Options


Export by Database
v

Click Add to move the object to the Selected List pane.

Note: To remove an object from the Selected List pane, select it and click Remove.

To add multiple databases for export:


i

ii

Specify the database or user in the Specify Export Database in either of the
following ways:

Enter the name of the database or user in the Specify Export Database box.

Click the browse button to select a database or user from the Specify Export
Database list.

Click Add to move the object to the Selected List pane.

Note: If the Add button is not clicked, after specifying the database or user in the
Specify Export Database box, only the database specified in the Specify Export
Database box is available for export.

To add multiple query-capture databases for export


i

Select the check box Query Capture Database.

ii

Specify a query-capture database in the Specify Export Database box in either of the
following ways:

Enter the name of the query-capture database in the Specify Export Database
box.

Click the Browse button to select a query-capture database from the Specify
Export Database list.

iii Click Add to move the object to the Selected List pane.

Note: After selecting the Query Capture Database check box, and clicking the Browse
button, only query-capture database names populate the Specify Export Database list.
If the Query Capture Database check box is deselected and the Browse button is clicked,
all database names populate the Specify Export Database list. If the Add button is not
clicked after specifying a query-capture database in the Specify Export Database box,
only the query-capture database names specified in the Specify Export Database box
are available for export.
7

[Optional] Under Export Options, select check boxes to define the exported information.
See Export Options on page 73.

[Optional] To further define the selected export options, click Options.


The Export Options dialog box appears. The options available in this dialog box depend on
the selections made under Export Options on the Export By Database dialog box.

70

[Optional] To mark a database as a QCD:


a

In the List of Objects pane, right-click the name of a database to display the shortcut
menu.

Click Mark as QCD.

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export by Workload

Note: The Execution Plans check box under Export Options is available only when the
database is marked as a QCD.
10 [Optional] Click Estimate Time to see the estimated time required to process the export

request.
See Estimate-Time Rights on page 22 and Estimate Export Time on page 85.
11 Click Export to begin the export process.

After the export operation completes, a summary report of the export operation results
appears. See View a Summary Report on page 129.

Export by Workload
Use this export method to choose a QCD database and multiple workloads for export and to
define the details for the specific emulation information to capture.

To export by workload
1

From the main window, click

The Export from Teradata Database dialog box appears.


2

Click Workload.

In the File name box, type a file name for the exported emulation information.
By default, the File Name box displays the name of the target system specified when
connecting.

Specify a path to the folder in which to save the file named in step 3 by doing one of the
following:

In the In folder box, type a path.

Click Browse to locate a destination folder using Windows Explorer.

By default, the In Folder box displays the path specified in the Options dialog box. See
Directory Options on page 53.
5

Click OK.

Teradata System Emulation Tool User Guide

71

Chapter 6: Export Methods and Options


Export by Workload

The Export By Workload dialog box appears.

Select a QCD database to be the source of the workload information by doing one of the
following:

Type the name of the database in the QCD Database box.

Click

[Optional] To load index recommendations for the selected workload, do one of the
following:

to select a database from the QCD Database list.

Specify the workload:


i

Type the workload name in the Workload box.

ii

Press Enter.

Click the Workload arrow to select a workload from the list.

[Optional] To view the statements that make up a workload:


a

Under Workload Information, right-click the workload name.

Click View Workload.

The View Workload dialog box appears.


9

72

[Optional] To move an index recommendation from Workload Information to Selected


Workload:
a

Under Workload Information, select a row.

Right-click the row to display the shortcut menu.

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export Options
c

Click Add.

10 [Optional] To remove a workload from the export operation:


a

Under Selected Workloads, select a row.

Click Remove.

Note: For a workload without any recommendations, the Index tag and Recommendation
Time boxes are empty.
11 [Optional] To customize the headings under Workload Information or Selected Workload:
a

Right-click on the heading row.

Click Hide/Show Columns.

Select headings to hide or show.

12 [Optional] Under Export Options, select check boxes to define the exported information.

See Export Options on page 73.


13 [Optional] To further define the selected export options, click Options.

The Export Options dialog box appears. The options available in this dialog box depend on
the selections made under Export Options on the Export By Workload dialog box.
14 [Optional] Click Estimate Time to see the estimated time required to process the export

request.
See Estimate-Time Rights on page 22 and Estimate Export Time on page 85.
15 Click Export to begin the export process.

After the export operation completes, a summary report of the export operation results
appears. See View a Summary Report on page 129.
Note: The Partition Tag column in the workload information and selected workloads
displays the partition recommendation tag name. When a partition recommendation tag
is displayed, the Index Tag column is blank. When the Index Tag column displays an index
tag, the Partition Tag column is blank.

Export Options
This section describes the purpose of each check box and explains how to use each option.
Check boxes also can be used in combination.
Select check boxes under Export Options, located in the export dialog boxes (Export By Query,
Export By Database, and Export By Workload), to define the information exported from a
target system. Availability of the check boxes varies according to the type of export selected.

Teradata System Emulation Tool User Guide

73

Chapter 6: Export Methods and Options


Export Options

When exporting by query and either typing a query manually or loading a query from a file,
the execution plans are captured and exported depending on the options selected for
Execution Plans, Export Plans in XML (Customization option), and Demographics as described
below.
Export Plans
in XML

Execution
Plans

Demographics

Description

Checked

Checked

Unchecked

INSERT EXPLAIN in XML captures the plan


into a QCD database and deletes it after the
export operation.

Unchecked

Checked

Unchecked

DUMP EXPLAIN captures the plan.

Checked or
Unchecked

Checked

Checked

INSERT EXPLAIN captures the plan into a


QCD database and deletes it after the export
operation.

During an import operation, the plan is imported into the database listed in the QCD Name
box. If the Execution Plans check box is selected and the Export table data used by query
optimization check box is selected when customizing options (see Customization Options on
page 49 for more information), table data used by query optimization is captured.
For more information, refer to SQL Request and Transaction Processing B035-1142-mmyx.
Click Options, when available, to display the Export Options dialog box and modify the default
settings for:

Cost parameters

Cost profiles

Demographics

RAS

After defining the options, Teradata SET can be used to estimate how long the export will take
given the options selected. See Estimate Export Time on page 85.

All
Select the All check box to capture all of the elements listed in the dialog box except
demographics. This option can be used to capture the TLE information (or black-box test
environment) of specific, problem-causing queries to simulate the production environment
on a test system for debugging. To include demographics, select the Demographics and All
check boxes. See Demographics on page 78.

Cost Parameters
Select the Cost Parameters check box to export the Optimizer environmental cost parameters
and DBS Control information from a target system. Cost parameters are captured from the
system Globally Distributed Object.

74

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export Options

To change the cost parameters export options


1

From an export dialog box, click Options.


The Export Options dialog box appears.

[Optional] In the Cost tag box, type a new file name.


By default, the Cost tag box displays the file name entered when choosing an export
method in the Export from Teradata Database dialog box.

To capture cost data from specific rows, click Select Rows.


The Export Cost Parameters dialog box appears.

Select a method for exporting cost parameters.

Teradata System Emulation Tool User Guide

75

Chapter 6: Export Methods and Options


Export Options

Option

Description

Capture from Source

Export cost parameters from SystemFE.Opt_Cost_Table for the


selected rows.
Cost parameters and related DBS Control information is
exported after parameters are captured from the target system.

Capture Current Costs

Export the cost parameters and DBS Control information from


the target system.
A row is inserted into SystemFE.Opt_Cost_Table and
SystemFe.Opt_DBSCtl_Table using the cost tag specified in the
Cost tag column. The row is exported and then deleted from
SystemFE.Opt_Cost_Table and SystemFe.Opt_DBSCtl_Table
after the export process is complete.

Set Costs

Set and then export the cost parameters for a given row.
This option is available only when an entry exists in
SystemFE.Opt_Cost_Table. Only one cost parameter can be set
for a system. It ensures that the Optimizer ignores the current
system parameters and uses the new parameters when
generating an execution plan. Using this option is similar to
using a DIAGNOSTIC SET COST statement.
Note: This option is available only when exporting by query.
TLE must be turned on before setting cost parameters. Be
aware that TLE might cause system performance degradation.
For more information about TLE, refer to SQL Request and
Transaction Processing B035-1142-mmyx.

Click OK to close the Export Cost Parameters dialog box and return to the Export Options
dialog box.

Click OK to close the Export Options dialog box.

Cost Profiles
Select the Cost Profiles check box to export cost profiles from a target system.

To change the cost profile export options


1

From an export dialog box, click Options.


The Export Options dialog box appears.

[Optional] In the Profile Name box, type a new file name.


By default, the Profile Name box displays the file name entered when choosing an export
method in the Export from Teradata Database dialog box.

76

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export Options

To capture specific cost profiles, click Select Rows.


The Export Cost Profiles dialog box appears.

Define the way that cost profiles are exported.


Option

Description

Capture from Source

Export cost profiles from DBC.CostProfiles_v.


This option exports cost profiles after capturing the profiles
from the target system.

Capture Current Cost Profile

Teradata System Emulation Tool User Guide

Export the active cost profile from the target system.

77

Chapter 6: Export Methods and Options


Export Options

Option

Description

Set Cost Profile

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: This option is available only when exporting by query.
TLE must be turned on before setting a cost profile. Be aware
that TLE might cause system performance degradation. For
more information about TLE, refer to SQL Request and
Transaction Processing B035-1142-mmyx.

Click OK to close the Export Cost Profiles dialog box and return to the Export Options
dialog box.

Click OK to close the Export Options dialog box.

Demographics
Select the Demographics check box to export information about tables (demographic data).
Demographics can only be captured and imported when a QCD is specified during an export
operation. Captured demographics are collected in the specified QCD. To export
demographics information in addition to the information exported when All is selected, select
the Demographics check box.
Depending on the type of export operation performed, this feature either captures
demographics of the tables and indexes referenced in a query or samples of all of the tables in
a given database.

To change the demographics export options


1

From an export dialog box, click Options.


The Export Options dialog box appears. By default, the Demographics Source box displays
the name of the active QCD.

78

Click Select Tables.

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export Options

The Export Demographics dialog box appears and displays a list of the tables selected for
export.

Define the way that demographics are exported.


Option

Description

Capture from QCD database

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.

Capture Current
Demographics

Export current demographics into the QCD source that is


specified in the Demographics Source box. If demographics for
a table exist, the row is updated. If demographics for a table do
not exist, the demographics inserted into the QCD are deleted
after the row is exported.

[Optional] To view a graph or chart of the demographics for a selected table:


a

Select a row under Select Rows.

Click View Demographics.

Teradata System Emulation Tool User Guide

79

Chapter 6: Export Methods and Options


Export Options

The Demographics interface opens. Use the interface to display demographic data in
various formats. For more information about the Demographics interface, refer to
Teradata Index Wizard User Guide B035-2506-mmyx.
5

Click OK to close the Export Demographics dialog box and return to the Export Options
dialog box.

Click OK to close the Export Options dialog box.

Execution Plans
Select the Execution Plans check box to export (in relational format) the Optimizer execution
plans that are created for queries. A DUMP EXPLAIN script of the queries also is captured.
Execution plans are selected for export based on the type of export operation: by query, by
database, or by workload.
Note: When the Execution Plans check box is selected, Explain Text, Step Report, and
Summary Information are also captured and displayed in the Import window.

To export execution plans when exporting by query


1

From the Export by Query dialog box, click

Select a QCD from the QCD Name list.

Select the Execution Plans check box.

next to the QCD Name box.

Execution plans can only be exported and imported when a QCD is specified for the
export operation and the Execution Plans and Demographics check boxes are selected. If
selected, demographics information is collected in the QCD.

To export execution plans when exporting by database


When exporting by database, there are two ways to capture execution plans.
1

Do one of the following:

Specify a database to export: Go to step 2.

Select a QCD database to export: Go to step 3.

[Optional] Specify a database:


a

From the Export by Database dialog box, click


box.

Select a QCD database.

Select the Query Capture Database and the Execution Plans check boxes.

[Optional] Select a QCD database:


a

80

next to the Specify Export Database

From the Export by Database dialog box, select a QCD database from the List of
Objects pane.

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export Options
b

Right-click the row to display a shortcut menu.

Select Mark as QCD.

Select the Execution Plans check box.

To export execution plans when exporting by workload


1

From the Export by Workload dialog box, click

Select a QCD database.

Select the Execution Plans check box.

next to the QCD Database box.

Object Definitions
Select the Object Definitions check box to export the data model and the DDL text of selected
objects or the objects referenced by a given query. Use this option to export the details of the
structure and instances of the objects used by a given query.
Exported object definitions are used to create the tables, views, macros, triggers, indexes,
stored procedures, User Defined Functions (UDFs), and UDTs on a test system. Object
definitions are selected for export based on the type of export operation.
When exporting by query, selecting the Object Definitions check box exports the UDFs and
UDTs returned by the SHOW QUALIFIED statement on the query.
When exporting by database, selecting the Object Definitions check box exports the UDTs
referenced by objects added for export and the UDTs added manually for export.
When exporting by workload, selecting the Object Definitions check box exports the UDFs and
UDTs returned by the SHOW QUALIFIED statement on the queries.
Note: While exporting UDFs, TSET retrieves only the CREATE/REPLACE FUNCTION DDL,
as TSET cannot retrieve UDF code files (source, header, or object). The user must supply the
UDF code files. TSET displays the File Open Dialog screen for browsing the UDF code files
during export. The screen title includes the UDF filename for C and C++ UDFs. For JAVA
UDFs, the JAR_ID and Java ClassName are included in the screen title. The supplied UDF
code filenames are copied to the Export path.
If C and C++ UDF code files are not copied to the export path, the pack operation fails.
If Java UDF code files are not copied to the export path, the pack operation does not fail, but
the Java UDF code files must be moved manually from the production system to the test
system.
Missing code files are displayed at the end of the export operation, and before an import
operation.

QCD Data
Select the QCD Data check box to export all execution plans, workloads, QCD statistics, and
demographics from a QCD database. This option applies only to databases marked as QCD

Teradata System Emulation Tool User Guide

81

Chapter 6: Export Methods and Options


Export Options

when defining the export-by-database operation. At least one database must be marked as
QCD for this option to be available.
Note: This option applies only to QCD databases with QCF version 03.00.00 or later.

Random AMP Samples


Select the Random AMP Samples check box to export the data distribution of a table on one or
more randomly selected AMPs based on the type of export operation.
When exporting by query, this option exports the RAS for the tables referenced by the
specified queries.
When exporting by database, this option exports the RAS of the tables selected for export.
When exporting by workload, this option exports the RAS for the tables referenced by the
workload queries.
TLE must be turned on before setting RAS. Be aware that TLE might cause system
performance degradation. For more information on TLE, refer to SQL Request and
Transaction Processing B035-1142-mmyx.

To change the RAS export options


1

From an export dialog box, click Options.


The Export Options dialog box appears.

[Optional] In the RAS tag box, type a new file name.


By default, the RAS tag box displays the file name entered when choosing an export
method in the Export from Teradata Database dialog box.

Note: No more than 128 tables can be selected in the current session. However, an
unlimited number of rows can be exported from SystemFE.Opt_RAS_Table.
3

Click Select Tables.


The Export Random AMP Samples (RAS) dialog box appears.

82

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Export Options

Figure 7: Export Random AMP Samples (RAS)

Under Select Table Names, do one of the following:

Select the tables to export.

Click Select All.

To define the way that RAS are exported, select an option.


Option

Description

Capture from Source

Export RAS from SystemFE.Opt_RAS_Table and allow the use


of RAS already added to SystemFE.Opt_RAS_Table. These
samples can be added manually to SystemFE.Opt_RAS_Table
using another tool, such as using the DIAGNOSTIC DUMP
statement in Basic Teradata Query (BTEQ).

Teradata System Emulation Tool User Guide

83

Chapter 6: Export Methods and Options


Export Options

Option

Description

Capture from AMPs

Export samples from the target system. Use this option to


export samples for the selected row directly from the AMPs.
This option exports samples to SystemFE.Opt_RAS_Table using
the RAS tag specified in the RAS tag box. The samples are
deleted after the row is exported.
Note: If the row exists in SystemFE.Opt_RAS_Table, the
Duplicate Random AMP Samples (RAS) dialog opens,
enabling the user to select the required option. See Figure 8 on
page 84.

Set Samples

Set the RAS for the selected row before exporting. This ensures
that the Optimizer uses this set of samples when generating an
execution plan. Only one RAS can be set for each table selected.
Note: This option is available only when exporting by query.

Click OK to close the Export Random AMP Samples (RAS) dialog box and return to the
Export Options dialog box.

Click OK to close the Export Options dialog box.

Export Options for RAS Duplicate Keys


The following screen image is referenced in the table above in the Capture from AMPs option.
The export options are described below this image.
Figure 8: Duplicate Random AMP Sample

Note that the option chosen is utilized for the remaining Duplicate Random AMP Sample.
Option

84

Description

Teradata System Emulation Tool User Guide

Chapter 6: Export Methods and Options


Estimate Export Time

Delete and Recollect Sample.

Deletes the existing stale Random AMP Sample


(RAS), and exports RAS to
SystemFE.Opt_RAS_Table. The row is deleted
after export operation.

Export existing Sample from Opt_RAS_Table.

Exports the existing sample.

Ignore. Do not export this sample.

Skips the export of RAS for this tag.

Do not show this dialog again.

When checked, the Duplicate Random AMP


Sample dialog box is not invoked for the
remaining Duplicate RAS errors and the RAS
export option chosen previously is used to
resolve Duplicate RAS errors observed during
the remaining export operation.

Statistics
Select the Statistics check box to export statistics based on the type of export operation.
When exporting by query, this option exports the statistics that were collected (if any) for the
database objects referenced in the selected list of queries.
When exporting by database, this option exports the statistics of the database objects selected
for the export, if any were collected.
When exporting by workload, this option exports the statistics for the database objects
referenced by the workload query.

Workloads
Select the Workload check box to export specific queries and recommendations for a
workload.
Note: This option is available only when exporting by workload. See Export by Workload
on page 71.

Estimate Export Time


After an export is defined (see Export Options on page 73), Teradata SET can be used to
estimate how long it will take to run the export operation. If the estimate is high, the export
parameters can be defined or the operation can be run at a more convenient time.
The estimate-time function is available for all export methods. Specific privileges and a
connection to a Teradata Database are required. See Estimate-Time Rights on page 22.

To view the estimated export time


1

Go to one of the following:

Export By Query dialog box (see Export by Query on page 59)

Teradata System Emulation Tool User Guide

85

Chapter 6: Export Methods and Options


Estimate Export Time

Export By Database dialog box (see Export by Database on page 68)

Export By Workload dialog box (see Export by Workload on page 71)

Click Estimate Time.


The Estimated Time dialog box appears and displays time estimates for each object being
exported plus a total estimated time for the export operation.

86

Click Refresh to view estimates of the time needed to export each object.

Click OK to close the Estimated Time dialog box.

[Optional] When exporting by query, a query can be removed or the estimated time for a
selected query or queries can be viewed:
a

Under Selected Queries, right-click on the row.

Select a command from the shortcut menu.

Teradata System Emulation Tool User Guide

CHAPTER 7

Import Methods and Options

Use the import function to import emulation information to a test system where query plan
analysis can be performed. To prepare for an import operation:
1

Read or review this chapter.

Connect to a Teradata Database. See Chapter 2: Connection Methods.

Perform an export operation. See Chapter 6: Export Methods and Options.

The following topics explain Teradata SET import functions and options:

Import to a Test System

Change Import Options

Specify Objects for Import

Change RAS Byte Order

Edit Import Information

Change Permanent Space

Retry a Failed SQL Statement

Edit Information Offline

Save Changed Information

Display Existing Databases

Rename a Target Database

Undo Target Database Renaming

Reorder Databases

View Machine Configuration

Estimate Import Time

Import to a Test System


The Import feature can be customized in a variety of ways to maximize the usefulness of the
test system. An overview of the process follows:
1

Before importing data, connect to a Teradata Database. See Connect to a Teradata


Database on page 29.

Select an export method. See Chapter 3: Menus and Toolbars.

Teradata System Emulation Tool User Guide

87

Chapter 7: Import Methods and Options


Import to a Test System
3

Export the information needed to emulate the target environment on the test system. See
Chapter 6: Export Methods and Options.

Import the information to the test system, modifying the import options if necessary. See
Chapter 7: Import Methods and Options.

Manage the imported data:

Remove emulation information.

Delete files.

Email data to another location.

Troubleshoot the import and export processes.

See Chapter 8: Administrative Functions.


An .mcf file is created when emulation information is exported from a target system. This file
includes pointers to the raw data files that are also created during export. During an import
operation, the data in these files is applied to the default location specified in Table 9.
Table 9: Default Import Locations

Import Item

Default Import Location

Change
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

RAS

SystemFE.Opt_RAS_Table

No

Statistics

Data Dictionary

No

Workload data

Export QCD

Yes

To change the owner of databases or users, use the Parent Database box in the Import Options
dialog box. To change the QCD, use the Target QCD box in the Import Options dialog box. See
Change Import Options on page 91.
To change the location or target database where objects are created, use the Rename function
in the Import window. See Rename a Target Database on page 105.

88

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Import to a Test System

To import emulation information to a test system


Before proceeding, connect to a Teradata Database, and perform an export operation. See
Connect to a Teradata Database on page 29 and Chapter 6: Export Methods and Options.
1

From the main window, click

From the Open dialog box, select the .mcf file to use when importing information.

The preview pane (right pane) displays information about the file such as source system
information. To close the preview pane, clear the Show Preview check box.

Note: A confirmation message displays the name of any missing file along with a
statement that the corresponding option cannot be imported. Close the message box to
open the Import window.
3

Click Open.
The Import window opens and displays the file name in the title bar.

Teradata System Emulation Tool User Guide

89

Chapter 7: Import Methods and Options


Import to a Test System
4

In the left pane, select objects to import, such as a table.

Note: The Import menus and toolbar differ somewhat from those in the main window. See
Import Window on page 36.
5

[Optional] Perform any of the following procedures before completing the import:

To change import options on page 92

To select objects for import on page 96

To change RAS byte order on page 97

To edit import information on page 98

Click

A confirmation message appears.

Click Yes to start the import operation.


Note: If a database being imported does not exist on the test system, it is created before the
database objects are imported into the database. The main window displays the status of
the import operation. The message Import completed appears in the main window
after the operation is completed. If error messages appear while importing object
definitions, see Retry Failed Import Operations on page 130.

90

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Change Import Options
8

[Optional] View a summary report of the import operation results.


See View a Summary Report on page 129.

[Optional] Perform query plan analysis on the test system.

Note:

To import C and C++ UDF code files that reside on the Client, the code files (source,
header, or object) must be available in the Import path. Object files must have been
generated to be compatible with the compiler/linker of the Database Server.

The client-side UDFs cannot be imported with ODBC connectivity.

To import C and C++ UDF code files that reside on the Sever, files must be copied to the
appropriate path, as specified in the CREATE FUNCTION DDL, on the Server. If a path is
unspecified, the files must be copied to the default path. Refer to the Database
Administration manual for default paths.

To import Java UDF code files, the JAR file, supplied by the user during the export
operation, must be registered using the external stored procedure SQLJ.INSTALL_JAR().
Registering the JAR file with the JARID and ClassName specified in the CREATE
FUNCTION DDL can be done outside TSET using a BTEQ session.

Missing files are displayed before the Import operation.

Change Import Options


The characteristics of an import can be changed prior to importing information to a test
system.

Teradata System Emulation Tool User Guide

91

Chapter 7: Import Methods and Options


Change Import Options

To change import options


1

From the Import window, click

The Import Options dialog box appears.

Option

Description

Parent Database Info


Parent Database

Specify a database name to be the owner for any database or user


created during the import operation.
Note: This option is available only when importing object definitions,
demographics, execution plans, and workloads.

External DBQL Selection

92

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Change Import Options

Option

Description

Target DBQL

Specify the DBQL listed as the destination DBQL for the import of
XML plans.
Note: This option is only available when importing DBQL XML
Plans.
If a target DBQL is not selected, then the DBQL Database from which
the plans are exported becomes the target DBQL.
If the target DBQL is DBC, the import is terminated.
If the Target DBQL database specified does not exist, Teradata SET
either prompts for the creation of the DBQL, or it automatically
creates the DBQL depending on the selected import error handling
options. See Error-Handling Options on page 54.

QCD Selection
Target QCD

Specify the QCD listed as the destination QCD for the import
operation.
Note: This option is available only when importing execution plans,
QCD data, demographics, or workloads. If no target QCD is specified,
the information is imported into the QCD from which it was
exported. If the database does not exist, Teradata SET either prompts
for the creation of the QCD or automatically creates the QCD,
depending on the import error handling options. See
Error-Handling Options on page 54.

Source Version

Display the QCF version number of the export system.

Current Version

Display the QCF version number of the system to which Teradata SET
is connected.

Import Options
Object Definitions

Create or define the database objects.

Random AMP Samples

Import RAS into SystemFE.Opt_RAS_Table.

Execution Plans

Import execution plans into a QCD.


Note: It is possible to import execution plans to a later version of
Teradata Database. However, to import execution plans to an earlier
version requires that a compatible-version QCD exist on Teradata
Database.

QCD Data

Import index recommendations, workload definitions, and execution


plans to the QCD specified in the Target QCD box.
Note: This check box is available only if an export-by-database
operation was performed for one or more databases marked as QCDs
and the QCD Data check box was selected. To import only execution
plans, clear the QCD Data check box and select Execution Plans. 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. See Error-Handling Options on page 54.

Teradata System Emulation Tool User Guide

93

Chapter 7: Import Methods and Options


Change Import Options

Option

Description

Cost Profiles

Import cost profiles into the Data Dictionary.

Statistics

Import the statistics into the Data Dictionary.

Demographics

Import 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.

Workloads

Import the workload definitions and any index recommendations to


the QCD specified in the Target QCD box during export.
Note: This check box is available when exporting by workload. 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

Import system cost parameters into SystemFE.Opt_Cost_Table and


import DBS Control information associated with the cost parameters.

DBQL Plans

Import DBQL XML Execution Plans into a DBQL.

Miscellaneous Options
Only synchronize
version of created
tables

Import original
statistics collection
timestamp

Only synchronize the version with the tables successfully created by


Teradata SET during the import operation.
Note: If the check 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. This feature is available only
when the Object Definitions and Execution Plans check boxes are
selected.
Use the original timestamp value for all statistics data in the current
import operation.
Note: If the check box is not selected, all statistics data in the current
import operation is imported using the current timestamp value.

[Optional] In the Parent Database box, do one of the following:

Type an owner name for any databases or users created during the import operation.

Click

to load the available databases and select one from the list.

By default, the Parent Database box displays the database name established when
logging on.
3

94

[Optional] In the Target QCD box, specify the destination QCD for the import by doing
one of the following:

Type a QCD name in the Target QCD box.

Click

to load the available QCDs and select one from the list.

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Specify Objects for Import
4

[Optional] Under Import Options, clear check boxes to exclude items from the import.
This results in a partial import. Options are available only if they were included in
the export.

[Optional] Click Error Handling to change how errors are handled during the import
operation.
See Error-Handling Options on page 54.

Click OK to close the dialog box and return to the Import window.
Note: A
appears next to the object in the left pane that corresponds to a selection
made under Import Options in the Import Options dialog box (see step 4).

[Optional] Save the import options for a future import operation.


See Save Changed Information on page 104.

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

Specify Objects for Import


Specific objects can be selected for import. Typically this is done when performing a partial
import.
From the Import window:

The left pane (import tree) features an expandable view of the database objects, object
definitions, statistics, and RAS that can be imported.

The right pane provides information about any object selected in the left pane.

Teradata System Emulation Tool User Guide

95

Chapter 7: Import Methods and Options


Specify Objects for Import

For example, see Figure 9. When an object definition is selected in the left pane, the associated
information appears in the right pane.
Figure 9: Importing Selected Objects

To select objects for import


1

From the Import window, click


the view.

Select the objects to import.

next to each database object in the left pane to expand

A check mark next to an object indicates that the object is selected for import. A check
mark appears next to every item by default.
Note: If there is no check mark next to an object, it is not available for import. To import
an object that is not included in the list of available objects, see Change Import Options
on page 91.
3

Clear the check box next to any database object that is not intended for import.
Note: Clearing a check box at the parent level automatically clears all check boxes at the
child level. Check boxes at the same child level can be selected separately.

[Optional] Save the import options for a future import operation.


See Save Changed Information on page 104.

96

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Change RAS Byte Order

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

Change RAS Byte Order


If RAS are imported to a hardware platform with dissimilar byte layout, the RAS byte order
cannot be determined and must be changed. Failing to change the byte layout can lead to
incorrect interpretation of the data.
To ensure the NumRows data is correctly interpreted, specify the byte order of the source and
target machines before initiating the import operation.

To change RAS byte order


Caution:

Use this procedure only when importing to a hardware platform with dissimilar byte layout.
1

From the Import window, click

Right-click a RAS node and select RAS Byte Order.

next to RAS Tags in the left pane to expand the view.

The RAS Byte Order dialog box appears.


Note: If the byte order for one table changes, it changes for all of the tables.
3

In the Source Machine Byte Order box, select one of the following:

Little-Endian

Big-Endian

In the Target Machine Byte Order box, select one of the following:

Little-Endian

Big-Endian

Click OK.

Make sure the check box located next to the RAS tag is selected so it is included in the
import.

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

Teradata System Emulation Tool User Guide

97

Chapter 7: Import Methods and Options


Edit Import Information

Edit Import Information


The Windows editing commands, such as Find, can be used in the Import window to edit the
text and tables. Edits are made in the right pane of the Import window.
The following information is editable:

Cost parameters, including DBS Control information

Object definitions

RAS

Statistics

Cost profiles

To edit import information


1

From the Import window, select an object in the left pane to edit.
Corresponding information is displayed in the right pane.

Click

Edit the information by doing one of the following:

Double-click the information in the right pane in order to edit:

Statistics

RAS

Cost parameters

DBS Control information

Cost profiles

Click under Object Definitions Information to edit object definitions directly.

Click

[Optional] Save the changes to a different file name.

See Save Changed Information on page 104.


6

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

Change Permanent Space


Teradata SET uses a formula to automatically calculate the permanent space (also called
permspace) required for creating a database. Permanent space calculations are based on the
number of objects selected and the space required for creating child databases. However, the
amount of space calculated can be more or less than the system can spare. Follow the
permanent space messages to correct this situation.
98

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Change Permanent Space

Permanent space requirements can be specified before importing objects from a target system.
Change the permanent space allotment to avoid messages about permanent space.

To change the permanent space


Before proceeding, connect to a Teradata Database, and perform an export operation. See
Connect to a Teradata Database on page 29 and Chapter 6: Export Methods and Options.
1

From the Import window, click

The Change PermSpace dialog box appears.

Note: Existing databases are highlighted in blue. Space cannot be specified for existing
databases.
The only editable box is Scale Factor(KB). The only editable column is User Specified
Space(KB).
Option

Description

Information

Information about using the dialog box.

Warnings

For rows shown in bold, warnings about the database


or QCD.

Teradata System Emulation Tool User Guide

99

Chapter 7: Import Methods and Options


Change Permanent Space

Option

Description

Scale Factor(KB)

An integral number Teradata SET uses to automatically


calculate space required to create the objects in a
database. Change Scale Factor(KB) to a number
between 1 and 100. The default is 32.
Scale Factor(KB) has an effect on the value displayed in
the Calculated Space(KB) column.

Databases

The space requirements for the databases in the left


pane (import tree).

Query Capture Databases

The space requirements for the QCDs in the left pane


(import tree).

Database Name or
Query Capture Database

The name of the database that will be created during


the import operation.
Note: The column label (Database Name or Query
Capture Database) is determined by whether
Databases or Query Capture Databases is selected.

Calculated Space(KB)

The space required to create the database based on the


number of objects selected in the left pane (import
tree). This amount includes the calculated or
user-specified space of any child databases.
The space requirements for each database are based on
the number of tables and objects selected in the left
pane (import tree) and the space required for creating
child databases.
An approximation of the deficit space, determined by
comparing the calculated space and the available space,
appears in this column.

User Specified Space(KB)

The calculated space for the new database. If entered,


this number overrides the Calculated Space(KB) value.
If a discrepancy is found, a warning appears
recalculated.
If specifying space for a child database, it is considered
when calculating the space required for the parent
database.
Minimum value is 0 KB. Maximum value is
2,097,151 KB.
Right-click in this field for more options. See step 2
and step 3.
Note: Space cannot be specified for an existing
database.

100

Available Space (Existing Databases)


MaxPerm-CurrentPerm(KB)

The available permanent space for the database if it


already exists on the system. Existing databases are
highlighted in blue.

Parent Database

The immediate parent database of the database that


will be created.

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Change Permanent Space

Option

Description

Available or Required Parent Database


Space(KB)

If the parent database does not exist, the projected


space required to create the child databases and any
objects within the parent database.
If the parent database exists, the available space
(MaxPerm - CurrentPerm) for the parent database.

Import Parent Database(KB)

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)

The available space (MaxPerm - CurrentPerm) for the


import parent database.

Space Required(KB)

If Databases is selected, the space required to create the


databases.
If Query Capture Databases is selected, the space
required to create the QCDs.

Note: Selecting stored procedures in the left pane (import tree) does not affect the
permanent space calculation.
2

[Optional] If Databases is selected, right-click in the User Specified Space(KB) column


and choose a command from the shortcut menu.
Command

Description

Check user specified space against


child database(s) space

Determine if the child databases can be accommodated


in the user-specified space. Teradata SET displays a
warning if space cannot be accommodated.

Check and update parent database(s)


space

Determine if the user-specified space for a database


can be accommodated by each parent database. If the
calculated space for the parent database cannot
accommodate the space specified, Teradata SET
attempts to update the parent database space. Teradata
SET displays a message if either the existing parent or
user-specified database space is insufficient.

Clear user specified space

Clear the user-specified space for a database.

[Optional] If Query Capture Databases is selected, right-click in the User Specified


Space(KB) column and choose a command from the shortcut menu.
Command

Description

Check total QCD space against


available Parent space

Determine if there is enough available space in the


parent database to accommodate the creation of the
QCDs.

Teradata System Emulation Tool User Guide

101

Chapter 7: Import Methods and Options


Retry a Failed SQL Statement

Command

Description

Check user specified space against


calculated space for QCD

Check the user-specified space against the calculated


space for a QCD.

Clear user specified space for QCD

Clear the user-specified space for a QCD.

Click Recalculate to recalculate the space for each parent database.


Note: The recalculation is based on the amount in the User Specified Space(KB) column,
the Calculated Space(KB) column of the child databases, and the current scale factor.

Do one of the following:

Click Cancel to ignore changes and close the dialog box.

Click OK to accept the changes and close the dialog box.

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

Retry a Failed SQL Statement


When importing object definitions, errors can occur (such as insufficient privileges or
permanent space). Use the SQL Statement Failed dialog box to retry the failed statement.
Note: This dialog box is available if the Display Failed SQL statement dialog option is selected
in the Options dialog box, regardless of whether the Ignore Teradata Database errors check box
is selected. The dialog box appears when there is an error. See Error-Handling Options on
page 54.

To retry a failed statement


1

102

When the SQL Statement Failed dialog box appears, do one of the following:

Click Abort to automatically abort the import operation.

Enter another SQL statement:


i

Type a statement to grant the necessary privileges or increase the permanent space.

ii

Click Retry.

Click Retry to retry the failed statement if the error has been corrected by other means.

Click Ignore to ignore the error and proceed with the import of the remaining objects.

Click Hide Failed SQL to hide the Failed Statement pane.

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Edit Information Offline

Edit Information Offline


Teradata SET allows multiple versions of the emulation information to be saved in order to
test different scenarios. While offline, the following tasks can be performed to modify the
information and create multiple scenarios:

Open and edit emulation information.

Change import options.

Select objects for import.

Edit import information.

An import cannot be performed without a connection to a Teradata Database.

To modify emulation information offline


Use this procedure to create different versions of the emulation files to test multiple scenarios
from one exported file.
Note: While offline, all functions are available except the database interactive settings, such as
displaying existing databases, browsing on the Parent Database box in the Import Options
dialog box, and browsing on the Target QCD box in the Import Options dialog box.
1

From the main window, click Tools>Customize Data.


The Open dialog box appears and displays a list of available .mcf files.

Select an .mcf file to be the source of the emulation information.

Teradata System Emulation Tool User Guide

103

Chapter 7: Import Methods and Options


Save Changed Information

The right pane displays information about the file, such as source system information, the
exported options, and the export date. To close the right pane, clear the Show Preview
check box.
3

Click Open.

[Optional] Perform one of the following procedures:

To change import options on page 92

To select objects for import on page 96

To edit import information on page 98

[Optional] Save the changes to a new version of the file.


See Save Changed Information on page 104.

[Optional] Connect to a Teradata Database and import the new version to a test system.
See Import to a Test System on page 87.

Save Changed Information


Use the Save As feature to save changes made using the Import window and the Import Options
dialog box. The Save As feature also saves any database name changes and any modifications
made to:

Object definitions

Statistics

RAS

Cost parameters

DBS Control information

Cost profiles

To save changes
1

After making changes, click

The Save As dialog box appears.


2

In the File name box, type a name.


Note: Changes cannot be saved in the original file.

Click Save.
A new .mcf file and corresponding data files are created containing the changes.

104

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Display Existing Databases

Display Existing Databases


To make renaming of a target database easier, use Teradata SET to view a list of existing
databases and identify possible candidates. See Rename a Target Database on page 105.

To display existing databases


From the Import window, click

The Existing Databases dialog box appears and displays a list of existing databases and
database owners.

Rename a Target Database


Use Teradata SET to rename a target database when the database already exists on the test
system and must remain on the test system.
The name change affects:

Statistics

RAS

DDLs of the objects in the database

DDLs of the objects that have dependencies on the renamed object

Use the Replace dialog box to change the database name for all object definitions.

Teradata System Emulation Tool User Guide

105

Chapter 7: Import Methods and Options


Rename a Target Database

To rename a target database


This procedure can be performed offline or while connected to a Teradata Database.
1

Do one of the following:

When connected to a Teradata Database, click

See Connect to a Teradata Database on page 29.

When not connected to a Teradata Database, click

The Open dialog box appears and displays the available .mcf files.
2

Select an .mcf file.

Click Open.

From the Import window, select the target database to rename.

From the toolbar, click

Type a new database name.

Press Enter.

A confirmation message appears.

[Optional] To prevent the message from appearing each time this procedure is performed,
select the Dont ask this question again check box.

[Optional] To keep the original database name in the object definitions, click No.
The status bar displays:
Target database has been changed from old name to new name

The target database name is changed. The object definitions are not renamed. Skip the
remaining steps in this procedure.
10 [Optional] To update the name change in the object definitions, click Yes.

The Replace dialog box appears.

106

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Rename a Target Database
11 Define the search-and-replace operation using the options in the Replace dialog box.

Option

Description

Find what

Search for this database name.

Replace with

Replace the database name listed in the Find what box with
this database name.

Match whole word only

Search for whole words.


This check box is selected by default.

Match case

Search for characters that match the case used in the Find
what box.

Search in all DDLs

Search all object definitions.


This check box is selected by default.

12 Find and replace the database name in the object definitions:


a

Click Find Next to find the next matching instance in the object definitions.

Do one or more of the following:

Click Replace to replace the selected instance in a single object definition.


The import tree in the left pane expands, and the corresponding DDL is selected.

Click Replace All to replace all instances of the database name in a single object
definition.
The total number of replacements appears at the bottom of the Replace dialog box.

Click Replace in all DDLs to replace all instances of the database name in all object
definitions.
The total number of replacements appears at the bottom of the Replace dialog box.

Note: The first time Replace is clicked, the Allow Edit command becomes available on
the Edit menu. When editing is allowed, object definitions, RAS, statistics, cost
parameters, DBS Control information, and cost profiles can be modified in the right
pane of the Import window.

Teradata System Emulation Tool User Guide

107

Chapter 7: Import Methods and Options


Undo Target Database Renaming
13 After all of the intended replacements have been made, click Cancel to close the Replace

dialog box.
14 To commit the name change, click

The status bar displays Changes applied.


Note: All changes must be committed and applied before conducting the import
operation. The changes are applicable only to the next import operation. See Import to a
Test System on page 87.

Undo Target Database Renaming


Use the renaming feature to restore the original name for the target database. For example, if a
renaming was done in error, the original name can be restored.

To reverse the renaming of a database


This procedure can be performed offline or while connected to a Teradata Database.
1

From the Import window, select the database that requires its name to be restored.

Click

A message appears stating that the target database name has been restored and noting that
any changes made to the object definitions must also be undone.
3

[Optional] To keep the new database name in the object definitions:


a

Click No in response to the message in step 2.


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...

Note: The object definitions have not been renamed.


b
4

Skip the remaining steps in this procedure.

[Optional] To reverse the name change in the object definitions:


a

Click Yes in response to the message in step 2.


The Replace dialog box appears. See the procedure To rename a target database on
page 106 for an explanation of the Replace dialog box options.

108

Perform step 9 through step 12 in the procedure To rename a target database on


page 106.

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Reorder Databases

Reorder Databases
After performing an export operation, reorder the databases in the emulation information to
resolve referential integrity dependencies during import.

To reorder databases
This procedure is performed in the Import window and can be performed while offline or
while connected to a Teradata Database.
1

In the left pane of the Import window, select a database to reorder.

Click

In the left pane (import tree), drag the database icons to change their order.

Note: Only database icons can be reordered and only with other database icons at the
same level.
4

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

View Machine Configuration


After performing an export operation review the configuration of a source machine to
estimate the import time.
While preparing emulation information for import, it might be helpful to refer to the
configuration of the target system in order to identify compatible systems.

To view target system configuration information


This procedure requires a connection to a Teradata Database.
1

From the Import window, click

Teradata System Emulation Tool User Guide

109

Chapter 7: Import Methods and Options


View Machine Configuration

The Source Machine Configuration dialog box appears and displays details about the
machine from which the system information was exported.
Figure 10: Source Machine Configuration

Table 10: Source Machine Configuration Description

Row Name

Description

Exported Option

Type of export used (database, query, or 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

Machine Name

Name of the machine from which the system information was exported
Note: For a CLIv2 connection, the system name typed in the hosts file. For
an ODBC connection, the name typed under Teradata Server Info in the
ODBC Driver Setup for Teradata Database dialog box. See Chapter 2:
Connection Methods.

Number of AMPs

Number of 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


Note: A node is a hardware assembly that contains several tightly
coupled CPUs.

Model

110

Model number of the machine

Teradata System Emulation Tool User Guide

Chapter 7: Import Methods and Options


Estimate Import Time

Note: The physical configuration boxes (Number of AMPs, Number of PEs, Number of
Nodes, and Model) are only available if the user has necessary access rights on the target
system. See Export Rights on page 19.
2

[Optional] Click

to start the import.

See Import to a Test System on page 87.

Estimate Import Time


Estimate import time before performing an import operation to optimize system
management.
The Estimate Time function requires privileges. See Estimate-Time Rights on page 22.

To view the estimated import time


This procedure requires a connection to a Teradata Database.
1

From the Import window, click

The Open dialog box appears.


2

Select an .mcf file into which to import information.

Click Open.

Click

The Estimated Time dialog box appears and displays time estimates for each element being
imported along with a total estimated time for the import operation.

Teradata System Emulation Tool User Guide

111

Chapter 7: Import Methods and Options


Estimate Import Time
5

[Optional] Click Refresh to recalculate estimates for the current import.

Click OK to close the Estimated Time dialog box.

[Optional] Click

to start the import operation.

See Import to a Test System on page 87.

112

Teradata System Emulation Tool User Guide

CHAPTER 8

Administrative Functions

Teradata SET includes many administrative functions to facilitate the export and import
of data.
See the following topics to learn about Teradata SET administrative features:

Set TLE Parameters

Perform Query Testing

Perform a File Transfer

Undo Imported Files

Delete Exported Files

View Log Files and Summary Reports

Retry Failed Import Operations

Disconnect and Close Teradata SET

Perform File Management

Set TLE Parameters


Set TLE parameters using the Set Target Level Emulation feature. Specifying RAS, cost
parameters, and cost profiles at various levels for the connected test system allows the creation
of multiple emulation scenarios that cover a wide range of testing possibilities on a single test
system. When the analysis is complete, the test system defaults can be restored using the Reset
Target Level Emulation dialog box. See Reset TLE on page 115.

Set TLE
Use the Set Target Level Emulation dialog box to define RAS, cost parameters, and cost
profiles. The Set Target Level Emulation dialog box can be accessed from either the main
window or from the Import window.
Note: This procedure explains the process of setting IFP and system levels for cost parameter
emulation or cost profile emulation that can only be set by a DBC or SystemFE user. This
limitation does not apply to setting RAS emulation. For more information, refer to SQL
Request and Transaction Processing B035-1142-mmyx.

Teradata System Emulation Tool User Guide

113

Chapter 8: Administrative Functions


Set TLE Parameters

Use the TLE function at any time during export and import operations. The following
scenario is typical:
1

Export emulation information from a target system to a client machine.

Import that emulation information to a test system.

Apply TLE using the Set Target Level Emulation feature in Teradata SET.

Capture query plans using Teradata Visual Explain.

Analyze the query plan.

Reset RAS, cost parameters, and cost profiles on the test system using the Reset feature in
Teradata SET.

To set TLE
Before using Teradata SET to control emulation, turn on the TLE feature for the test system.
Using the DBS Control utility, set the general field 22 (Target Level Emulation) to TRUE. For a
description of the DBS Control utility, refer to Utilities B035-1102-mmyx.
1

From the main window or the Import window, click

The Set Target Level Emulation dialog box appears and displays the available emulation
information on the current system. The Set RAS tab is selected by default.

114

Do one of the following:

Select the desired individual RAS tags.

Click Select All to apply all of the listed RAS tags.

Select one of the following to define the level of the RAS emulation:

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Set TLE Parameters

Session

System

Click the Set Costs tab.

Select individual cost tags.


Note: Only one cost tag can be set for each level.

Click the Set Cost Profile tab.

Select an individual cost profile.


Note: Only one cost profile tag can be set for each level.

Define the level of the cost emulation by selecting one of the following:

Session

IFP

System

When finished making changes, click OK.


Note: If TLE is set from the main window, Teradata SET performs the emulation request
immediately and displays the results in the main window. If TLE is set from the Import
window, Teradata SET performs the emulation request at the end of the import operation.

10 [Optional] View the results in the summary report.

See View a Summary Report on page 129.


11 [Optional] Analyze query plans that are emulated on the test system.

See Perform Query Testing on page 118.


12 [Optional] Reset the original RAS and cost defaults on a test system.

See Reset TLE on page 115.

Reset TLE
Reset the test system TLE back to the system default values after importing RAS, cost
parameters, and cost profiles.

To reset TLE
Before resetting the test system default values, turn on the TLE feature for the test system.
Using the DBS Control utility, set the general field 22 (Target Level Emulation) to TRUE. For a
description of the DBS Control utility, refer to Utilities B035-1102-mmyx.

Teradata System Emulation Tool User Guide

115

Chapter 8: Administrative Functions


Set TLE Parameters

From the main window, click

The Reset Target Level Emulation dialog box appears with the Reset RAS tab selected by
default. Emulation is turned on for the tables shown.

Do one of the following:

Select individual RAS tags to be reset (turn off emulation).


Note: To select more than one level, hold Shift and click with the left mouse button.

Click Select All to reset all of the listed RAS tags.

Note: A sample can be reset at both session and system levels. Drag the scroll box to the
right to see the Level column, which contains the reset level of the samples.
3

[Optional] To reset the cost parameters:


a

Click the Reset Costs tab to display the cost parameters currently in effect at the
request (if set), session, IFP, and system levels.

Select one or more cost tags to reset.


Note: To select more than one cost tag, hold Shift and click with the left mouse
button.

116

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Set TLE Parameters

[Optional] To reset cost profiles:


a

Click the Reset Cost Profile tab to display the cost profiles currently in effect at the
session, IFP, and system levels.

Select one or more cost profiles to reset.

Teradata System Emulation Tool User Guide

117

Chapter 8: Administrative Functions


Perform Query Testing

Note: To select more than one cost profile, hold Shift and click with the left mouse
button.
c
5

When finished making changes, click OK.

Check the main window for verification that the reset was successful or for diagnostic
information explaining why the reset was unsuccessful.

Perform Query Testing


Use Teradata SET to execute SQL statements, using either Teradata SQL Assistant or the
Execute SQL main window, to test queries before using them.

To set the query tool interface


1

From the main window, click Tools>Options.


The Options dialog box appears with the Customize tab selected by default.

Do one of the following:

Select the Use SQL Assistant rather than the Execute SQL window with ODBC
connectivity check box to use Teradata SQL Assistant instead of Execute SQL as the
query editor when connected to Teradata Database with ODBC connectivity.

Clear the Use SQL Assistant rather than the Execute SQL window check box to use the
Execute SQL window.

Note: When using a CLIv2 connection, Execute SQL is used regardless of how this option
is set.
3

Click Apply.

Click OK to close the Options dialog box.

To test a query
1

From the main window, click

Depending on how the query tool interface is set up and the connection mode, either
Teradata SQL Assistant or the Execute SQL main window opens. See the procedure To set
the query tool interface on page 118.
2

[Optional] If using Teradata SQL Assistant, refer to Teradata SQL Assistant for Microsoft
Windows User Guide B035-2430-mmyx.

[Optional] If using the Execute SQL main window, do one of the following:

Test a new query. Go to step 4.

Test an existing query. Go to step 5.

[Optional] Test a new query:


a

118

Do one of the following:


Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Perform Query Testing

Type the query to be tested in the Untitled window, which then becomes the Query
window.

If queries exist in the History window, click the cell under the Query column to
select one.
The query appears in the Query window.

Click

The results appear in the status bar at the bottom of the window.
5

[Optional] Test an existing query:


a

Click

A Windows Explorer window opens.


b

Navigate to the query to be tested.

Click Open.
The query appears in the Query window.

Remove heading information so just the query text exists.

Click

The results appear in the status bar at the bottom of the window.

Input USING Values


When a query containing the USING clause is submitted in the execute SQL window, the Input
using values screen displays.See Figure 11 on page 120.

Teradata System Emulation Tool User Guide

119

Chapter 8: Administrative Functions


Perform a File Transfer
Figure 11: Input USING Values

The Using Query display box shows the query containing the USING clause.

The Using Variables display box shows the values for the Name and Datatype variables.

For the Value variable, enter the data values in the Value column.

Click OK or Cancel:

Click OK to pass the variable data to the query during execution.

Click Cancel to prevent passing variable data to the query.

Perform a File Transfer


Use the Pack feature to simplify file transfer; for example, to send exported files to another
location. The Pack feature combines all of the files associated with an export into a single file
that can be sent in email or transferred to an ftp site. Then, use the Unpack feature to separate
the files after they have been packed.

120

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Perform a File Transfer

Note: All .pack files contain non-ASCII characters, so use binary mode when transferring
them using ftp.

To pack files
1

From the main window, click

The Pack dialog box appears.

Select the .mcf file to pack.


The preview pane on the right displays information about the file such as source system
information. To remove the preview pane, clear the Show Preview check box. The Undo
Files box displays any .undo files associated with the selection.

[Optional] To include an .undo file, select the file.

Click Pack.
The files associated with the selected .mcf file are combined into one file with a .pack
extension. UDF code files specified in response to the Browse for UDF File Open Dialog
during the Export operation are also included in the .pack file.

[Optional] Unpack the file.


See the procedure To unpack files on page 122.

Teradata System Emulation Tool User Guide

121

Chapter 8: Administrative Functions


Undo Imported Files

To unpack files
A pack file must be created in order to use this procedure. See the procedure To pack files on
page 121.
1

From the main window, click

The Unpack dialog box appears and displays all available .pack files.

Select the .pack file to unpack.


The preview pane on the right displays information about the file such as source system
information. To close the preview pane, clear the Show Preview check box.

Click Unpack.

Undo Imported Files


After the query plan is analyzed, use the Teradata SET Undo Import feature to undo (cleanup)
the imported information that is no longer needed.
Every import creates a corresponding .undo file, which is used to keep the test system
uncluttered. Multiple types of information can be removed from a single .undo file, but only
one undo import operation is performed 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.

122

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Undo Imported Files

To undo an import
1

Connect to the same system used to create the .undo file.


See Connect to a Teradata Database on page 29.

From the main window, click

The Open dialog box appears and displays the available .mcf files.

Select an .mcf file that has an associated .undo file.


The Undo Files box displays the .undo files associated with the selection. Open is available
only if an .undo file exists.
The preview pane on the right displays information about the file such as source system
information. To close the preview pane, clear the Show Preview check box.

Select an .undo file.

Click Open.

Teradata System Emulation Tool User Guide

123

Chapter 8: Administrative Functions


Undo Imported Files

The Undo Import File dialog box appears and displays the .undo file name in the title bar.
The .undo file is created during the import process and named using the following format:
file name.current timestamp.undo.

Under Undo Import Options, select the check boxes for the information to undo (clean up)
in the database.

Click Error Handling to change how errors are handled during the undo-import (cleanup)
operation.
See Error-Handling Options on page 54.

Click Undo Import.


The selected .undo file undoes the import, and the Undo Import File dialog box is closed.
Note: If the undo-import (cleanup) operation is only partially successful, an error
message appears. If this occurs, open the log file for the operation to diagnose the
problem. See View a Log File on page 127.

View a summary report for the results.


See View a Summary Report on page 129.

124

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Delete Exported Files

Delete Exported Files


After performing a query plan analysis, use the Delete Files feature to delete individual export
files that are no longer needed.
Depending on the export options selected, a number of files are created when emulation
information is exported from a target system to a test system. The Delete Files feature reads
the .mcf file and, depending on the export options chosen, removes the corresponding files:

.ddl

.col

.dem

.log

.opt

.pack

.qcd

.ras

.rpt

.sql

.undo

.mcf

Note: If necessary, the deleted files can be restored from the Recycle Bin. The files are
automatically restored to the appropriate directory.

To delete files
1

From the main window, click

The Delete Files dialog box appears and displays the available .mcf files.
2

Select the .mcf file to delete.


The preview pane on the right displays information about the file such as source system
information. To close the preview pane, clear the Show Preview check box.
Note: Only .mcf files appear in the list. However, deleting the .mcf file deletes all associated
files, with the exception of the .pack file. To delete the .pack file, go to step 3.
UDF code files specified in response to the Browse for UDF File Open Dialog during the
Export operation are also deleted.

Teradata System Emulation Tool User Guide

125

Chapter 8: Administrative Functions


View Log Files and Summary Reports
3

[Optional] To remove the .pack file during the delete operation, select the Delete Pack File
check box.

Click Delete.
A confirmation message appears.

Click Yes to remove the files.

Note: During the Unpack and Delete File Operation, the user is prompted to confirm
overwriting or deletion of the UDF code files. The UDF files are also displayed with the
normal TSET files, such as .mcf, .log, .ddl, etcetera.

View Log Files and Summary Reports


To troubleshoot an export, import, or undo-import (cleanup) operation, use the log file to
view the events in the current Teradata SET session and find the required information. View
the summary report for a summary of the failed and successful operations.

126

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


View Log Files and Summary Reports

View a Log File


Review the log file to see the actions taken during the current Teradata SET session.

To view the log file for the current Teradata SET session
1

From the main window, click

The Open dialog box appears and displays the available log file. The File name box displays
the name of the most recently used log file, by default.

Select a log file for review.

Teradata System Emulation Tool User Guide

127

Chapter 8: Administrative Functions


View Log Files and Summary Reports
3

Click Open.
The log appears in the main window.

128

To close the log file, click

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


View Log Files and Summary Reports

View a Summary Report


View the summary report for a summary of the failed and successful import, export, or
undo-import (cleanup) operations. Reports are stored in the text-file format with the
extension .rpt.
Note: To restrict the summary report to logging only failed operations, change the error
handling options. See Error-Handling Options on page 54.

To view a summary report


1

Perform an import, export, or undo-import (cleanup) operation.

Click

The Open dialog box appears.

Select the corresponding .rpt file.

Teradata System Emulation Tool User Guide

129

Chapter 8: Administrative Functions


Retry Failed Import Operations
4

Click Open.
The report appears and displays a summary of the corresponding operation.

To close the report, click

For detailed information about the operation, view the log file.

See View a Log File on page 127.

Retry Failed Import Operations


When importing object definitions, certain errors such as insufficient privileges or permanent
space can occur. Use the SQL Statement Failed dialog box to retry the failed statement.
This dialog box appears only if the Display Failed SQL Statement dialog check box is selected
on the Options dialog box, regardless of the state of the Ignore Teradata Database errors check
box. See Error-Handling Options on page 54.

130

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Manage Missing Access Privilege Errors

To retry a failed import operation


1

When the SQL Statement Failed dialog box appears, do one of the following:

Click Abort to automatically abort the import operation.

Grant the required rights before retrying:


i

Enter another SQL statement to grant the necessary privileges or increase the
permanent space.

ii

Click Retry.

Click Retry to retry the failed statement if the error has been corrected by other means.

Click Ignore to ignore the error and proceed with the import of the remaining objects.

Click Hide Failed SQL to close the Failed Statement pane.

Manage Missing Access Privilege Errors


TSET export, import, and undo operations might be unsuccessful if the logged-on user has
insufficient access privileges. Use the Grant access privilege dialog box to manage a
missing-access-privilege error. (See also Error-Handling Options on page 54 for more
information about the Options dialog box.)
Note: When the Submit grant statement from administrators session check box is selected in
step 4, the check-box setting and the database session selected in step 4 apply the next time the
Grant access privilege dialog box appears.

To retry the failed statement


Use this procedure only if the logged-on user has permission to grant privileges or a System
Administrator is present to grant privileges. (To ignore missing access privileges, see To
ignore missing access privileges on page 132.)
1

When the Grant access privilege dialog box appears, displaying the
missing-access-privilege information, click Failed Statement to view the SQL causing the
error.

Click Retry to retry the failed statement when the required access privileges have been
granted using a application other than Teradata SET.

[Optional] In the Grant Statement box, enter the grant statement with the missing access
privileges.
Note: If the Grant Statement box is left empty, Teradata SET automatically generates the
grant statement with the required access privileges.
Select the Grant missing access rights without prompting check box to grant further
missing privileges without prompting the Grant access privilege dialog box.

Select the Submit grant statement from administrators session check box.

Teradata System Emulation Tool User Guide

131

Chapter 8: Administrative Functions


Manage Missing Access Privilege Errors

A dialog box appears, allowing entry of logon information. Which dialog box appears
depends on the connectivity type in use.
5

Enter logon information:

For ODBC connectivity, enter logon information in the Select a Data Source dialog
box.

For CLI connectivity, enter logon information in the Connect to Teradata Database
dialog box.

Note: The user ID entered must have the right to grant access privileges.
6

Click OK.

Click Grant to grant the missing access privilege.

To ignore missing access privileges


The access privilege error can be ignored or the current operation can be aborted instead of
granting the access privilege. (To grant access privileges, see To retry the failed statement on
page 131.)
When the Grant access privilege dialog box appears, displaying the missing access

privilege information, click one of the following:

132

Ignore, to ignore the missing-access-privilege error

Ignore All, to ignore all future missing-access-privilege errors

Teradata System Emulation Tool User Guide

Chapter 8: Administrative Functions


Disconnect and Close Teradata SET

Abort, to abort the current operation

Disconnect and Close Teradata SET


Disconnect from the current database before connecting to a different database. Close
Teradata SET to end the session and disconnect from the current database.

Disconnect from a Teradata Database


Use this procedure to terminate the connection to a Teradata Database. After disconnecting,
connect to a different database or close Teradata SET.

To disconnect from a Teradata Database


1

From the main window, click

A confirmation message appears.


2

Click Yes to close the message and return to the main window.

[Optional] Connect to another database.


See Connect to a Teradata Database on page 29.

[Optional] Close Teradata SET.


See Close Teradata SET on page 133.

Close Teradata SET


Use this procedure to disconnect Teradata SET from the current database and close the
application.

To close Teradata SET


1

From the main window, click File>Exit.


If connected to a database or if the Import window is open, a confirmation message
appears.

Click Yes to close Teradata SET.

Perform File Management


Teradata SET captures emulation information in a variety of file types, as described in
Table 11. All of the files created during export, import, and pack operations are saved in the
file and directory specified under Export to in the Export from Teradata Database dialog box.
All exported parameters are stored in a control (.mcf) file that:

Teradata System Emulation Tool User Guide

133

Chapter 8: Administrative Functions


View Low Level Error Log

Tracks elements (such as the object definition) that are selected and exported

Contains pointers to the raw data files that are created during the export process

Contains a version number, release number, and the date and time the system information
was exported from the target data source

Table 11: 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

RAS

.ras

Export

SQL statements

.sql

Export

Statistics

.col

Export

Summary reports

.rpt

Export
Import
Undo (cleanup)

View Low Level Error Log


Teradata SET logs low level information useful for GSC in the TSET.LOG file located in
following directory.
Drive:\Documents and Settings\user\My Documents\Teradata\DBM Logs\

134

Teradata System Emulation Tool User Guide

Glossary

A
Access Module Processor See AMP.
administrator

A special user responsible for allocating resources to a community of users.

AMP Access Module Processor. A virtual processor that receives steps from a PE and
performs database functions to retrieve or update data. Each AMP is associated with one
virtual disk, where the data is stored. An AMP manages only its own virtual disk and not the
virtual disk of any other AMP.

C
Call-Level Interface, Version 2

See CLIv2.

CLIv2 Call-Level Interface, Version 2. A programming interface designed to support SQL


access to databases from shrink-wrapped application programs. SQL/CLI provides an
international-standard, implementation-independent CLI to access SQL databases. Clientserver tools can easily access databases through dynamic link libraries. CLI supports 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. See also database, field, row, and
table.
cost

The outlay of database resources used by a given query.

D
database A related set of tables that share a common space allocation and owner. A
collection of objects that provide a logical grouping for information. The objects include
tables, views, macros, triggers, and stored procedures. See also column, field, row, and table.
Database System

See DBS.

data definition The statements and facilities that manipulate database structures and the
Data Dictionary information kept about these structures. These statements include CREATE,
DROP, ALTER, and MODIFY.
Data Definition Language See DDL.
Data Dictionary In Teradata Database, the information automatically maintained about all
tables, views, macros, databases, and users known to the Teradata Database system. Includes
information about ownership, space allocation, accounting, and access-right relationships

Teradata System Emulation Tool User Guide

135

Glossary

between those objects. Data Dictionary information is updated automatically during the
processing of Teradata SQL data-definition statements. The parser uses the Data Dictionary to
obtain information needed to process all Teradata SQL statements.
data manipulation language See DML.
DBS

Database System

DBS Control information A group of fields used by Teradata Database for debugging and
diagnostic purposes, establishing known global system values, and conducting performance
tuning.
DDL Data Definition Language. In Teradata SQL, the statements and facilities that
manipulate database structures (such as CREATE, MODIFY, DROP, GRANT, REVOKE, and
GIVE) and the dictionary information kept about those structures. In the typical,
prerelational data management system, data definition and data manipulation facilities are
separated. The data definition facilities are less flexible and more difficult to use than in a
relational system.
DML data manipulation language. In Teradata SQL, the statements and facilities that
manipulate or change the information content of the database. These statements include
INSERT, UPDATE, and DELETE.
domain name A group of computers whose host names (the unique name by which a
computer is known on a network) share a common suffix, which is the domain name.

E
export Refers to extracting or transferring system information from the tables and views of
a given Teradata Database and saving that information so it can be manipulated or pulled into
another system.

F
field The basic unit of information stored in a Teradata Database. A field is either null or has
a single numeric or string value. See also column, database, row, and table.

G
Globally Distributed Object A data structure that is shared by all of the virtual processors
in the Teradata Database system configuration.

I
import The process of pulling system information into a program. To add system
information from an external source to another system. The system receiving the data must
support the internal format or structure of the data.

136

Teradata System Emulation Tool User Guide

Glossary

J
join A select operation that combines information from two or more tables to produce a
result.

L
log A file that records events. Many programs produce log files, which can be reviewed to
determine what is causing a problem. Log files use the file extension .log.

M
macro A set of Teradata SQL statements stored by Teradata Database and executed by a
single EXECUTE statement. Each macro execution is implicitly treated as a transaction.
multi-threading An option in Teradata SET used to speed up export and import operations
with multiple connections.

N
name A user-supplied word that refers to an object such as a column, database, macro,
table, user, or view.
null

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, macros, triggers, join indexes,
and stored procedures in a database.
ODBC Open Database Connectivity. Under ODBC, drivers are used to connect applications
with databases. The ODBC driver processes ODBC calls from an application, but passes SQL
requests to Teradata Database for processing.
Open Database Connectivity See ODBC.

P
parameter A variable name in a macro for which an argument value is substituted when the
macro is executed.
Parent Database box The Parent Database box specifies the owner for any databases or
users created during an import operation. Permanent storage space is taken from the owning
database or user for the new database or user. The Parent Database box corresponds to the

Teradata System Emulation Tool User Guide

137

Glossary

FROM database_name clause in the CREATE DATABASE and CREATE USER SQL
statements. This box establishes a relationship in the hierarchy of ownership.
parser A program executing in a PE that translates user-entered Teradata SQL statements
into the steps that accomplish the users intentions.
Parsing Engine

See PE.

PE Parsing Engine. 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
that user against a table, database, user, macro, or view.
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
QCD Query Capture Database. A database of relational tables that store the steps of any
query plan captured by the QCF.
QCF Query Capture Facility. Provides a method to capture and store the steps from any
query plan in a set of predefined relational tables called the QCD.
query

A Teradata SQL statement, such as a SELECT statement.

Query Capture Database See QCD.


Query Capture Facility

See QCF.

R
random AMP sample See RAS.
RAS random AMP sample. An arbitrary sample from an AMP. These are samples of the
tables in a query or all of the tables in a given database. See also AMP.
Relational Database Management System

See RDBMS.

RDBMS Relational Database Management System. A database management system in


which complex data structures are represented as simple, two-dimensional tables consisting of
columns and rows.
request
result

In host software, a message sent from an application program to Teradata Database.


The information returned to the user to satisfy a request made of 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. See also column, database,
field, and table.

138

Teradata System Emulation Tool User Guide

Glossary

S
session In client software, a logical connection between an application program on a host
and Teradata Database. Starting a session permits the application program to send one request
at a time to, and receive one response at a time from, Teradata Database.
SET

System Emulation Tool.

Single Sign On Allows users of Teradata Database on Windows 2000 systems to access the
Teradata Database based on their authorized network user names and passwords. This feature
simplifies the procedure requiring users to enter an additional user name and password when
logging on to Teradata Database using client applications.
SQL Structured Query Language. Pronounced as separate letters, S Q L. SQL is a
standardized query language for requesting information from a database. SQL consists of a set
of facilities for defining, manipulating, and controlling data in a relational database.
statement A request for processing by Teradata Database that consists of a keyword verb,
optional phrases, and operands. It is processed as a single entity.
statistics The details of the processes used to collect, analyze, and transform the database
objects used by a given query.
stored procedure Combinations of procedural and nonprocedural statements run using a
single call statement.
Structured Query Language
System Emulation Tool

See SQL.

See SET.

T
table A two-dimensional structure made up of one or more columns with zero or more
rows that consist of fields of related information. See also column, database, field, and row.
target system A Teradata Database from which Optimizer-specific information is exported
for modeling on a second, test system. Also known as a production system.
Target Level Emulation

See TLE.

test system A Teradata Database into which Optimizer-specific information is imported to


emulate a target system and create new queries or test new features.
TLE Target Level Emulation. Permits emulation of 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.
trigger One or more Teradata SQL statements associated with a table and executed when
specified conditions are met.

Teradata System Emulation Tool User Guide

139

Glossary

U
UDT User-Defined Type. A data type defined by someone other than Teradata. UDTs come
in two variations: distinct and structured.
user A database associated with a person who uses a Teradata Database. The database stores
the persons private information and accesses other Teradata Databases.
User-Defined Type

See UDT.

V
view An alternate way of organizing and presenting information in Teradata Database. A
view, like a table, has rows and columns. However, the rows and columns of a view are not
directly stored by Teradata Database. They are derived from the rows and columns of tables
(or other views) whenever the view is referenced.

X
X views An option in Teradata SET to set a restricted view of plans in the QCD information.
See Customization Options on page 49.

140

Teradata System Emulation Tool User Guide

Index

Symbols
.col file
deleting 34, 125
saving 134
.ddl file
deleting 34, 125
saving 134
.dem file
deleting 34, 125
saving 134
.log file
saving 134
.mcf file
deleting 34, 125
packing 120
saving 134
undoing imported files 123
.opt file
deleting 34, 125
saving 134
.pack file
creating 120
deleting with .mcf file 126
saving 134
.qcd file
deleting 34, 125
saving 134
.ras file
deleting 34, 125
saving 134
.rpt file
saving 134
.sql file
saving 134
.undo file
deleting 34, 125
saving 134

A
About Teradata System Emulation Tool dialog box 35
About Teradata System Emulation Tool menu command 35
Account String box 31
acronym 135
Allow Edit menu command 37
AMPs
viewing number of 110

Teradata System Emulation Tool User Guide

Apply Changes menu command 38


architecture
Teradata SET 17
audible notification
changing default setting 50
Audible Notification icon
main window 35

B
benefits of Teradata SET 15
Browse for Folder dialog box 54

C
Capture Current Cost Profile export option 77
Capture Current Costs export option 76
Capture Current Demographics export option 79
Capture from AMPs export option 84
Capture from QCD Database export option 79
Capture from Source export option
cost parameter 76
cost profile 77
RAS 83
Change PermSpace dialog box 99
Change PermSpace menu command 39
changing
audible notification default 50
displaying logon dialog box at startup 50
error handling options 54
Execute SQL default 51
font color 34, 38
font size 34, 38
font style 34, 38
log file default 50
log SQL statement default 50
multi-threading default 51
permanent space 98
RAS byte order 97
SQL Assistant default 51
using X views 50, 51
cleanup See undo import
CLIv2
choosing connectivity type 53
connecting to Teradata Database 29
connectivity 19
defining IP address 27
editing hosts file 27

141

Index

required version 19
setting up a connection 27
command line
exporting by database 44
exporting by query 45
exporting by workload 45
importing 46
log on 43
switches 41
syntax examples 43
undo (clean up) 47
compatibility
CLIv2 19
ODBC driver 19
configuration
viewing source machine 109
Connect menu command 33
Connect to Teradata Database dialog box 30
connection status 35
connectivity
choosing connectivity type 53
CLIv2 27, 29
CLIv2 required version 19
ODBC driver 25, 29
ODBC driver version 19
control file 133
control information file extension 134
Copy menu command 37
copyright statement 36
cost parameter
default import location 88
defining for export 74
export option 74
import location 88
privileges for exporting 20
privileges for importing 21
privileges for undoing an import 22
resetting for TLE 115
saving modifications 104
cost parameters
file extension 134
Cost Parameters check box 74
Cost Parameters option
Import Options dialog box 94
Cost Parameters, DBS Control, and Cost Profile records
check box 57
cost profile
default import location 88
defining for export 76
export option 76
importing 88
privileges for exporting 21
privileges for importing 22
privileges for undoing an import 23

142

saving modifications 104


Cost Profiles check box 76
Cost Profiles option
Import Options dialog box 94
cost tags
setting for TLE 115
Create log file check box 50
Current Version box 93
Current Version option
Import Options dialog box 93
Customize Data menu command 34
Customize tab 50
Cut menu command 37

D
data demographics See demographics
data dictionary
statistics default import location 88
data source
defining 25
selecting 29
database
renaming 105
reordering 109
reversing the renaming 108
saving name change 104
DBS Control information
saving modifications 104
DBS Control utility
setting TLE 114
Default Database box 61
default setting
audible notification 50
displaying logon dialog at startup 50
error handling 54
Execute SQL 51
import location for cost parameter 88
log file creation 50
multi-threading 51
SQL Assistant 51
SQL statement log 50
Define Data Source menu command 35
Delete dialog box 34
Delete Files dialog box 125
Delete Files menu command 34
Delete Pack File check box 126
deleting
.pack file with .mcf file 126
exported file 125
file recovery after 125
demographics
default import location 88
export option 78

Teradata System Emulation Tool User Guide

Index

file extension 134


import location 88
privileges for exporting 21
privileges for importing 22
privileges for undoing an import 23
Demographics check box
exporting by query 74
selecting export options 78
Demographics option
Import Options dialog box 94
DIAGNOSTIC SET COST statement
exporting cost parameters 76
exporting cost profile 78
Disconnect menu command 33
Display Failed SQL statement dialog check box 56
Display logon dialog at startup check box 50
Display Object exists dialog check box 56
driver
ODBC connectivity 19
ODBC setup 25

E
Edit menu
Allow Edit command 37
Apply Changes command 38
Copy command 37
Cut command 37
Find command 37
Import window 37
Paste command 37
Replace command 37
Select All command 37
Undo command 37
edit mode
Edit menu commands 37
turning on 37
editing
renaming a database 105
reordering databases 109
emulation-process overview 17
error handling
default options 54
retrying failed import operation 102, 130
Error Handling button 124
Estimate Time button
exporting by database 71
exporting by query 61
exporting by workload 73
Estimate Time function
privileges 22
Estimate Time menu command 38
Estimated Time dialog box
displaying 38

Teradata System Emulation Tool User Guide

estimating import time 111


recalculating import time 112
Refresh button 38, 86
viewing estimated time 86
Execute SQL
menu command 35
testing a query 118
Execute SQL window
changing default setting 51
setting to use 51
executing a query 118
execution plan
capturing when a query is loaded from a file 74
capturing when entering a query manually 74
capturing when query text is retrieved from a QCD 64
default import location 88
file extension 134
import location 88
options 80
privileges for exporting 20
privileges for importing 21
privileges for undoing an import 22
Execution Plans check box
selecting export options 80
selecting when entering a query manually 74
selecting when loading a query from a file 74
selecting when query text is retrieved from a QCD 64
Execution Plans option
Import Options dialog box 93
Existing Databases dialog box 38, 105
Existing Databases menu command 38
Exit menu command 33, 37
Export By Database dialog box 68
Export By Query dialog box 60
Export By Workload dialog box 72
Export Cost Parameters dialog box
Capture Current Cost Profile option 77
Capture Current Costs option 76
Capture from Source option 76
selecting rows 75
Set Cost Profile option 78
Set Costs option 76
Export Cost Profiles dialog box
Capture from Source option 77
selecting rows 77
Export Demographics
Capture Current Demographics option 79
Capture from QCD Database option 79
Export Demographics dialog box 79
Export from Teradata Database dialog box
exporting by database 68
exporting by query 60
exporting by workload 71
Export menu command 34

143

Index

export option
defining 73
demographics 78
during export by query 62, 63, 66
execution plans 80
exporting by database 70
exporting by workload 73
find objects 69
options for capturing during export by query 64
Export Options dialog box 74
Export Random AMP Samples (RAS) dialog box
Capture from AMPs option 84
Capture from Source option 83
selecting tables 82
Set Samples option 84
exporting
choosing options 73
defining cost parameters for 74
defining cost profiles for 76
demographics 78
estimating time 85
execution plans 80
from the command line 44
menu command 34
object definition 81
privileges 19
QCD data 81
RAS 82
statistics 85
workloads 85
exporting by database
estimating time 71, 73
export options 70
find objects 69
from the command line 44
how to 68
exporting by query
entering manually 62
estimating time 61
from the command line 45
how to 59
loading a query from a DBL 64
loading existing query 62, 63
exporting by workload
from the command line 45
how to 71

F
file
deleting exported 125
file extension 133
file management
deleting exported files 125

144

file extension 133


packing files 120
File menu
Import window
Exit command 37
Import command 36
Save As command 36
main window
Connect command 33
Disconnect command 33
Exit command 33
file type 133
Find dialog box 37
Find menu command 37
find objects 69
font
changing color 34, 38
changing size 34, 38
changing style 34, 38
menu command 34
Font dialog box 34, 38
Font menu command 34, 38

G
Grant access privilege dialog box 131

H
Help
online 23
Help menu
About Teradata System Emulation Tool command 35
Help Topics command 35
main window 35, 39
Help Topics menu command 35
hosts file
editing 27

I
IFP level 113
Ignore Teradata Database errors check box
error-handling options 55
retry failed import 130
retry failed SQL statement 102
import
menu command 34
retrying failed import operation 130
Import menu command 34, 36
Import Options dialog box
changing import options 92
Cost Parameters option 94
Cost Profiles option 94
Current Version option 93

Teradata System Emulation Tool User Guide

Index

Demographics option 94
Execution Plans option 93
Import Options 93
Import window 38
Miscellaneous Options 94
Object Definitions option 93
Only synchronize version of created tables option 94
Parent Database Info 92
Parent Database option 92
QCD Data option 93
QCD Selection 93
Random AMP Samples option 93
Source Version option 93
Statistics option 94
Target QCD option 93
Workloads option 94
Import Options menu command 38
Import Options option
Import Options dialog box 95
import tree
reordering databases 38
saving changes to selection in 36
Import window
Edit menu 37
File menu 36
opening 36
Options menu 38
View menu 38
importing
cost parameter 88
cost profile 88
default import locations 88
demographics 88
execution plan 88
from the command line 46
full import 89
how to 89
import options 92
object definition 88
partial import example 96
performing partial import 95
privileges 21
RAS 88
reordering databases 109
retrying failed import operation 102
statistics 88
workload data 88
input command file
from the command line 47
Input USING values 119
INSERT EXPLAIN 74
installation 19
interface
CLIv2 connectivity 19

Teradata System Emulation Tool User Guide

CLIv2 setup 27
ODBC connectivity 19
IP address
defining for CLIv2 27

L
loading a query from a DBL 64
loading existing queries 62, 63
log file
changing default setting 50
file extension 134
menu command 34
viewing 127
Log File menu command 34
Log only failures in Summary Report check box 55
Log SQL statements check box 50
logging on
changing default setting 50
from the command line 43

M
machine configuration
privileges for exporting 20
viewing 109
macro
deleting exported files 125
required privileges 20
main window
changing font 34
File menu 33
functions and features 33
Help menu 35, 39
navigating 33
opening Teradata SET 28
toolbar 33
Tools menu 34
View menu 34
mark as QCD 70
menu
Import window 36
main window 33
menu command
Import window
Allow Edit 37
Apply Changes 38
Change PermSpace 39
Copy 37
Cut 37
Estimate Time 38
Existing Databases 38
Exit 37
Find 37
Font 38

145

Index

Import 36
Import Options 38
Order Database 38
Paste 37
Replace 37
Save As 36
Select All 37
Set TLE 38
Source Machine Configuration 38
Status Bar 38
Tool Bar 38
Undo 37
main window
About Teradata System Emulation Tool 35
Connect 33
Customize Data 34
Define Data Source 35
Delete Files 34
Disconnect 33
Execute SQL 35
Exit 33
Export 34
Font 34
Help Topics 35
Import 34
Log File 34
Options 35
Pack 34
Reset TLE 34
Set TLE 34
Status Bar 34
Summary Report 34
Toolbar 34
Undo Import 34
Unpack 34
Miscellaneous Options
Import Options dialog box 94
multi-threading
changing default setting 51

N
navigation
main window 33
nodes
viewing number of 110
number of
AMPs 110
nodes 110
PEs 110

O
object definition
default import location 88

146

export option 81
file extension 134
finding and replacing a database name 106
finding and replacing text 106
import location 88
privileges for exporting 20
privileges for importing 21
privileges for undoing an import 22
reversing the renaming 108
Object Definitions check box 81
Object Definitions option
Import Options dialog box 93
ODBC
connecting with 29
driver connectivity 19
driver setup 25
required driver version 19
selecting a data source 29
setting connectivity 53
using Data Source Administrator 25
ODBC Data Source Administrator dialog box 25
ODBC Database Administrator dialog box 35
ODBC Driver Setup for Teradata Database dialog box 26
online Help
using 23
Only synchronize version of created tables option
Import Options dialog box 94
Open dialog box
importing to a test system 89
loading existing query from a file 62
undoing an import 123
viewing log file 127
opening Teradata SET main window 28
Opt_DBSCtl_Table
default import location for cost parameter 88
Optimizer 16
Option box 57
options
changing import options 92
Options dialog box
Cost Parameters, DBS Control, and Cost Profile records
check box 57
Create log file check box 50
Display Failed SQL statement dialog check box 56
Display logon dialog at startup check box 50
Display Object exists dialog check box 56
displaying 35
Ignore Teradata Database errors check box 55
Log SQL statements check box 50
main window 30
Option box 57
Prompt to create non-existing QCDs check box 57
Provide Audible Notification check box 50
Random AMP Samples check box 57

Teradata System Emulation Tool User Guide

Index

selecting query tool 118


setting session defaults 50
Use Multi-Threading check box 51
Use SQL Assistant instead of the Execute SQL window
check box 51, 55
Use X views (DBC and QCD) check box 51
Use X views (QCD only) check box 50
Workloads check box 57
Options menu
Change PermSpace command 39
Existing Databases command 38
Import Options command 38
Import window 38
Order Database command 38
Set TLE command 38
Options menu command 35
Order Database menu command 38
overview of Teradata SET 17

P
Pack dialog box 34, 121
pack file
creating 120
saving 134
Pack menu command 34
Parent Database box
definition 137
selecting an imported database 94
using 94
Parent Database Info
Import Options dialog box 92
Parent Database option
Import Options dialog box 92
partial import
example 96
performing 95
Paste menu command 37
Path box 54
permanent space
changing 98
stored procedure 101
permission See privileges
permspace See permanent space
PEs
viewing number of 110
physical configuration 109
preview pane
closing 104
deleting exported files 125
displaying .mcf file information 89
packing export files 121
undoing imported files 123
unpacking export files 122

Teradata System Emulation Tool User Guide

privileges
Estimate Time function 22
export requirements 19
exporting
cost parameter 20
cost profile 21
demographics 21
execution plan 20
machine configuration 20
macro 20
object definition 20
QCD data 21
statistics 20
SystemFE.Opt_Cost_Table 20
SystemFE.Opt_RAS_Table 20
workload 21
import requirements 21
importing
cost parameter 21
cost profile 22
demographics 22
execution plan 21
object definition 21
QCD data 22
RAS 21
statistics 22
SystemFE.Opt_Cost_Table 21
SystemFE.Opt_DBSCtl_Table 21
SystemFE.Opt_RAS_Table 21
workload 22
SystemFE.Opt_DBSCtl_Table 20
undo import
cost parameter 22
cost profile 23
demographics 23
execution plan 22
object definition 22
QCD data 23
RAS 22
statistics 22
workload 23
undo import (cleanup) requirements 22
User-Defined Type 20
product version numbers 3, 19
Prompt to create non-existing QCDs check box 57
Provide Audible Notification check box 50
purpose of Teradata SET 15

Q
QCD
mark as 70
QCD data
export option 81

147

Index

privileges for exporting 21


privileges for importing 22
privileges for undoing an import 23
QCD Data check box 81
QCD Data option
Import Options dialog box 93
QCD Database box 72
QCD Name box 61, 74
QCD Selection
Import Options dialog box 93
Queries
Specific Plans 66
query
changing default setting 51
entering manually 62
executing 118
exporting 59
testing 118
Query box 62
Query Capture Database dialog box 63

R
random AMP sample See RAS
Random AMP Samples check box 57, 82
Random AMP Samples option
Import Options dialog box 93
RAS
Capture from AMPs export option 84
Capture from Source export option 83
changing RAS byte order 97
default import location 88
export option 82
file extension 134
importing 88
privileges for importing 21
privileges for undoing an import 22
resetting defaults for TLE 115
saving modifications 104
Set Samples export option 84
setting RAS tags for TLE 114
SystemFE.Opt_RAS_Table 88
RAS tag box 82
RAS tags
setting for TLE 114
recording SQL statement 50
recovering deleted files 125
Refresh button
recalculating import time 112
updating time estimate 38, 86
renaming a database 105
reordering databases
how to 109
Replace dialog box 106

148

Replace menu command 37


required privileges See privileges
Reset Cost Profile tab 117
Reset Costs tab 116
Reset RAS tab 116
Reset Target Level Emulation dialog box 34, 116
Reset TLE menu command 34
resetting TLE 115
restricted views, creating 51
Retry button 102, 131
retrying failed import 130
rights

S
Save As dialog box 36
Save As menu command 36
saving
cost parameter modifications 104
cost profile modifications 104
DBS Control information modifications 104
file extension when 134
file extensions for Teradata SET 133
file extensions when 134
import tree changes 36
RAS modifications 104
statistics modifications 104
Select a Data Source dialog box 29
Select All menu command 37
Select Rows button
exporting cost parameters 75
exporting cost profiles 77
Select Tables button 78
Selected Queries list 62, 63
Set Cost Profile export option 78
Set Cost Profiles tab 115
Set Costs export option 76
Set Costs tab 115
Set Samples export option 84
Set Target Level Emulation dialog box
displaying from Import window 38
displaying from main window 34
setting TLE 114
Set TLE menu command 34, 38
setting TLE
menu command 34
parameter 113
Show Preview check box 89, 104
Single Sign On 30
software
creation date 35
version information 35
software releases
supported 3

Teradata System Emulation Tool User Guide

Index

Source Machine Configuration dialog box 38, 110


Source Machine Configuration menu command 38
Source Version option
Import Options dialog box 93
Specific Plans 66
USING clause 67
Specify Export Database box 69
SQL Assistant See Teradata SQL Assistant
SQL statement
file extension 134
recording 50
SQL Statement Failed dialog box 102, 130
startup
changing default setting 50
statistics
default import location 88
deleting exported files 125
export option 85
file extension 134
import location 88
privileges for exporting 20
privileges for importing 22
privileges for undoing an import 22
saving modifications 104
Statistics check box 85
Statistics option
Import Options dialog box 94
status
connection 35
Status Bar command
toggling on or off 38
Status Bar menu command 34, 38
stored procedure
permanent space 101
summary report
menu command 34
summary report file extension 134
Summary Report menu command 34
system address See IP address
system name 35
SystemFE.Opt_Cost_Table
default import location for cost parameter 88
emulation-process overview 17
privileges for exporting 20
privileges for importing 21
SystemFE.Opt_DBSCtl_Table
privileges for exporting 20
privileges for importing 21
SystemFE.Opt_RAS_Table
emulation-process overview 17
privileges for exporting 20
privileges for importing 21
RAS default import location 88

Teradata System Emulation Tool User Guide

T
tables
deleting exported files 125
target database
renaming 105
Target QCD box 94
Target QCD option
Import Options dialog box 93
target system
viewing configuration of 109
Teradata Database Name box 30
Teradata SET main window See main window
Teradata SQL Assistant
changing default setting 51
setting to use 51
testing a query 118
Teradata Visual Explain
capturing query plans 114
testing a query 118
TLE
resetting 115
setting 113
typical scenario 114
Tool Bar menu command 38
toolbar
main window 33
Toolbar menu command 34
tools
emulation support 18
Tools menu
Customize Data command 34
Define Data Source command 35
Delete Files command 34
Execute SQL command 35
Export command 34
Import command 34
main window 34
Options command 35
Pack command 34
Reset TLE command 34
Set TLE command 34
Undo Import command 34
Unpack command 34
transferring pack files 120

U
Undo Files box 121, 123
undo import
file extension 134
from the command line 47
menu command 34
privileges 22
Undo Import button 124

149

Index

Undo Import File dialog box 124


Undo Import menu command 34
Undo menu command 37
Unpack dialog box 34, 122
Unpack menu command 34
Use Multi-Threading check box 51
Use SQL Assistant instead of the Execute SQL window check
box 51
Use SQL Assistant rather than the Execute SQL window check
box 118
user name
currently connected 35
logging on 30
User Name box 30
user rights See privileges
User-Defined Type
required privileges 20
USING variables, input 119

using the command line interface 45


Workload box 72
Workload check box 85
Workloads check box 57
Workloads option
Import Options dialog box 94

X
X views
from DBC and QCD 51
from QCD only 50
restricted views, creating 51

V
version information 35
version numbers 3, 19
view
deleting exported files 125
View menu
Import window
Estimate Time command 38
Font command 38
Source Machine Configuration command 38
Status Bar command 38
Tool Bar command 38
main window
Font command 34
Log File command 34
Status Bar command 34
Summary Report command 34
Toolbar command 34
View Workload dialog box 72
viewing
source machine configuration 109
Visual Explain See Teradata Visual Explain

W
Warnings dialog box 61, 62
workload
default import location 88
export option 73, 85
exporting 71
file extension 134
importing workload data 88
privileges for exporting 21
privileges for importing 22
privileges for undoing an import 23

150

Teradata System Emulation Tool User Guide

Anda mungkin juga menyukai