Export - System Emulation Tool

Teradata System Emulation Tool User Guide

Product
System Emulation Tool
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2492
lifecycle
previous
Product Category
Teradata Tools and Utilities

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.

 

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.

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